From 5bdcfe2e4aec05ea0840f7b4bbef5bdcaec79582 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Wed, 28 Oct 2020 17:19:12 +0100 Subject: [PATCH] =?UTF-8?q?Pin=20version=20of=20ACI=20sidecar=20image,=20s?= =?UTF-8?q?o=20that=20we=20don=E2=80=99t=20affect=20prod=20users=20when=20?= =?UTF-8?q?re-publishing=20:latest.=20Makefile=20includes=20a=20target=20t?= =?UTF-8?q?o=20publish=20new=20versions,=20ensuring=20we=20don=E2=80=99t?= =?UTF-8?q?=20override=20an=20existing=20image=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guillaume Tardif --- Makefile | 6 ++++++ aci/convert/convert.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 48e4a0379..33d0161e1 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,12 @@ validate: validate-go-mod validate-headers ## Validate sources pre-commit: cli test e2e-local lint validate +build-aci-sidecar: ## build aci sidecar image locally and tag it with make build-aci-sidecar tag=0.1 + docker build -t docker/aci-hostnames-sidecar:$(tag) aci/etchosts + +publish-aci-sidecar: build-aci-sidecar ## build & publish aci sidecar image with make publish-aci-sidecar tag=0.1 + docker pull docker/aci-hostnames-sidecar:$(tag) && echo "Failure: Tag already exists" || docker push docker/aci-hostnames-sidecar:$(tag) + clean-aci-e2e: ## Make sure no ACI tests are currently runnnig in the CI when invoking this. Delete ACI E2E tests resources that might have leaked when ctrl-C E2E tests. az group list | jq '.[].name' | grep E2E-Test | xargs -n1 az group delete -y --no-wait -g diff --git a/aci/convert/convert.go b/aci/convert/convert.go index 532df6787..6397fe84f 100644 --- a/aci/convert/convert.go +++ b/aci/convert/convert.go @@ -42,7 +42,7 @@ const ( // ComposeDNSSidecarName name of the dns sidecar container ComposeDNSSidecarName = "aci--dns--sidecar" - dnsSidecarImage = "docker/aci-hostnames-sidecar" + dnsSidecarImage = "docker/aci-hostnames-sidecar:1.0" ) // ToContainerGroup converts a compose project into a ACI container group