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

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


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

commit 8e35c13dde408399ef03691a62ed72678cb57020
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 8abf5eb11d4..5a663fecd45 100644
--- a/.github/workflows/pulsar-ci.yaml
+++ b/.github/workflows/pulsar-ci.yaml
@@ -1491,15 +1491,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, and hbase 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 
'!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'
 
       - 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