diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6843e998..9ca91ca4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -378,6 +378,18 @@ jobs: registry-password: ${{ secrets.GITHUB_TOKEN }} output-file: image-debian-sbom.spdx + - name: Generate JSON schema from container + timeout-minutes: 1 + # We don't want to fail the release if this fails since it's not critical and can be debugged after the fact if needed + continue-on-error: true + run: | + echo "Generating JSON schema from container image" + docker run --rm -t "${{ env.UBI_IMAGE_NAME }}:${{ env.TAG }}" -J > output/telemetry-forge-ubi-schema.json + docker run --rm -t "${{ env.DISTROLESS_IMAGE_NAME }}:${{ env.TAG }}" -J > output/telemetry-forge-debian-schema.json + # We use the UBI image schema as the main one since it has more metadata and we can link to the distroless one for reference + cp output/telemetry-forge-ubi-schema.json output/telemetry-forge-agent-schema.json + shell: bash + - name: Save image as tarball run: | mkdir -p output diff --git a/.github/workflows/call-test-containers.yaml b/.github/workflows/call-test-containers.yaml index 9aae16c4..95f74bb3 100644 --- a/.github/workflows/call-test-containers.yaml +++ b/.github/workflows/call-test-containers.yaml @@ -86,6 +86,13 @@ jobs: run: curl -sSfL https://github.com/shenwei356/rush/releases/download/v0.7.0/rush_linux_amd64.tar.gz | sudo tar xzf - -C /usr/local/bin shell: bash + - name: Ensure we use the right version during a release + if: startsWith(github.ref, 'refs/tags/v') + run: | + echo "TELEMETRY_FORGE_AGENT_VERSION=${{ inputs.image-tag }}" >> $GITHUB_ENV + echo "FLUENTDO_AGENT_VERSION=${{ inputs.image-tag }}" >> $GITHUB_ENV + shell: bash + - name: Run container integration tests run: ./testing/bats/run-container-integration-tests.sh shell: bash