From 68ed6fa22d31b6186005ff6ca6c29365e7379dd1 Mon Sep 17 00:00:00 2001 From: Christian Zunker <827818+czunker@users.noreply.github.com> Date: Wed, 29 Jan 2025 06:21:59 +0100 Subject: [PATCH] :bug: Fix errors in client release pipeline (#1559) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 Increase retries goreleaser might take a bit longer Also wait for the image, which takes the longest to build. Signed-off-by: Christian Zunker * 🐛 Create token for multiple repos Signed-off-by: Christian Zunker --------- Signed-off-by: Christian Zunker --- .github/workflows/gh-release.yaml | 4 ++-- .github/workflows/goreleaser.yml | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gh-release.yaml b/.github/workflows/gh-release.yaml index 7138ef3a..7c71ae9e 100644 --- a/.github/workflows/gh-release.yaml +++ b/.github/workflows/gh-release.yaml @@ -59,9 +59,9 @@ jobs: id: check_release_file uses: nick-fields/retry@v3 with: - retry_wait_seconds: 10 + retry_wait_seconds: 20 timeout_seconds: 5 - max_attempts: 100 + max_attempts: 200 retry_on: error # error on HTTP code different to 302 command: curl -o /dev/null -s -w "%{http_code}\n" "https://github.com/mondoohq/cnspec/releases/download/${{ env.RELEASE_VERSION }}/cnspec_${{ env.RELEASE_VERSION }}_SHA256SUMS" | grep 302 diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 994becaf..cba4ab81 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -155,19 +155,19 @@ jobs: runs-on: ubuntu-latest needs: goreleaser steps: - - name: Release file present? + - name: cnspec container image present? id: check_release_file uses: nick-fields/retry@v3 with: - retry_wait_seconds: 10 + retry_wait_seconds: 20 timeout_seconds: 5 - max_attempts: 60 + max_attempts: 200 retry_on: error # error on HTTP code different to 200 command: | vSEMVER=${{ github.ref_name }} SEMVER="${vSEMVER//v}" - curl -o /dev/null -s -w "%{http_code}\n" "https://releases.mondoo.com/cnspec/${SEMVER}/cnspec_${vSEMVER}_SHA256SUMS" | grep 200 + curl -o /dev/null -s -w "%{http_code}\n" "https://registry.hub.docker.com/v2/repositories/mondoo/cnspec/tags/${SEMVER}-ubi-rootless" | grep 200 # fetch a token for the mondoo-mergebot app - name: Generate token @@ -176,6 +176,10 @@ jobs: with: app-id: ${{ secrets.MONDOO_MERGEBOT_APP_ID }} private-key: ${{ secrets.MONDOO_MERGEBOT_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repository: | + mondoohq/installer + mondoohq/cnspec - name: Trigger installer release uses: peter-evans/repository-dispatch@v3