Skip to content

Commit d717da1

Browse files
committed
[improve][ci] Skip "OWASP dependency check" when data wasn't found in cache (#23970)
(cherry picked from commit 0a95976)
1 parent 2557d9d commit d717da1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/pulsar-ci.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,15 +1310,21 @@ jobs:
13101310
restore-keys: |
13111311
owasp-dependency-check-data-
13121312
1313+
- name: Log warning when skipped
1314+
if: ${{ !steps.restore-owasp-dependency-check-data.outputs.cache-matched-key }}
1315+
run: |
1316+
echo "::warning::OWASP Dependency Check was skipped since the OWASP Dependency check data wasn't found in the cache. Run ci-owasp-dependency-check.yaml workflow to update the cache."
1317+
13131318
# Projects dependent on flume, hdfs, hbase, and presto currently excluded from the scan.
13141319
- name: trigger dependency check
1320+
if: ${{ steps.restore-owasp-dependency-check-data.outputs.cache-matched-key }}
13151321
run: |
13161322
mvn -B -ntp verify -PskipDocker,skip-all,owasp-dependency-check -Dcheckstyle.skip=true -DskipTests \
13171323
-pl '!pulsar-sql,!distribution/server,!distribution/io,!distribution/offloaders,!pulsar-sql/presto-distribution,!tiered-storage/file-system,!pulsar-io/flume,!pulsar-io/hbase,!pulsar-io/hdfs2,!pulsar-io/hdfs3,!pulsar-io/docs,!pulsar-io/jdbc/openmldb'
13181324
13191325
- name: Upload report
13201326
uses: actions/upload-artifact@v4
1321-
if: ${{ cancelled() || failure() }}
1327+
if: ${{ steps.restore-owasp-dependency-check-data.outputs.cache-matched-key && (cancelled() || failure()) }}
13221328
continue-on-error: true
13231329
with:
13241330
name: dependency report

0 commit comments

Comments
 (0)