Skip to content

Commit

Permalink
test: release validation for a single build
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Fernandez <[email protected]>
  • Loading branch information
hectorj2f committed Aug 5, 2023
1 parent 8b4babc commit ede9ac5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion release/release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ede9ac5

Please sign in to comment.