update CI regression and add docker manifests (#479)

* see if QEMU offers support

Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>

* update QEMU support before cli verification

Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
This commit is contained in:
Christopher Angelo Phillips 2021-10-26 10:04:38 -04:00 committed by GitHub
parent c9a1506ede
commit 9d245e3d9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 4 deletions

View file

@ -84,6 +84,9 @@ jobs:
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# We are expecting this cache to have been created during the "Build-Snapshot-Artifacts" job in the "Acceptance" workflow.
- name: Restore bootstrap cache
id: bootstrap-cache

View file

@ -86,5 +86,8 @@ jobs:
- name: Run integration tests
run: make integration
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Run CLI tests
run: make cli

View file

@ -128,8 +128,7 @@ brews:
dockers:
- image_templates:
- "anchore/grype:latest"
- "anchore/grype:{{ .Tag }}-amd64"
- "anchore/grype:{{ .Version }}-amd64"
- "anchore/grype:v{{ .Major }}-amd64"
- "anchore/grype:v{{ .Major }}.{{ .Minor }}-amd64"
dockerfile: Dockerfile
@ -142,7 +141,7 @@ dockers:
- "--build-arg=VCS_URL={{.GitURL}}"
- image_templates:
- "anchore/grype:{{ .Tag }}-arm64v8"
- "anchore/grype:{{ .Version }}-arm64v8"
- "anchore/grype:v{{ .Major }}-arm64v8"
- "anchore/grype:v{{ .Major }}.{{ .Minor }}-arm64v8"
goarch: arm64
@ -154,3 +153,22 @@ dockers:
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
docker_manifests:
- name_template: anchore/grype:{{ .Version }}
image_templates:
- anchore/grype:{{ .Version }}-amd64
- anchore/grype:v{{ .Major }}-amd64
- anchore/grype:v{{ .Major }}.{{ .Minor }}-amd64
- anchore/grype:{{ .Version }}-arm64v8
- anchore/grype:v{{ .Major }}-arm64v8
- anchore/grype:v{{ .Major }}.{{ .Minor }}-arm64v8
- name_template: anchore/grype:latest
image_templates:
- anchore/grype:{{ .Version }}-amd64
- anchore/grype:v{{ .Major }}-amd64
- anchore/grype:v{{ .Major }}.{{ .Minor }}-amd64
- anchore/grype:{{ .Version }}-arm64v8
- anchore/grype:v{{ .Major }}-arm64v8
- anchore/grype:v{{ .Major }}.{{ .Minor }}-arm64v8

View file

@ -170,9 +170,12 @@ $(SNAPSHOTDIR): ## Build snapshot release binaries and packages
cat .goreleaser.yaml >> $(TEMPDIR)/goreleaser.yaml
# build release snapshots
# DOCKER_CLI_EXPERIMENTAL needed to support multi architecture builds for goreleaser
# the release command protects us from image build regressions if QEMU fails or docker is changed
BUILD_GIT_TREE_STATE=$(GITTREESTATE) \
DOCKER_CLI_EXPERIMENTAL=enabled \
SYFT_VERSION=$(SYFTVERSION) \
$(TEMPDIR)/goreleaser build --snapshot --skip-validate --rm-dist --config $(TEMPDIR)/goreleaser.yaml
$(TEMPDIR)/goreleaser release --skip-publish --skip-sign --rm-dist --snapshot --config $(TEMPDIR)/goreleaser.yaml
.PHONY: acceptance-linux
acceptance-linux: $(SNAPSHOTDIR) ## Run acceptance tests on build snapshot binaries and packages (Linux)
@ -235,8 +238,10 @@ release: clean-dist validate-grype-test-config changelog-release ## Build and pu
cat .goreleaser.yaml >> $(TEMPDIR)/goreleaser.yaml
# release (note the version transformation from v0.7.0 --> 0.7.0)
# DOCKER_CLI_EXPERIMENTAL needed to support multi architecture builds for goreleaser
bash -c "\
BUILD_GIT_TREE_STATE=$(GITTREESTATE) \
DOCKER_CLI_EXPERIMENTAL=enabled \
SYFT_VERSION=$(SYFTVERSION) \
VERSION=$(VERSION:v%=%) \
$(TEMPDIR)/goreleaser \