Skip to content

Commit

Permalink
build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aahel committed Feb 23, 2024
1 parent e9fc5bb commit 3fa6a9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions consul-lambda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,11 @@ dev: dist
BUILD_ARGS = BIN_NAME=consul-lambda-registrator VERSION=$(VERSION) GIT_COMMIT=$(GIT_COMMIT) GIT_DIRTY=$(GIT_DIRTY)
TAG ?= $(BIN_NAME)/$(TARGET):$(VERSION)
BA_FLAGS = $(addprefix --build-arg=,$(BUILD_ARGS))
FLAGS = --platform linux/amd64,linux/arm64 --tag $(TAG) $(BA_FLAGS)
FLAGS = --load --platform $(PLATFORM) --tag $(TAG) $(BA_FLAGS)

# Set OS to linux for all docker/* targets.
docker: OS = linux
docker: TARGET = release-default
docker:
cd consul-lambda-registrator && CGO_ENABLED=0 go build -ldflags "$(LD_FLAGS)" -o $(BIN)
@if ! docker buildx inspect consul-builder; then \
docker buildx create --name consul-builder --driver docker-container --bootstrap; \
fi;
docker buildx use consul-builder && docker buildx build $(FLAGS) ./consul-lambda-registrator
docker: dev # TODO
docker buildx use default && docker buildx build $(FLAGS) ./consul-lambda-registrator
.PHONY: docker
2 changes: 1 addition & 1 deletion test/acceptance/setup-terraform/ecr.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "null_resource" "push-lambda-registrator-to-ecr" {
command = <<EOF
aws ecr get-login-password --region ${var.region} | docker login --username AWS --password-stdin ${local.account_id}.dkr.ecr.${var.region}.amazonaws.com
cd ../../../consul-lambda
make docker TAG=${aws_ecr_repository.lambda-registrator.repository_url}:${local.ecr_image_tag}
make docker TAG=${aws_ecr_repository.lambda-registrator.repository_url}:${local.ecr_image_tag} ARCH=${var.arch}
docker push ${aws_ecr_repository.lambda-registrator.repository_url}:${local.ecr_image_tag}
EOF
}
Expand Down

0 comments on commit 3fa6a9b

Please sign in to comment.