diff options
-rw-r--r-- | jjb/global-templates-docker.yaml | 10 | ||||
-rw-r--r-- | shell/docker-build.sh | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/jjb/global-templates-docker.yaml b/jjb/global-templates-docker.yaml index 96aed9d50..8145efacd 100644 --- a/jjb/global-templates-docker.yaml +++ b/jjb/global-templates-docker.yaml @@ -112,6 +112,7 @@ DOCKER_NAME={docker_name} DOCKER_ROOT={docker_root} DOCKER_TAG={docker_tag} + BUILD_MODE=SNAPSHOT DOCKERREGISTRY={docker_registry} # Do the docker build - shell: !include-raw: ../shell/docker-build.sh @@ -151,6 +152,7 @@ DOCKER_NAME={docker_name} DOCKER_ROOT={docker_root} DOCKER_TAG={docker_tag} + BUILD_MODE=SNAPSHOT DOCKERREGISTRY={docker_registry} # Do the docker build - shell: !include-raw: ../shell/docker-build.sh @@ -171,7 +173,7 @@ # branch: git branch (eg. stable/lithium or master) <<: *docker_job_boiler_plate - docker_registry: '$DOCKER_REGISTRY:10004' + docker_registry: '$DOCKER_REGISTRY:10003' scm: - lf-infra-gerrit-scm: @@ -196,6 +198,7 @@ DOCKER_ROOT={docker_root} DOCKER_TAG={docker_tag} DOCKERREGISTRY={docker_registry} + BUILD_MODE=STAGING # Do the docker build - shell: !include-raw: ../shell/snapshot-strip.sh @@ -241,6 +244,7 @@ DOCKER_ROOT={docker_root} DOCKER_TAG={docker_tag} DOCKERREGISTRY={docker_registry} + BUILD_MODE=SNAPSHOT # Do the docker build - shell: !include-raw: ../shell/docker-build.sh - inject: @@ -280,6 +284,7 @@ DOCKER_ROOT={docker_root} DOCKER_TAG={docker_tag} DOCKERREGISTRY={docker_registry} + BUILD_MODE=SNAPSHOT # Do the docker build - shell: !include-raw: ../shell/docker-build.sh - inject: @@ -299,7 +304,7 @@ # branch: git branch (eg. stable/lithium or master) <<: *docker_job_boiler_plate - docker_registry: '$DOCKER_REGISTRY:10004' + docker_registry: '$DOCKER_REGISTRY:10003' scm: - lf-infra-gerrit-scm: @@ -324,6 +329,7 @@ DOCKER_ROOT={docker_root} DOCKER_TAG={docker_tag} DOCKERREGISTRY={docker_registry} + BUILD_MODE=STAGING # Do the docker build - shell: !include-raw: ../shell/snapshot-strip.sh diff --git a/shell/docker-build.sh b/shell/docker-build.sh index 080a8b638..1cb71d3ff 100644 --- a/shell/docker-build.sh +++ b/shell/docker-build.sh @@ -6,13 +6,13 @@ set -e -o pipefail FULL_DATE=`date +'%Y%m%dT%H%M%S'` IMAGE_VERSION=`xmlstarlet sel -N "x=http://maven.apache.org/POM/4.0.0" -t -v "/x:project/x:version" pom.xml | cut -c1-5` -case "$DOCKERREGISTRY" in - "$DOCKER_REGISTRY:10004") +case "$BUILD_MODE" in + "STAGING") DOCKER_TAG="$IMAGE_VERSION"-STAGING-"$FULL_DATE"Z DOCKER_LATEST_TAG="$IMAGE_VERSION"-STAGING-latest echo "Using tags $DOCKER_TAG and $DOCKER_LATEST_TAG" ;; - "$DOCKER_REGISTRY:10003") + "SNAPSHOT") DOCKER_TAG="$IMAGE_VERSION"-SNAPSHOT-"$FULL_DATE"Z DOCKER_LATEST_TAG="$IMAGE_VERSION"-SNAPSHOT-latest echo "Using tags $DOCKER_TAG and $DOCKER_LATEST_TAG" |