← Back to team overview

wordpress-charmers team mailing list archive

[Merge] ~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:focal into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master

 

Tom Haddon has proposed merging ~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:focal into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master.

Commit message:
Allow builds of the image on focal with a Makefile arg



Requested reviews:
  Wordpress Charmers (wordpress-charmers)

For more details, see:
https://code.launchpad.net/~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder/+merge/378237

Allow builds of the image on focal with a Makefile arg


-- 
Your team Wordpress Charmers is requested to review the proposed merge of ~mthaddon/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:focal into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master.
diff --git a/Dockerfile b/Dockerfile
index ae922d5..24b6b0b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,6 @@
-FROM ubuntu:bionic
+ARG DIST_RELEASE
+
+FROM ubuntu:${DIST_RELEASE}
 
 LABEL maintainer="wordpress-charmers@xxxxxxxxxxxxxxxxxxx"
 
diff --git a/Makefile b/Makefile
index df973a9..e53bf20 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+DIST_RELEASE ?= bionic
+
 build: lint deps
 	@echo "Fetching plugins and themes."
 	@tox -e fetch
@@ -5,12 +7,13 @@ build: lint deps
 	@docker build \
 		--no-cache=true \
 		--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
+		--build-arg DIST_RELEASE=$(DIST_RELEASE)
 		--build-arg HTTPS_PROXY=$(HTTPS_PROXY) \
-		-t wordpress:bionic-latest \
+		-t wordpress:$(DIST_RELEASE)-latest \
 		.
 	@echo "Pushing to the prod-is-external registry."
-	@docker tag wordpress:bionic-latest prod-is-external.docker-registry.canonical.com/wordpress:bionic-latest
-	@docker push prod-is-external.docker-registry.canonical.com/wordpress:bionic-latest
+	@docker tag wordpress:$(DIST_RELEASE)-latest prod-is-external.docker-registry.canonical.com/wordpress:$(DIST_RELEASE)-latest
+	@docker push prod-is-external.docker-registry.canonical.com/wordpress:$(DIST_RELEASE)-latest
 
 deps:
 	@echo "Checking dependencies are present"

Follow ups