@cryptotaxi247 / netdata-1 / commits / 9bb7a0e60

Update GHA steps that handle artifacts to use latest versions of upload/download actions. (#16714)

* Reapply "Update artifact-handling actions to latest version." (#16689) This reverts commit 18fd72e230a5f970f777a21298889dd795f1b279. * Auto-retry downloading artifacts if it fails. * Update .github/workflows/build.yml Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> * List consolidated artifacts in CI checks. * Change handling of dist artifacts. --------- Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>

Austin S. Hemmelgarn committed Jan 17, 2024 at 08:24 UTC 9bb7a0e605b09afdf5f7b1f804a394d2f5aab974
2 files changed +74 -41
.github/workflows/build.yml
+73 -40
@@ -113,7 +113,7 @@ jobs:
113 - name: Store
114 id: store
115 if: needs.file-check.outputs.run == 'true'
116 - uses: actions/upload-artifact@v3
116 + uses: actions/upload-artifact@v4
117 with:
118 name: dist-tarball
119 path: artifacts/*.tar.gz
@@ -202,9 +202,9 @@ jobs:
202 - name: Store
203 id: store
204 if: needs.file-check.outputs.run == 'true'
205 - uses: actions/upload-artifact@v3
205 + uses: actions/upload-artifact@v4
206 with:
207 - name: static-archive
207 + name: dist-static-${{ matrix.arch }}
208 path: artifacts/*.gz.run
209 retention-days: 30
210 - name: Failure Notification
@@ -345,7 +345,7 @@ jobs:
345 tags: test:${{ matrix.artifact_key }}
346 - name: Upload image artifact
347 id: upload
348 - uses: actions/upload-artifact@v3
348 + uses: actions/upload-artifact@v4
349 with:
350 name: ${{ matrix.artifact_key }}-test-env
351 path: /tmp/image.tar
@@ -401,9 +401,14 @@ jobs:
401 - name: Fetch test environment
402 id: fetch
403 if: needs.file-check.outputs.run == 'true'
404 - uses: actions/download-artifact@v3
404 + uses: Wandalen/wretry.action@v1
405 with:
406 - name: ${{ matrix.artifact_key }}-test-env
406 + action: actions/download-artifact@v4
407 + with: |
408 + name: ${{ matrix.artifact_key }}-test-env
409 + path: .
410 + attempt_limit: 3
411 + attempt_delay: 2000
412 - name: Load test environment
413 id: load
414 if: needs.file-check.outputs.run == 'true'
@@ -484,10 +489,14 @@ jobs:
489 - name: Fetch dist tarball artifacts
490 id: fetch-tarball
491 if: needs.file-check.outputs.run == 'true'
487 - uses: actions/download-artifact@v3
492 + uses: Wandalen/wretry.action@v1
493 with:
489 - name: dist-tarball
490 - path: dist-tarball
494 + action: actions/download-artifact@v4
495 + with: |
496 + name: dist-tarball
497 + path: dist-tarball
498 + attempt_limit: 3
499 + attempt_delay: 2000
500 - name: Prepare artifact directory
501 id: prepare
502 if: needs.file-check.outputs.run == 'true'
@@ -506,9 +515,14 @@ jobs:
515 - name: Fetch test environment
516 id: fetch-test-environment
517 if: needs.file-check.outputs.run == 'true'
509 - uses: actions/download-artifact@v3
518 + uses: Wandalen/wretry.action@v1
519 with:
511 - name: ${{ matrix.artifact_key }}-test-env
520 + action: actions/download-artifact@v4
521 + with: |
522 + name: ${{ matrix.artifact_key }}-test-env
523 + path: .
524 + attempt_limit: 3
525 + attempt_delay: 2000
526 - name: Load test environment
527 id: load
528 if: needs.file-check.outputs.run == 'true'
@@ -565,27 +579,24 @@ jobs:
579 id: prepare
580 if: needs.file-check.outputs.run == 'true'
581 run: mkdir -p artifacts
568 - - name: Retrieve Dist Tarball
582 + - name: Retrieve Build Artifacts
583 id: fetch-dist
584 if: needs.file-check.outputs.run == 'true'
571 - uses: actions/download-artifact@v3
572 - with:
573 - name: dist-tarball
574 - path: dist-tarball
575 - - name: Retrieve Static Build Artifacts
576 - id: fetch-static
577 - if: needs.file-check.outputs.run == 'true'
578 - uses: actions/download-artifact@v3
585 + uses: Wandalen/wretry.action@v1
586 with:
580 - name: static-archive
581 - path: static-archive
587 + action: actions/download-artifact@v4
588 + with: |
589 + pattern: dist-*
590 + path: dist-artifacts
591 + merge-multiple: true
592 + attempt_limit: 3
593 + attempt_delay: 2000
594 - name: Prepare Artifacts
595 id: consolidate
596 if: needs.file-check.outputs.run == 'true'
597 working-directory: ./artifacts/
598 run: |
587 - mv ../dist-tarball/* . || exit 1
588 - mv ../static-archive/* . || exit 1
599 + mv ../dist-artifacts/* . || exit 1
600 ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1
601 cp ../packaging/version ./latest-version.txt || exit 1
602 cp ../integrations/integrations.js ./integrations.js || exit 1
@@ -594,7 +605,7 @@ jobs:
605 - name: Store Artifacts
606 id: store
607 if: needs.file-check.outputs.run == 'true'
597 - uses: actions/upload-artifact@v3
608 + uses: actions/upload-artifact@v4
609 with:
610 name: final-artifacts
611 path: artifacts/*
@@ -650,16 +661,21 @@ jobs:
661 - name: Fetch artifacts
662 id: fetch
663 if: needs.file-check.outputs.run == 'true'
653 - uses: actions/download-artifact@v3
664 + uses: Wandalen/wretry.action@v1
665 with:
655 - name: final-artifacts
656 - path: artifacts
666 + action: actions/download-artifact@v4
667 + with: |
668 + name: final-artifacts
669 + path: artifacts
670 + attempt_limit: 3
671 + attempt_delay: 2000
672 - name: Prepare artifacts directory
673 id: prepare
674 if: needs.file-check.outputs.run == 'true'
675 run: |
676 mkdir -p download/latest
677 mv artifacts/* download/latest
678 + ls -al download/latest
679 - name: Verify that artifacts work with installer
680 id: verify
681 if: needs.file-check.outputs.run == 'true'
@@ -714,16 +730,21 @@ jobs:
730 - name: Fetch artifacts
731 id: fetch-artifacts
732 if: needs.file-check.outputs.run == 'true'
717 - uses: actions/download-artifact@v3
733 + uses: Wandalen/wretry.action@v1
734 with:
719 - name: final-artifacts
720 - path: artifacts
735 + action: actions/download-artifact@v4
736 + with: |
737 + name: final-artifacts
738 + path: artifacts
739 + attempt_limit: 3
740 + attempt_delay: 2000
741 - name: Prepare artifacts directory
742 id: prepare
743 if: needs.file-check.outputs.run == 'true'
744 run: |
745 mkdir -p download/latest
746 mv artifacts/* download/latest
747 + ls -al download/latest
748 - name: Verify that artifacts work with installer
749 id: verify
750 if: needs.file-check.outputs.run == 'true'
@@ -763,10 +784,14 @@ jobs:
784 steps:
785 - name: Retrieve Artifacts
786 id: fetch
766 - uses: actions/download-artifact@v3
787 + uses: Wandalen/wretry.action@v1
788 with:
768 - name: final-artifacts
769 - path: final-artifacts
789 + action: actions/download-artifact@v4
790 + with: |
791 + name: final-artifacts
792 + path: final-artifacts
793 + attempt_limit: 3
794 + attempt_delay: 2000
795 - name: Authenticate to GCS
796 id: gcs-auth
797 uses: google-github-actions/auth@v2
@@ -828,10 +853,14 @@ jobs:
853 token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
854 - name: Retrieve Artifacts
855 id: fetch
831 - uses: actions/download-artifact@v3
856 + uses: Wandalen/wretry.action@v1
857 with:
833 - name: final-artifacts
834 - path: final-artifacts
858 + action: actions/download-artifact@v4
859 + with: |
860 + name: final-artifacts
861 + path: final-artifacts
862 + attempt_limit: 3
863 + attempt_delay: 2000
864 - name: Prepare version info
865 id: version
866 run: |
@@ -942,10 +971,14 @@ jobs:
971 uses: actions/checkout@v4
972 - name: Retrieve Artifacts
973 id: fetch
945 - uses: actions/download-artifact@v3
974 + uses: Wandalen/wretry.action@v1
975 with:
947 - name: final-artifacts
948 - path: final-artifacts
976 + action: actions/download-artifact@v4
977 + with: |
978 + name: final-artifacts
979 + path: final-artifacts
980 + attempt_limit: 3
981 + attempt_delay: 2000
982 - name: Create Release
983 id: create-release
984 uses: ncipollo/release-action@v1
.github/workflows/packaging.yml
+1 -1
@@ -238,7 +238,7 @@ jobs:
238 id: artifacts
239 if: needs.file-check.outputs.run == 'true'
240 continue-on-error: true
241 - uses: actions/upload-artifact@v3
241 + uses: actions/upload-artifact@v4
242 with:
243 name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-packages
244 path: ${{ github.workspace }}/artifacts/*