Enable build of all docker images
Currently, the docker image publish workflow only builds
updated Docker images. Build and publish all Docker images
when GERRIT_REFSPEC is empty.
Change-Id: I494f9eec4097005147b707714cddb3b715ad5298
Signed-off-by: Saheer Babu <saheer.babu@arm.com>
diff --git a/ci-dockerfiles-deployment/builders.sh b/ci-dockerfiles-deployment/builders.sh
index 4c5e219..1183083 100644
--- a/ci-dockerfiles-deployment/builders.sh
+++ b/ci-dockerfiles-deployment/builders.sh
@@ -47,9 +47,15 @@
df -h
-git_previous_commit=$(git rev-parse HEAD~1)
-git_commit=$(git rev-parse HEAD)
-files=$(git diff --name-only ${git_previous_commit} ${git_commit})
+#if GERRIT_REFSPEC is not set build all Docker images
+if [ -z "$GERRIT_REFSPEC" ]; then
+ files=$(find . -type f -name build.sh)
+else
+ git_previous_commit=$(git rev-parse HEAD~1)
+ git_commit=$(git rev-parse HEAD)
+ files=$(git diff --name-only ${git_previous_commit} ${git_commit})
+fi
+
echo Changes in: ${files}
changed_dirs=$(dirname ${files}|sort -u)