Skip to content

Commit dc6a4b5

Browse files
lhotarisrinath-ctds
authored andcommitted
[improve][ci] Skip "OWASP dependency check" when data wasn't found in cache (apache#23970)
(cherry picked from commit 0a95976) (cherry picked from commit d717da1)
1 parent 6049fc6 commit dc6a4b5

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
@@ -1312,15 +1312,21 @@ jobs:
13121312
restore-keys: |
13131313
owasp-dependency-check-data-
13141314
1315+
- name: Log warning when skipped
1316+
if: ${{ !steps.restore-owasp-dependency-check-data.outputs.cache-matched-key }}
1317+
run: |
1318+
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."
1319+
13151320
# Projects dependent on flume, hdfs, hbase, and presto currently excluded from the scan.
13161321
- name: trigger dependency check
1322+
if: ${{ steps.restore-owasp-dependency-check-data.outputs.cache-matched-key }}
13171323
run: |
13181324
mvn -B -ntp verify -PskipDocker,skip-all,owasp-dependency-check -Dcheckstyle.skip=true -DskipTests \
13191325
-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'
13201326
13211327
- name: Upload report
13221328
uses: actions/upload-artifact@v4
1323-
if: ${{ cancelled() || failure() }}
1329+
if: ${{ steps.restore-owasp-dependency-check-data.outputs.cache-matched-key && (cancelled() || failure()) }}
13241330
continue-on-error: true
13251331
with:
13261332
name: dependency report

0 commit comments

Comments
 (0)