From 16d68585d5dc20c0a283b37a8b5a1b64da881994 Mon Sep 17 00:00:00 2001 From: Miguel Martinez Date: Thu, 13 Nov 2025 14:38:06 +0100 Subject: [PATCH] chor(ci): make sure version exists during package Signed-off-by: Miguel Martinez --- .github/workflows/codeql.yml | 2 +- .github/workflows/github_release.yaml | 2 +- .github/workflows/package_chart.yaml | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e2b958ca3..67d25175f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -35,7 +35,7 @@ jobs: - name: Install Chainloop if: ${{ github.event_name != 'pull_request' }} run: | - curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/8a12fce328929abf012c96a07bddfeaf94c74ed4/docs/static/install.sh | bash -s + curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 diff --git a/.github/workflows/github_release.yaml b/.github/workflows/github_release.yaml index d7d36f0d2..b4775d703 100644 --- a/.github/workflows/github_release.yaml +++ b/.github/workflows/github_release.yaml @@ -33,7 +33,7 @@ jobs: - name: Install Chainloop run: | - curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/8a12fce328929abf012c96a07bddfeaf94c74ed4/docs/static/install.sh | bash -s + curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s - name: Initialize Attestation run: | diff --git a/.github/workflows/package_chart.yaml b/.github/workflows/package_chart.yaml index 2498548e8..c30b20979 100644 --- a/.github/workflows/package_chart.yaml +++ b/.github/workflows/package_chart.yaml @@ -38,7 +38,7 @@ jobs: steps: - name: Install Chainloop run: | - curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/8a12fce328929abf012c96a07bddfeaf94c74ed4/docs/static/install.sh | bash -s + curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s - name: Docker login to Github Packages uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 @@ -68,7 +68,9 @@ jobs: app_version=$(cat deployment/chainloop/Chart.yaml | yq .appVersion) # Force the version that's inside the Chart.yaml file - chainloop attestation init --workflow ${CHAINLOOP_WORKFLOW_NAME} --project ${CHAINLOOP_PROJECT} --version ${app_version} + # and make sure it exists in the project by passing the --existing-version flag + # if it doesn't exist, the attestation will fail, and first we need to create/update/rename the version in the project and re-run the job + chainloop attestation init --workflow ${CHAINLOOP_WORKFLOW_NAME} --project ${CHAINLOOP_PROJECT} --version ${app_version} --existing-version # Attest Control plane image chainloop attestation add --name control-plane-image --value "${CONTAINER_CP}"