Skip to content

Commit 0a95976

Browse files
authored
[improve][ci] Skip "OWASP dependency check" when data wasn't found in cache (#23970)
1 parent 3cc2206 commit 0a95976

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
@@ -1494,15 +1494,21 @@ jobs:
14941494
restore-keys: |
14951495
owasp-dependency-check-data-
14961496
1497+
- name: Log warning when skipped
1498+
if: ${{ !steps.restore-owasp-dependency-check-data.outputs.cache-matched-key }}
1499+
run: |
1500+
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."
1501+
14971502
# Projects dependent on flume, hdfs, and hbase currently excluded from the scan.
14981503
- name: trigger dependency check
1504+
if: ${{ steps.restore-owasp-dependency-check-data.outputs.cache-matched-key }}
14991505
run: |
15001506
mvn -B -ntp verify -PskipDocker,skip-all,owasp-dependency-check -Dcheckstyle.skip=true -DskipTests \
15011507
-pl '!distribution/server,!distribution/io,!distribution/offloaders,!tiered-storage/file-system,!pulsar-io/flume,!pulsar-io/hbase,!pulsar-io/hdfs3,!pulsar-io/docs,!pulsar-io/jdbc/openmldb'
15021508
15031509
- name: Upload report
15041510
uses: actions/upload-artifact@v4
1505-
if: ${{ cancelled() || failure() }}
1511+
if: ${{ steps.restore-owasp-dependency-check-data.outputs.cache-matched-key && (cancelled() || failure()) }}
15061512
continue-on-error: true
15071513
with:
15081514
name: dependency report

0 commit comments

Comments
 (0)