Report CLI version in scripts that invoke docker 30/63830/1
authorLott, Christopher (cl778h) <cl778h@att.com>
Wed, 29 Apr 2020 17:58:30 +0000 (13:58 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Wed, 29 Apr 2020 17:58:30 +0000 (13:58 -0400)
Extend scripts that invoke the docker CLI to report the version
by invoking `docker --version`.  Also add echo command to report
end of script where it was missing.  Includes docker-build.sh,
docker-login.sh, docker-push.sh and release-job.sh.  No functional
change to any script behavior, just a line of extra output.

Change-Id: Iac65366c7810d6f96fecb84267aa4c1dd9027dc1
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
releasenotes/notes/show-docker-version-d8f6f22243127194.yaml [new file with mode: 0644]
shell/docker-build.sh
shell/docker-login.sh
shell/docker-push.sh
shell/release-job.sh

diff --git a/releasenotes/notes/show-docker-version-d8f6f22243127194.yaml b/releasenotes/notes/show-docker-version-d8f6f22243127194.yaml
new file mode 100644 (file)
index 0000000..7b9c6b8
--- /dev/null
@@ -0,0 +1,8 @@
+---
+fixes:
+  - |
+    Extend scripts that invoke the docker CLI to report the version
+    by invoking `docker --version`.  Also add echo command to report
+    end of script where it was missing.  Includes docker-build.sh,
+    docker-login.sh, docker-push.sh and release-job.sh.  No functional
+    change to any script behavior, just a line of extra output.
index 8453dcd..0e8b709 100644 (file)
@@ -12,10 +12,12 @@ echo "---> docker-build.sh"
 # Docker image build script
 
 set -eu -o pipefail
-echo "---> Building image: $CONTAINER_PUSH_REGISTRY/$DOCKER_NAME:$DOCKER_IMAGE_TAG"
+docker --version
+echo "Building image: $CONTAINER_PUSH_REGISTRY/$DOCKER_NAME:$DOCKER_IMAGE_TAG"
 cd "$DOCKER_ROOT"
 # DOCKER_IMAGE_TAG variable gets constructed after lf-docker-get-container-tag builder step
 # is executed. It constructs the image name and the appropriate tag in the same varaiable.
 docker_build_command="docker build ${DOCKER_ARGS:-} -t "$CONTAINER_PUSH_REGISTRY/$DOCKER_NAME:$DOCKER_IMAGE_TAG" ."
 echo "$docker_build_command"
 eval "$docker_build_command" | tee "$WORKSPACE/docker_build_log.txt"
+echo "---> docker-build.sh ends"
index ca4758f..72d420f 100644 (file)
@@ -8,7 +8,6 @@
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
-echo "---> docker-login.sh"
 # Log into a custom hosted docker registry and / or docker.io
 
 # $DOCKER_REGISTRY : Optional
@@ -43,7 +42,7 @@ echo "---> docker-login.sh"
 #2) User logging into docker.io with docker version <17.06.0  email optional
 #3) User logging into docker.io wiht docker version >= 17.06.0 cannot use email flag
 
-
+echo "---> docker-login.sh"
 # Ensure we fail the job if any steps fail
 set -eu -o pipefail
 
@@ -117,3 +116,5 @@ then
         do_login "$DOCKERHUB_REGISTRY" none
     fi
 fi
+
+echo "---> docker-login.sh ends"
index fa30ea0..340bc2d 100644 (file)
@@ -13,7 +13,9 @@ echo "---> docker-push.sh"
 
 # Ensure we fail the job if any steps fail
 set -ue -o pipefail
-echo "---> Pushing image: $CONTAINER_PUSH_REGISTRY/$DOCKER_NAME:$DOCKER_IMAGE_TAG"
+docker --version
+echo "Pushing image: $CONTAINER_PUSH_REGISTRY/$DOCKER_NAME:$DOCKER_IMAGE_TAG"
 docker_push_command="docker push "$CONTAINER_PUSH_REGISTRY/$DOCKER_NAME:$DOCKER_IMAGE_TAG""
 echo "$docker_push_command"
 eval "$docker_push_command"
+echo "---> docker-push.sh ends"
index 3a0294e..5276a68 100644 (file)
@@ -335,6 +335,7 @@ nexus_release(){
 
 container_release_file(){
     echo "INFO: Processing container release"
+    docker --version
     local lfn_umbrella
     lfn_umbrella="$(echo "$GERRIT_URL" | awk -F"." '{print $2}')"