From 450b5b6e8ccdb2f9a80e25625d43b9ab8f2f35e4 Mon Sep 17 00:00:00 2001 From: Opeyemi Date: Wed, 6 Mar 2024 14:59:18 +0100 Subject: [PATCH] Update Failure Jobs (#8223) --- .github/workflows/build-browser.yml | 23 +++------------- .github/workflows/build-cli.yml | 15 ++--------- .github/workflows/build-desktop.yml | 41 +++++------------------------ .github/workflows/build-web.yml | 23 ++-------------- 4 files changed, 13 insertions(+), 89 deletions(-) diff --git a/.github/workflows/build-browser.yml b/.github/workflows/build-browser.yml index 0f7117aaf9..75bce90bb2 100644 --- a/.github/workflows/build-browser.yml +++ b/.github/workflows/build-browser.yml @@ -280,7 +280,7 @@ jobs: az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key | jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12 - + az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert | jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12 @@ -394,25 +394,8 @@ jobs: - crowdin-push steps: - name: Check if any job failed - if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }} - env: - SETUP_STATUS: ${{ needs.setup.result }} - LOCALES_TEST_STATUS: ${{ needs.locales-test.result }} - BUILD_STATUS: ${{ needs.build.result }} - SAFARI_BUILD_STATUS: ${{ needs.build-safari.result }} - CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }} - run: | - if [ "$SETUP_STATUS" = "failure" ]; then - exit 1 - elif [ "$LOCALES_TEST_STATUS" = "failure" ]; then - exit 1 - elif [ "$BUILD_STATUS" = "failure" ]; then - exit 1 - elif [ "$SAFARI_BUILD_STATUS" = "failure" ]; then - exit 1 - elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then - exit 1 - fi + if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') && contains(needs.*.result, 'failure') + run: exit 1 - name: Login to Azure - Prod Subscription uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0 diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index cd292048dd..e31ac448b0 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -362,19 +362,8 @@ jobs: steps: - name: Check if any job failed working-directory: ${{ github.workspace }} - if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }} - env: - SETUP_STATUS: ${{ needs.setup.result }} - CLI_STATUS: ${{ needs.cli.result }} - SNAP_STATUS: ${{ needs.snap.result }} - run: | - if [ "$SETUP_STATUS" = "failure" ]; then - exit 1 - elif [ "$CLI_STATUS" = "failure" ]; then - exit 1 - elif [ "$SNAP_STATUS" = "failure" ]; then - exit 1 - fi + if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') && contains(needs.*.result, 'failure') + run: exit 1 - name: Login to Azure - Prod Subscription uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0 diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index e285bec0f8..057def8e34 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -508,7 +508,7 @@ jobs: az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key | jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12 - + az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert | jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12 @@ -669,7 +669,7 @@ jobs: az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key | jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12 - + az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert | jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12 @@ -875,7 +875,7 @@ jobs: az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key | jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12 - + az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert | jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12 @@ -1068,7 +1068,7 @@ jobs: az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key | jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12 - + az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert | jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12 @@ -1236,37 +1236,8 @@ jobs: - crowdin-push steps: - name: Check if any job failed - if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }} - env: - ELECTRON_VERIFY_STATUS: ${{ needs.electron-verify.result }} - BROWSER_BUILD_STATUS: ${{ needs.browser-build.result }} - SETUP_STATUS: ${{ needs.setup.result }} - LINUX_STATUS: ${{ needs.linux.result }} - WINDOWS_STATUS: ${{ needs.windows.result }} - MACOS_BUILD_STATUS: ${{ needs.macos-build.result }} - MACOS_PKG_GITHUB_STATUS: ${{ needs.macos-package-github.result }} - MACOS_PKG_MAS_STATUS: ${{ needs.macos-package-mas.result }} - CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }} - run: | - if [ "$ELECTRON_VERIFY_STATUS" = "failure" ]; then - exit 1 - elif [ "$BROWSER_BUILD_STATUS" = "failure" ]; then - exit 1 - elif [ "$SETUP_STATUS" = "failure" ]; then - exit 1 - elif [ "$LINUX_STATUS" = "failure" ]; then - exit 1 - elif [ "$WINDOWS_STATUS" = "failure" ]; then - exit 1 - elif [ "$MACOS_BUILD_STATUS" = "failure" ]; then - exit 1 - elif [ "$MACOS_PKG_GITHUB_STATUS" = "failure" ]; then - exit 1 - elif [ "$MACOS_PKG_MAS_STATUS" = "failure" ]; then - exit 1 - elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then - exit 1 - fi + if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') && contains(needs.*.result, 'failure') + run: exit 1 - name: Login to Azure - Prod Subscription uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0 diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml index 77dd38d739..0a1ab23651 100644 --- a/.github/workflows/build-web.yml +++ b/.github/workflows/build-web.yml @@ -327,27 +327,8 @@ jobs: - trigger-web-vault-deploy steps: - name: Check if any job failed - if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }} - env: - SETUP_STATUS: ${{ needs.setup.result }} - ARTIFACT_STATUS: ${{ needs.build-artifacts.result }} - BUILD_CONTAINERS_STATUS: ${{ needs.build-containers.result }} - CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }} - TRIGGER_WEB_VAULT_DEPLOY_STATUS: ${{ needs.trigger-web-vault-deploy.result }} - run: | - if [ "$SETUP_STATUS" = "failure" ]; then - exit 1 - elif [ "$ARTIFACT_STATUS" = "failure" ]; then - exit 1 - elif [ "$BUILD_SELFHOST_STATUS" = "failure" ]; then - exit 1 - elif [ "$BUILD_CONTAINERS_STATUS" = "failure" ]; then - exit 1 - elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then - exit 1 - elif [ "$TRIGGER_WEB_VAULT_DEPLOY_STATUS" = "failure" ]; then - exit 1 - fi + if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') && contains(needs.*.result, 'failure') + run: exit 1 - name: Login to Azure - Prod Subscription uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0