Skip to content

Commit

Permalink
feat: tag latest container image
Browse files Browse the repository at this point in the history
Signed-off-by: Adrien Mannocci <[email protected]>
  • Loading branch information
amannocci committed Mar 14, 2024
1 parent 8dac9cc commit ce8d963
Showing 1 changed file with 4 additions and 2 deletions.
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

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

0 comments on commit ce8d963

Please sign in to comment.