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

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new e4cbdcee113 [CI] Fix issue in uploading surefire reports and container 
logs (#15446)
e4cbdcee113 is described below

commit e4cbdcee11375c91b1708c6507a6ba4be6966ab5
Author: Lari Hotari <[email protected]>
AuthorDate: Thu May 5 21:24:26 2022 +0300

    [CI] Fix issue in uploading surefire reports and container logs (#15446)
    
    * [CI] upgrade to upload-artifact v3
    
    * [CI] Don't delete possible previous artifacts since that makes uploading 
to fail completely
    
    * Set retention to 7 days for uploaded logs to save storage space
---
 .github/workflows/ci-cpp.yaml                    |  2 +-
 .github/workflows/ci-owasp-dep-check.yaml        |  2 +-
 .github/workflows/ci-owasp-dependency-check.yaml |  2 +-
 .github/workflows/pulsar-ci.yaml                 | 41 +++++++++---------------
 4 files changed, 19 insertions(+), 28 deletions(-)

diff --git a/.github/workflows/ci-cpp.yaml b/.github/workflows/ci-cpp.yaml
index 1f9dc8b31ba..3c59f11c5d1 100644
--- a/.github/workflows/ci-cpp.yaml
+++ b/.github/workflows/ci-cpp.yaml
@@ -98,7 +98,7 @@ jobs:
         run: pulsar-client-cpp/docker-tests.sh
 
       - name: Upload test-logs
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: failure()
         continue-on-error: true
         with:
diff --git a/.github/workflows/ci-owasp-dep-check.yaml 
b/.github/workflows/ci-owasp-dep-check.yaml
index 0f48bfbacf1..8cee7349b84 100644
--- a/.github/workflows/ci-owasp-dep-check.yaml
+++ b/.github/workflows/ci-owasp-dep-check.yaml
@@ -93,7 +93,7 @@ jobs:
         run: mvn -q -B -ntp clean verify -PskipDocker,owasp-dependency-check 
-DskipTests -pl 
'!pulsar-sql,!distribution/io,!distribution/offloaders,!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@v2
+        uses: actions/upload-artifact@v3
         if: ${{ cancelled() || failure() }}
         continue-on-error: true
         with:
diff --git a/.github/workflows/ci-owasp-dependency-check.yaml 
b/.github/workflows/ci-owasp-dependency-check.yaml
index 3b787bb0c20..cc931b4ba92 100644
--- a/.github/workflows/ci-owasp-dependency-check.yaml
+++ b/.github/workflows/ci-owasp-dependency-check.yaml
@@ -79,7 +79,7 @@ jobs:
         run: mvn -B -ntp -Pmain,skip-all,skipDocker,owasp-dependency-check 
initialize verify -pl 
distribution/offloaders,distribution/io,pulsar-sql/presto-distribution
 
       - name: Upload OWASP Dependency Check reports
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: always()
         with:
           name: owasp-dependency-check-reports-${{ matrix.checkout_branch }}
diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml
index 1e17ad30fe4..a3d0c4bed98 100644
--- a/.github/workflows/pulsar-ci.yaml
+++ b/.github/workflows/pulsar-ci.yaml
@@ -201,11 +201,6 @@ jobs:
         if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
         uses: apache/pulsar-test-infra/gh-actions-artifact-client/dist@master
 
-      - name: Cleanup log artifacts from possible previous failed build
-        if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
-        run: |
-          gh-actions-artifact-client.js delete "Unit-${{ matrix.group 
}}-surefire-reports" &>/dev/null || true
-
       - name: Restore maven build results from Github artifact cache
         if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
         run: |
@@ -237,18 +232,20 @@ jobs:
           summary_title: 'Test Summary for Unit - ${{ matrix.name }}:'
 
       - name: Publish the Test reports in Junit xml format
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: ${{ always() && needs.changed_files_job.outputs.docs_only != 
'true' }}
         with:
           name: Unit-${{ matrix.group }}-test-report
           path: test-reports
+          retention-days: 7
 
       - name: Upload Surefire reports
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: ${{ !success() && needs.changed_files_job.outputs.docs_only != 
'true' }}
         with:
           name: Unit-${{ matrix.group }}-surefire-reports
           path: surefire-reports
+          retention-days: 7
 
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
@@ -397,12 +394,6 @@ jobs:
         if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
         uses: apache/pulsar-test-infra/gh-actions-artifact-client/dist@master
 
-      - name: Cleanup log artifacts from possible previous failed build
-        if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
-        run: |
-          gh-actions-artifact-client.js delete "Integration-${{ matrix.group 
}}-surefire-reports" &>/dev/null || true
-          gh-actions-artifact-client.js delete "Integration-${{ matrix.group 
}}-container-logs" &>/dev/null || true
-
       - name: Restore maven build results from Github artifact cache
         if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
         run: |
@@ -439,26 +430,29 @@ jobs:
           summary_title: 'Test Summary for Integration - ${{ matrix.name }}:'
 
       - name: Publish the Test reports in Junit xml format
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: ${{ always() && needs.changed_files_job.outputs.docs_only != 
'true' }}
         with:
           name: Integration-${{ matrix.group }}-test-report
           path: test-reports
+          retention-days: 7
 
       - name: Upload Surefire reports
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: ${{ !success() && needs.changed_files_job.outputs.docs_only != 
'true' }}
         with:
           name: Integration-${{ matrix.group }}-surefire-reports
           path: surefire-reports
+          retention-days: 7
 
       - name: Upload container logs
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: ${{ !success() && needs.changed_files_job.outputs.docs_only != 
'true' }}
         continue-on-error: true
         with:
           name: Integration-${{ matrix.group }}-container-logs
           path: tests/integration/target/container-logs
+          retention-days: 7
 
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
@@ -646,12 +640,6 @@ jobs:
         if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
         uses: apache/pulsar-test-infra/gh-actions-artifact-client/dist@master
 
-      - name: Cleanup log artifacts from possible previous failed build
-        if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
-        run: |
-          gh-actions-artifact-client.js delete "System-${{ matrix.group 
}}-surefire-reports" &>/dev/null || true
-          gh-actions-artifact-client.js delete "System-${{ matrix.group 
}}-container-logs" &>/dev/null || true
-
       - name: Restore maven build results from Github artifact cache
         if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
         run: |
@@ -688,26 +676,29 @@ jobs:
           summary_title: 'Test Summary for System - ${{ matrix.name }}:'
 
       - name: Publish the Test reports in Junit xml format
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: ${{ always() && needs.changed_files_job.outputs.docs_only != 
'true' }}
         with:
           name: System-${{ matrix.group }}-test-report
           path: test-reports
+          retention-days: 7
 
       - name: Upload container logs
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: ${{ !success() && needs.changed_files_job.outputs.docs_only != 
'true' }}
         continue-on-error: true
         with:
           name: System-${{ matrix.group }}-container-logs
           path: tests/integration/target/container-logs
+          retention-days: 7
 
       - name: Upload Surefire reports
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         if: ${{ !success() && needs.changed_files_job.outputs.docs_only != 
'true' }}
         with:
           name: System-${{ matrix.name }}-surefire-reports
           path: surefire-reports
+          retention-days: 7
 
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks

Reply via email to