From ede9ac52c4dda452fe12f52ecd1575fb7a6fbb9c Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Sat, 5 Aug 2023 09:36:46 +0200 Subject: [PATCH] test: release validation for a single build Signed-off-by: Hector Fernandez --- .github/workflows/validate-release.yml | 13 +++++++++---- release/release.mk | 7 ++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate-release.yml b/.github/workflows/validate-release.yml index cab66a3a0eef..2854dd063ab8 100644 --- a/.github/workflows/validate-release.yml +++ b/.github/workflows/validate-release.yml @@ -60,13 +60,18 @@ jobs: # - https://github.com/actions/checkout/issues/1048 # - https://github.com/actions/runner-images/issues/6775 - run: git config --system --add safe.directory /__w/cosign/cosign - - - name: goreleaser snapshot - run: make snapshot + - name: check disk space + run: df -h + - name: goreleaser snapshot-linux-amd64-build + run: make snapshot-linux-amd64-build env: PROJECT_ID: honk-fake-project RUNTIME_IMAGE: gcr.io/distroless/static:debug-nonroot - + - name: check disk space + run: df -h - name: check binaries run: | ./dist/cosign-linux-amd64 version + - name: removes the dist folder + run: | + rm -rf ./dist diff --git a/release/release.mk b/release/release.mk index e30117180d6b..bb6118f0bc6c 100644 --- a/release/release.mk +++ b/release/release.mk @@ -18,7 +18,12 @@ sign-release-images: ko # used when need to validate the goreleaser .PHONY: snapshot snapshot: - LDFLAGS="$(LDFLAGS)" goreleaser release --skip-sign --skip-publish --snapshot --clean --timeout 120m --parallelism 1 + LDFLAGS="$(LDFLAGS)" goreleaser release --skip-sign --skip-publish --snapshot --clean --timeout 120m --parallelism 1 + +# used to validate the goreleaser build of the amd64 build +.PHONY: snapshot-linux-amd64-build +snapshot-linux-amd64-build: + GOOS=linux GOARCH=amd64 LDFLAGS="$(LDFLAGS)" goreleaser build --single-target --skip-validate --snapshot --clean --timeout 10m --parallelism 1 #################### # copy image to GHCR