diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 43ee4cc0b..daad03c9a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: $(go env GOPATH)/bin/gox -cgo -os=darwin -arch=amd64 -output=$GOX_OUTPUT ./... - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: darwin-release-${{ github.run_id }} path: release/ @@ -92,7 +92,7 @@ jobs: $(go env GOPATH)/bin/gox -cgo -os=windows -arch=amd64 -output=$GOX_OUTPUT ./... - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: windows-release-${{ github.run_id }} path: release/ @@ -128,7 +128,7 @@ jobs: CC=aarch64-linux-gnu-gcc $(go env GOPATH)/bin/gox -cgo -os=linux -arch=arm64 -output=$GOX_OUTPUT ./... - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux-release-${{ github.run_id }} path: release/ @@ -221,6 +221,20 @@ jobs: tar --exclude *terraform-provider-aws* -czvf - simple-transfer-${GITHUB_RUN_NUMBER}/ | gpg --symmetric --cipher-algo aes256 --batch --quiet --passphrase ${FABLAB_PASSPHRASE} -o simple-transfer-${GITHUB_RUN_NUMBER}.tar.gz.gpg aws s3 cp ./simple-transfer-${GITHUB_RUN_NUMBER}.tar.gz.gpg s3://ziti-smoketest-fablab-instances/ + - name: Create Logs Archive + if: always() + run: | + $(go env GOPATH)/bin/simple-transfer get files '*' "./logs/{{ .Id }}/" ./logs + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: logs-${{ github.run_id }} + path: logs/ + compression-level: 7 + retention-days: 5 + - name: Test Report Generation if: ${{ !cancelled() }} shell: bash @@ -230,11 +244,11 @@ jobs: - name: Test Summary uses: test-summary/action@v2 + if: ${{ !cancelled() }} with: paths: | test-report.xml show: "fail, skip" - if: ${{ !cancelled() }} fablab-smoketest-teardown: name: Teardown SmokeTest @@ -244,11 +258,11 @@ jobs: needs: [ fablab-smoketest ] steps: # allow time for investigation unless the workflow is cancelled or the smoketest succeeded or was skipped - - name: Sleep If Failed - if: needs.fablab-smoketest.result != 'success' && needs.fablab-smoketest.result != 'skipped' && needs.fablab-smoketest.result != 'cancelled' - shell: bash - run: | - sleep 30m + #- name: Sleep If Failed + # if: needs.fablab-smoketest.result != 'success' && needs.fablab-smoketest.result != 'skipped' && needs.fablab-smoketest.result != 'cancelled' + # shell: bash + # run: | + # sleep 30m # release cloud resources if the smoketest succeeded, failed, or was cancelled; unnecessary if skipped - name: Teardown Test Environment @@ -382,11 +396,11 @@ jobs: name: Publish Binaries # - !cancelled() allows evaluating further conditional expressions even if # needed jobs were skipped - if: ${{ - !cancelled() - && (needs.mac-os-build.result == 'success' || needs.mac-os-build.result == 'skipped') - && (needs.windows-build.result == 'success' || needs.windows-build.result == 'skipped') - && (needs.fablab-smoketest.result == 'success' || needs.fablab-smoketest.result == 'skipped') + if: ${{ + !cancelled() + && (needs.mac-os-build.result == 'success' || needs.mac-os-build.result == 'skipped') + && (needs.windows-build.result == 'success' || needs.windows-build.result == 'skipped') + && (needs.fablab-smoketest.result == 'success' || needs.fablab-smoketest.result == 'skipped') }} runs-on: ubuntu-20.04 needs: [ tests, linux-build, mac-os-build, windows-build, fablab-smoketest, fablab-ha-smoketest ] @@ -412,21 +426,21 @@ jobs: uses: openziti/ziti-ci@v1 - name: Download linux release artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: linux-release-${{ github.run_id }} path: release/ - name: Download darwin release artifact if: needs.mac-os-build.result == 'success' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: darwin-release-${{ github.run_id }} path: release/ - name: Download windows release artifact if: needs.windows-build.result == 'success' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: windows-release-${{ github.run_id }} path: release/ @@ -503,9 +517,9 @@ jobs: # - !cancelled() allows evaluating further conditional expressions even if # needed jobs were skipped if: ${{ - !cancelled() - && needs.publish.result == 'success' - && github.ref == 'refs/heads/release-next' + !cancelled() + && needs.publish.result == 'success' + && github.ref == 'refs/heads/release-next' }} name: Publish Pre-Release Docker Images needs: publish @@ -518,12 +532,12 @@ jobs: # - !cancelled() allows evaluating further conditional expressions even if # needed jobs were skipped if: ${{ - !cancelled() - && needs.publish.result == 'success' - && ( - github.ref == 'refs/heads/main' - || startsWith(github.ref, 'refs/heads/release-v') - ) + !cancelled() + && needs.publish.result == 'success' + && ( + github.ref == 'refs/heads/main' + || startsWith(github.ref, 'refs/heads/release-v') + ) }} name: Publish Release Docker Images needs: publish @@ -538,13 +552,13 @@ jobs: # - !cancelled() allows evaluating further conditional expressions even if # needed jobs were skipped if: ${{ - !cancelled() - && needs.publish.result == 'success' - && ( - github.ref == 'refs/heads/main' - || startsWith(github.ref, 'refs/heads/release-v') - || github.ref == 'refs/heads/release-next' - ) + !cancelled() + && needs.publish.result == 'success' + && ( + github.ref == 'refs/heads/main' + || startsWith(github.ref, 'refs/heads/release-v') + || github.ref == 'refs/heads/release-next' + ) }} name: Publish Linux Packages needs: publish