From 3712306dffdb3930bf747d122ee7ab90fcdd901d Mon Sep 17 00:00:00 2001 From: Duane Bronson Date: Thu, 5 Jan 2023 16:04:56 -0500 Subject: [PATCH 1/3] remove hard coded path from Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 455ac4c4..c9b782c3 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ verticalab-build: etc/vertica-demo.conf # the vertica docker hub images. .PHONY: verticalab-push verticalab-push: etc/vertica-demo.conf - @source etc/vertica-demo.conf; \ + source etc/vertica-demo.conf; \ if [[ $$VERTICALAB_IMG_VERSION == latest ]] ; then \ echo "Set a version number for VERTICALAB_IMG_VERSION in etc/vertica-demo.conf"; \ exit 1; \ @@ -125,7 +125,7 @@ verticalab-push: etc/vertica-demo.conf docker context create mycontext; \ docker buildx create mycontext --name mybuilder; \ docker buildx inspect --bootstrap; \ - docker buildx build --platform=linux/arm64,linux/amd64 --build-arg PYTHON_VERSION=$$PYTHON_VERSION -t "vertica/$$VERTICALAB_IMG:$$VERTICALAB_IMG_VERSION" "$${SECOND_TAG[@]}" /Users/bronson/src/vertica-demo/docker-verticapy/ --push + docker buildx build --platform=linux/arm64,linux/amd64 --build-arg PYTHON_VERSION=$$PYTHON_VERSION -t "vertica/$$VERTICALAB_IMG:$$VERTICALAB_IMG_VERSION" "$${SECOND_TAG[@]}" $(PWD)/docker-verticapy/ --push .PHONY: verticalab-install verticalab-install: etc/vertica-demo.conf ## Install the image to use for the demo From 2d4ab8102c03142ff49583a67be9b98776427483 Mon Sep 17 00:00:00 2001 From: Duane Bronson Date: Thu, 5 Jan 2023 16:45:21 -0500 Subject: [PATCH 2/3] modifying the release instructions After running through the release process, I wanted to make the release procedure easier --- Makefile | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index c9b782c3..4b2060f6 100644 --- a/Makefile +++ b/Makefile @@ -3,22 +3,25 @@ # Release Engineering: # This is the version of the dockerhub image for the Jupyter Notebook that -# is built/cached from this code base. +# is built/cached from this code base. # Demo Users : -# 1) check out a stable released version. -# 2) "make verticalab-install" -# Developers of Vertica-Demo : +# 1) check out a stable released version. +# 2) "make all" +# Developers of Vertica-Demo : # 1) "git checkout -b " to create a git branch and checkout -# 2) set the version number in etc/vertica-demo.conf (VERTICALAB_IMG_VERSION=v0.1) +# 2) set the version number in etc/vertica-demo.conf (VERTICALAB_IMG_VERSION=anything) # 3) make the desired changes verticalab demos # 4) build with "make verticalab-build" # 5) start with "make verticalab-start" and open the URL provided # 6) test changes and cycle back to step 3 if needed # 7) submit changes with git commit, git push, create PR, get approval, merge to main # Release process : -# 1) Use the above developer steps to set the desired version -# 2) create a release in github with the tag set to the version (i.e., v0.1) -# 3) create a release in docker hub with "VERTICALAB_LATEST=1 make verticalab-push" +# 1) create a git branch and checkout (git checkout -b Release_v0.0.0) +# 2) set the version number in etc/vertica-demo.conf* (VERTICALAB_IMG_VERSION=v0.0.0) +# 3) create a release in github with the tag set to the version +# 4) docker login +# 5) create a release in docker hub with "make verticalab-push" +# 6) move the latest release to this version with "make verticalab-push-latest" QUERY?=select version(); SHELL:=/bin/bash @@ -118,14 +121,15 @@ verticalab-push: etc/vertica-demo.conf echo "Set a version number for VERTICALAB_IMG_VERSION in etc/vertica-demo.conf"; \ exit 1; \ fi; \ - declare -a SECOND_TAG=(); \ - if (($$VERTICALAB_LATEST)); then \ - SECOND_TAG+=(-t "vertica/$$VERTICALAB_IMG:latest"); \ - fi; \ docker context create mycontext; \ docker buildx create mycontext --name mybuilder; \ docker buildx inspect --bootstrap; \ - docker buildx build --platform=linux/arm64,linux/amd64 --build-arg PYTHON_VERSION=$$PYTHON_VERSION -t "vertica/$$VERTICALAB_IMG:$$VERTICALAB_IMG_VERSION" "$${SECOND_TAG[@]}" $(PWD)/docker-verticapy/ --push + docker buildx build --platform=linux/arm64,linux/amd64 --build-arg PYTHON_VERSION=$$PYTHON_VERSION -t "vertica/$$VERTICALAB_IMG:$$VERTICALAB_IMG_VERSION" $(PWD)/docker-verticapy/ --push + +verticalab-push-latest: etc/vertica-demo.conf + # This should use the cache from the last buildx and just push the new tag. + source etc/vertica-demo.conf; \ + docker buildx build --platform=linux/arm64,linux/amd64 --build-arg PYTHON_VERSION=$$PYTHON_VERSION -t "vertica/$$VERTICALAB_IMG:latest" /Users/bronson/src/vertica-demo/docker-verticapy/ --push .PHONY: verticalab-install verticalab-install: etc/vertica-demo.conf ## Install the image to use for the demo From 07a2bd3dc01f51978546ed547bd5f7267d617feb Mon Sep 17 00:00:00 2001 From: Duane Bronson Date: Fri, 6 Jan 2023 11:38:06 -0500 Subject: [PATCH 3/3] remove another hard coded path that was copy-pasted from before the first one was removed. Ugh. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4b2060f6..37c97d12 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ verticalab-push: etc/vertica-demo.conf verticalab-push-latest: etc/vertica-demo.conf # This should use the cache from the last buildx and just push the new tag. source etc/vertica-demo.conf; \ - docker buildx build --platform=linux/arm64,linux/amd64 --build-arg PYTHON_VERSION=$$PYTHON_VERSION -t "vertica/$$VERTICALAB_IMG:latest" /Users/bronson/src/vertica-demo/docker-verticapy/ --push + docker buildx build --platform=linux/arm64,linux/amd64 --build-arg PYTHON_VERSION=$$PYTHON_VERSION -t "vertica/$$VERTICALAB_IMG:latest" $(PWD)/docker-verticapy/ --push .PHONY: verticalab-install verticalab-install: etc/vertica-demo.conf ## Install the image to use for the demo