Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tag latest container image #74

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

STATES_DIR=$(CURDIR)/.states
DIST_DIR=$(CURDIR)/dist

CONTAINER_IMAGE_BASE_REF="docker.elastic.co/observability-ci/apm-perf"
MODULE_DEPS=$(sort $(shell go list -deps -tags=darwin,linux,windows -f "{{with .Module}}{{if not .Main}}{{.Path}}{{end}}{{end}}" ./...))

all: test
Expand Down Expand Up @@ -43,7 +43,7 @@ package: COMMIT_SHA=$$(git rev-parse HEAD)
package: CURRENT_TIME_ISO=$$(date -u +"%Y-%m-%dT%H:%M:%SZ")
package: CURRENT_TIME=$$(date +%s)
package: IMAGE_ID=$${IMAGE_VERSION:-latest}-$(CURRENT_TIME)-$(COMMIT_SHA_SHORT)
package: IMAGE_REF=docker.elastic.co/observability-ci/apm-perf:$(IMAGE_ID)
package: IMAGE_REF=$(CONTAINER_IMAGE_BASE_REF):$(IMAGE_ID)
package: PROJECT_URL=$$(go list -m all | head -1)
package:
mkdir -p $(STATES_DIR)
Expand All @@ -67,6 +67,8 @@ sanitize:
publish: IMAGE_REF=$$(cat "$(STATES_DIR)/image_ref")
publish:
docker push $(IMAGE_REF)
docker tag $(IMAGE_REF) $(CONTAINER_IMAGE_BASE_REF):latest
docker push $(CONTAINER_IMAGE_BASE_REF):latest
Comment on lines 69 to +71
Copy link
Member

@v1v v1v Mar 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
docker push $(IMAGE_REF)
docker tag $(IMAGE_REF) $(CONTAINER_IMAGE_BASE_REF):latest
docker push $(CONTAINER_IMAGE_BASE_REF):latest
docker tag $(IMAGE_REF) $(CONTAINER_IMAGE_BASE_REF):latest
docker push --all-tags $(CONTAINER_IMAGE_BASE_REF)

-a, --all-tags Push all tags of an image to the repository


notice: NOTICE.txt
NOTICE.txt: go.mod tools/go.mod
Expand Down