3 DOCKER_REPOSITORY="nexus3.onap.org:10003"
5 DATETIME_STAMP=$(date +%Y%m%dT%H%M%S);
6 VERSION_FILE="version.properties"
8 # Check for the version file
9 # If it exists, load the version from that file
10 # If not found, then use the current version as 1.1.0 for docker images
11 if [ -f "$VERSION_FILE" ]; then
13 VERSION=$release_version;
19 SNAPSHOT_TAG=${VERSION}-SNAPSHOT-${DATETIME_STAMP};
20 STAGING_TAG=${VERSION}-STAGING-${DATETIME_STAMP};
22 if [[ $PROJECT =~ $SEARCH ]] ; then
24 REPO_PATH=$DOCKER_REPOSITORY/openecomp/ajsc-aai;
26 docker tag $REPO_PATH:latest $REPO_PATH:$STAGING_TAG;
27 docker tag $REPO_PATH:latest $REPO_PATH:$SNAPSHOT_TAG;
29 if [ "$VERSION" == "1.0.0" ]; then
30 docker tag $REPO_PATH:latest $REPO_PATH:1.0-STAGING-latest;
31 docker push $REPO_PATH:1.0-STAGING-latest;
32 elif [ "$VERSION" == "1.1.0" ]; then
33 docker tag $REPO_PATH:latest $REPO_PATH:1.1-STAGING-latest;
34 docker push $REPO_PATH:1.1-STAGING-latest;
36 docker push $REPO_PATH:latest;
39 docker push $REPO_PATH:$STAGING_TAG;
40 docker push $REPO_PATH:$SNAPSHOT_TAG;
42 # Cut the prefix aai/ in example aai/model-loader
43 DOCKER_REPO_NAME=$(echo ${PROJECT} | cut -d"/" -f2-);
45 REPO_PATH=$DOCKER_REPOSITORY/openecomp/${DOCKER_REPO_NAME};
47 docker tag $REPO_PATH:latest $REPO_PATH:$STAGING_TAG;
48 docker tag $REPO_PATH:latest $REPO_PATH:$SNAPSHOT_TAG;
50 if [ "$VERSION" == "1.0.0" ]; then
51 docker tag $REPO_PATH:latest $REPO_PATH:1.0-STAGING-latest;
52 docker push $REPO_PATH:1.0-STAGING-latest;
54 docker push $REPO_PATH:latest;
57 docker push $REPO_PATH:$SNAPSHOT_TAG;
58 docker push $REPO_PATH:$STAGING_TAG;