Skip to content

Commit

Permalink
🐛 Fix errors in client release pipeline (#1559)
Browse files Browse the repository at this point in the history
* 🐛 Increase retries

goreleaser might take a bit longer
Also wait for the image, which takes the longest to build.

Signed-off-by: Christian Zunker <christian@mondoo.com>

* 🐛 Create token for multiple repos

Signed-off-by: Christian Zunker <christian@mondoo.com>

---------

Signed-off-by: Christian Zunker <christian@mondoo.com>
  • Loading branch information
czunker authored Jan 29, 2025
1 parent b965e27 commit 68ed6fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gh-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 68ed6fa

Please sign in to comment.