summaryrefslogtreecommitdiffstats
path: root/deployment
diff options
context:
space:
mode:
authorLasse Kaihlavirta <l.kaihlavirt@partner.samsung.com>2020-12-17 18:16:15 +0200
committerKAPIL SINGAL <ks220y@att.com>2020-12-18 17:39:40 +0000
commita5b8a6e45e9566919b45f2995f5dee353523bd11 (patch)
treee4f93af628f4b30709982237bf7a145c44ac0bef /deployment
parentb6e7d96acfa2459c7a8c8f9fbdefcfacaf62e9f2 (diff)
Add more STAGING tags
- initial implementation tagged the verified images only with <full version>-STAGING-latest while the original maven tagging added also <minor version>-STAGING-latest and <full version>-STAGING-<timestamp>; the latter two are now added by the script as well Issue-ID: CCSDK-3019 Signed-off-by: Lasse Kaihlavirta <l.kaihlavirt@partner.samsung.com> Change-Id: Ieb06a596e01f04b45295e7c2179ba8a0088f4af6
Diffstat (limited to 'deployment')
-rwxr-xr-xdeployment/tag-docker-staging.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/deployment/tag-docker-staging.sh b/deployment/tag-docker-staging.sh
index 55d3c726..7aeb4737 100755
--- a/deployment/tag-docker-staging.sh
+++ b/deployment/tag-docker-staging.sh
@@ -20,17 +20,29 @@ ORG="onap"
IMAGES=("ccsdk-dgbuilder-image" "ccsdk-odlsli-alpine-image")
IMAGE_NAME_BASE="${DOCKER_REPOSITORY}/${ORG}/"
TAG_NAME=${UNIQUE_DOCKER_TAG}
-
+TIMESTAMP=`date +'%Y%m%dT%H%M%SZ'`
set -x
+# Create tags based on version.properties
source ../version.properties
+LATEST_MINOR_TAG=${release_name}.${sprint_number}-STAGING-latest
+LATEST_FULL_TAG=${release_name}.${sprint_number}.${feature_revision}-STAGING-latest
+LATEST_FULL_TIMESTAMP_TAG=${release_name}.${sprint_number}.${feature_revision}-STAGING-${TIMESTAMP}
+
if [ ! -z "${TAG_NAME}" ]; then
for i in ${!IMAGES[@]};
do
image=${IMAGE_NAME_BASE}${IMAGES[$i]}
- echo "Push STAGING tag for docker image ${image}"
+ echo "Push STAGING tags for docker image ${image}"
docker pull ${image}:${snapshot_version}-${TAG_NAME}
- docker tag ${image}:${snapshot_version}-${TAG_NAME} ${image}:${release_name}.${sprint_number}.${feature_revision}-STAGING-latest
- docker push ${image}:${release_name}.${sprint_number}.${feature_revision}-STAGING-latest
+
+ docker tag ${image}:${snapshot_version}-${TAG_NAME} ${image}:${LATEST_MINOR_TAG}
+ docker tag ${image}:${snapshot_version}-${TAG_NAME} ${image}:${LATEST_FULL_TAG}
+ docker tag ${image}:${snapshot_version}-${TAG_NAME} ${image}:${LATEST_FULL_TIMESTAMP_TAG}
+
+ docker push ${image}:${LATEST_MINOR_TAG}
+ docker push ${image}:${LATEST_FULL_TAG}
+ docker push ${image}:${LATEST_FULL_TIMESTAMP_TAG}
+
done
fi