This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new d717da1e836 [improve][ci] Skip "OWASP dependency check" when data 
wasn't found in cache (#23970)
d717da1e836 is described below

commit d717da1e8363d52b0717e93981ac39a506647345
Author: Lari Hotari <[email protected]>
AuthorDate: Wed Feb 12 21:57:08 2025 +0200

    [improve][ci] Skip "OWASP dependency check" when data wasn't found in cache 
(#23970)
    
    (cherry picked from commit 0a9597640ff922c00b49016af839d7c56086f82b)
---
 .github/workflows/pulsar-ci.yaml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml
index 40533fd5b23..f17b322d25b 100644
--- a/.github/workflows/pulsar-ci.yaml
+++ b/.github/workflows/pulsar-ci.yaml
@@ -1310,15 +1310,21 @@ jobs:
           restore-keys: |
             owasp-dependency-check-data-
 
+      - name: Log warning when skipped
+        if: ${{ 
!steps.restore-owasp-dependency-check-data.outputs.cache-matched-key }}
+        run: |
+          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."
+
       # Projects dependent on flume, hdfs, hbase, and presto currently 
excluded from the scan.
       - name: trigger dependency check
+        if: ${{ 
steps.restore-owasp-dependency-check-data.outputs.cache-matched-key }}
         run: |
           mvn -B -ntp verify -PskipDocker,skip-all,owasp-dependency-check 
-Dcheckstyle.skip=true -DskipTests \
             -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'
 
       - name: Upload report
         uses: actions/upload-artifact@v4
-        if: ${{ cancelled() || failure() }}
+        if: ${{ 
steps.restore-owasp-dependency-check-data.outputs.cache-matched-key && 
(cancelled() || failure()) }}
         continue-on-error: true
         with:
           name: dependency report

Reply via email to