diff --git a/.github/workflows/podman-aws-e2e.yaml b/.github/workflows/podman-aws-e2e.yaml index ecbcb7278..e9aaac3ad 100644 --- a/.github/workflows/podman-aws-e2e.yaml +++ b/.github/workflows/podman-aws-e2e.yaml @@ -53,7 +53,7 @@ jobs: - name: Build snapshot run: |- make build-for-podman - goreleaser build --id konvoy-image-wrapper-for-podman --snapshot --clean + goreleaser build --id konvoy-image-wrapper-for-podman --clean --skip-validate - name: Run E2E test for AWS centos 7.9 using podman run: |- diff --git a/.goreleaser.yml b/.goreleaser.yml index f1d503e98..c411a6f9c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -46,13 +46,7 @@ builds: - EMBED_DOCKER_IMAGE ldflags: - -s -w - - -X {{ .ModulePath }}/pkg/version.version=v{{trimprefix .Version "v"}} - - -X {{ .ModulePath }}/pkg/version.major={{ .Major }} - - -X {{ .ModulePath }}/pkg/version.minor={{ .Minor }} - - -X {{ .ModulePath }}/pkg/version.patch={{ .Patch }} - - -X {{ .ModulePath }}/pkg/version.revision={{ .FullCommit }} - - -X {{ .ModulePath }}/pkg/version.commitDate={{ .CommitDate }} - - -X {{ .ModulePath }}/pkg/version.branch={{ .Branch }} + - -X {{ .ModulePath }}/pkg/version.version={{ .FullCommit }} - -X {{ .ModulePath }}/pkg/version.builtBy=goreleaser goos: - linux diff --git a/Makefile b/Makefile index 7d127ed4b..e7db44750 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ INTERACTIVE := $(shell [ -t 0 ] && echo 1) root_mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) export REPO_ROOT_DIR := $(patsubst %/,%,$(dir $(root_mkfile_path))) export REPO_REV ?= $(shell cd $(REPO_ROOT_DIR) && git describe --abbrev=12 --tags --match='v*' HEAD) +export COMMIT := $(shell git log -n1 | grep commit | cut -d' ' -f2) UID ?= $(shell id -u) GID ?= $(shell id -g) @@ -507,5 +508,5 @@ cmd/konvoy-image-wrapper/image/konvoy-image-builder.tar.gz: kib-image-push-manif docker save $(DOCKER_REPOSITORY):$(REPO_REV) | gzip -c - > "$(REPO_ROOT_DIR)/cmd/konvoy-image-wrapper/image/konvoy-image-builder.tar.gz" build-for-podman: kib-image-build-amd64 - docker tag $(DOCKER_REPOSITORY):$(REPO_REV)-$(BUILDARCH) $(DOCKER_REPOSITORY):$(REPO_REV) - docker save $(DOCKER_REPOSITORY):$(REPO_REV) | gzip -c - > "$(REPO_ROOT_DIR)/cmd/konvoy-image-wrapper/image/konvoy-image-builder.tar.gz" + docker tag $(DOCKER_REPOSITORY):$(REPO_REV)-$(BUILDARCH) $(DOCKER_REPOSITORY):$(COMMIT) + docker save $(DOCKER_REPOSITORY):$(COMMIT) | gzip -c - > "$(REPO_ROOT_DIR)/cmd/konvoy-image-wrapper/image/konvoy-image-builder.tar.gz"