[VOL-5063] - Fix stale voltctl binary install by docker.
docker/Dockerfile.voltctl
-------------------------
o voltctl v1.6.1 installed by hardcoded path.
- v1.8.3 released, v1.9.1 latest available (release pending).
o Download into a temp file to avoid contention or access problems.
o Split download and install into two distinct steps:
- Helps create a tiny window for installation.
- Binary corrupt/unusable while downloading.
o Plenty of comments added.
o Long term revisit this logic, branch==master should retrieve/install
latest tagged release binary. Release cycle needs to retrieve a
frozen binary but only on the release branch/tag.
Change-Id: I6f301b934b67dcd3061c7b48386d016ab62e8a82
diff --git a/Makefile b/Makefile
index 75f58a1..24d6433 100644
--- a/Makefile
+++ b/Makefile
@@ -856,8 +856,21 @@
voltctl-docker-image-build:
cd docker && docker build -t opencord/voltctl:local -f Dockerfile.voltctl .
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
voltctl-docker-image-install-kind:
@if [ "`kind get clusters | grep kind`" = '' ]; then echo "no kind cluster found" && exit 1; fi
kind load docker-image --name `kind get clusters | grep kind` opencord/voltctl:local
+## -----------------------------------------------------------------------
+## Intent: [yuck] replace with a standalone reusable installer 4script
+## -----------------------------------------------------------------------
+.PHONY: voltctl-download-url
+voltctl-download-url:
+ curl --silent https://api.github.com/repos/opencord/voltctl/releases/latest \
+ | grep 'browser_download_url' \
+ | grep 'linux-amd64'
+
+# [latest] https://github.com/opencord/voltctl/releases/download/untagged-cd611c39178f25b95a87/voltctl-1.9.1-linux-amd64
+
# [EOF]