aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/snapshot-jjb-container
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2018-04-03 17:13:36 +0200
committerStephane Desneux <stephane.desneux@iot.bzh>2018-04-03 17:13:36 +0200
commit8dc39448476b1f2020c05e5d4f50c7f5f7338605 (patch)
tree27938409147a11ac3718acfa6b2bbb685c7bf98b /jjb/snapshot-jjb-container
parent59723cb364cd123151d8f647a22f52145ffb8646 (diff)
jjb/snapshot-jjb-container: add BUILD_ID in docker image version
Bug-AGL: SPEC-979, SPEC-1379 Change-Id: I2d5032f75672978c7dfd6b43159cd170efd8fb38 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'jjb/snapshot-jjb-container')
-rw-r--r--jjb/snapshot-jjb-container/include-createcontainer.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/jjb/snapshot-jjb-container/include-createcontainer.sh b/jjb/snapshot-jjb-container/include-createcontainer.sh
index fec19db6..a01ac9f0 100644
--- a/jjb/snapshot-jjb-container/include-createcontainer.sh
+++ b/jjb/snapshot-jjb-container/include-createcontainer.sh
@@ -10,8 +10,12 @@ cd docker-worker-generator/
# dump where we are in jenkins log :)
git log -n 1
-make build
-make export
+# add Jenkins BUILD_ID in image version
+FULLVER=$(cat VERSION)-${BUILD_ID}
+
+# override VERSION variable when invoking make to build and export docker image
+make VERSION=$FULLVER build
+make VERSION=$FULLVER export
ls
@@ -19,6 +23,8 @@ echo "###########################"
mkdir -p ../container
mv docker_agl_worker*.tar.xz ../container/
+
+# workaround due to SPEC-979
ln -s $(basename ../container/docker_agl_worker*.tar.xz) ../container/docker_agl_worker-latest.tar.xz
ls ../container