Onboard Boundary to CRT (#1786)
Onboard Boundary to Common Release Tooling Co-authored-by: mdrake <mdrake@hashicorp.com> Co-authored-by: jeanneryan <jeanneryan@hashicorp.com>
This commit is contained in:
34 files changed
+1016
-5047
No files matched your search
@@ -223,44 +223,41 @@ IMAGE_NAME=boundary
|
||||
VERSION?=0.7.4
|
||||
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION)
|
||||
IMAGE_TAG_DEV=$(REGISTRY_NAME)/$(IMAGE_NAME):latest-$(shell git rev-parse --short HEAD)
|
||||
DOCKER_DIR=./docker
|
||||
|
||||
.PHONY: docker
|
||||
docker: docker-build docker-publish
|
||||
docker: docker-build
|
||||
|
||||
.PHONY: docker-build
|
||||
# builds from releases.hashicorp.com official binary
|
||||
# Builds from the releases.hashicorp.com official binary
|
||||
docker-build:
|
||||
docker build -t $(IMAGE_TAG) \
|
||||
--build-arg VERSION=$(VERSION) \
|
||||
-f $(DOCKER_DIR)/Release.dockerfile docker/
|
||||
docker tag $(IMAGE_TAG) hashicorp/boundary:latest
|
||||
docker build \
|
||||
--tag $(IMAGE_TAG) \
|
||||
--tag hashicorp/boundary:latest \
|
||||
--target=official \
|
||||
--build-arg VERSION=$(VERSION) \
|
||||
.
|
||||
|
||||
.PHONY: docker-multiarch-build
|
||||
# builds multiarch from releases.hashicorp.com official binary
|
||||
# Builds multiarch from the releases.hashicorp.com official binary
|
||||
docker-multiarch-build:
|
||||
docker buildx build \
|
||||
--push \
|
||||
--tag $(IMAGE_TAG) \
|
||||
--tag hashicorp/boundary:latest \
|
||||
--build-arg VERSION=$(VERSION) \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--file $(DOCKER_DIR)/Release.dockerfile docker/
|
||||
--tag $(IMAGE_TAG) \
|
||||
--tag hashicorp/boundary:latest \
|
||||
--target=official \
|
||||
--build-arg VERSION=$(VERSION) \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
.
|
||||
|
||||
.PHONY: docker-build-dev
|
||||
# builds from locally generated binary in bin/
|
||||
# Builds from the locally generated binary in ./bin/
|
||||
docker-build-dev: export GOOS=linux
|
||||
docker-build-dev: export GOARCH=amd64
|
||||
docker-build-dev: dev
|
||||
cp -r bin docker/
|
||||
docker build -t $(IMAGE_TAG_DEV) \
|
||||
-f $(DOCKER_DIR)/Dev.dockerfile docker/
|
||||
|
||||
.PHONY: docker-publish
|
||||
# requires appropriate permissions in dockerhub
|
||||
docker-publish:
|
||||
docker push $(IMAGE_TAG)
|
||||
docker push hashicorp/boundary:latest
|
||||
docker build \
|
||||
--tag $(IMAGE_TAG_DEV) \
|
||||
--target=dev \
|
||||
--build-arg=boundary \
|
||||
.
|
||||
|
||||
.NOTPARALLEL:
|
||||
|
||||
@@ -272,7 +269,7 @@ ci-config:
|
||||
ci-verify:
|
||||
@$(MAKE) -C .circleci ci-verify
|
||||
|
||||
PACKAGESPEC_CIRCLECI_CONFIG := .circleci/config/@build-release.yml
|
||||
PACKAGESPEC_HOOK_POST_CI_CONFIG := $(MAKE) ci-config
|
||||
|
||||
-include packagespec.mk
|
||||
.PHONY: version
|
||||
# This is used for release builds by .github/workflows/build.yml
|
||||
version:
|
||||
@go run ./cmd/boundary version | awk '/Version Number:/ { print $$3 }'
|
||||
Reference in new issue
Block a user