[docker] Refine docker tag for build number (#1484)

This commit is contained in:
Qi Luo 2018-03-12 14:45:35 -07:00 committed by GitHub
parent 1f4ce098b5
commit 75c6f19f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ docker load < $DOCKER_IMAGE_FILE
docker_image_name=$(basename $DOCKER_IMAGE_FILE | cut -d. -f1)
remote_image_name=$REGISTRY_SERVER:$REGISTRY_PORT/$docker_image_name:$DOCKER_IMAGE_TAG
timestamp="$(date -u +%Y%m%d)"
build_version="${timestamp}.${BUILD_NUMBER}"
build_version="${timestamp}.bld-${BUILD_NUMBER}"
build_remote_image_name=$REGISTRY_SERVER:$REGISTRY_PORT/$docker_image_name:$build_version
## Add registry information as tag, so will push as latest