blob: 0c843f790a82cd65c6b4a07a2b03e701341140b2 [file] [log] [blame]
JulienBea247e9f2017-03-08 13:07:21 -08001#!/bin/bash
2
JulienBed45ff952017-03-28 02:54:51 -07003if [ -z "$X" ];
JulienBea247e9f2017-03-08 13:07:21 -08004then
JulienBed45ff952017-03-28 02:54:51 -07005 echo "Error: no X version provided"
JulienBea247e9f2017-03-08 13:07:21 -08006 exit 1
7fi
8
JulienBed45ff952017-03-28 02:54:51 -07009if [ -z "$Y" ];
JulienBea247e9f2017-03-08 13:07:21 -080010then
JulienBed45ff952017-03-28 02:54:51 -070011 echo "Error: no Y version provided"
12 exit 1
13fi
14
15if [ -z "$Z" ];
16then
17 echo "Error: no Z version provided"
JulienBea247e9f2017-03-08 13:07:21 -080018 exit 1
19fi
20
21if [ -z "$PROJECT" ];
22then
23 echo "Error: no project provided"
24 exit 1
25fi
26
Jeremy Phelps48028ab2017-03-28 15:38:24 -050027RELEASE_REPOSITORY="nexus3.onap.org:10002"
28SNAPSHOT_REPOSITORY="nexus3.onap.org:10003"
JulienBed45ff952017-03-28 02:54:51 -070029STAGING_IMAGE="openecomp/$PROJECT:$X.$Y-STAGING-latest"
30RELEASE_IMAGE="openecomp/$PROJECT:$X.$Y.$Z"
JulienBea247e9f2017-03-08 13:07:21 -080031
32docker pull "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE"
33docker tag "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE" "$RELEASE_REPOSITORY/$RELEASE_IMAGE"
Jeremy Phelps48028ab2017-03-28 15:38:24 -050034docker push "$RELEASE_REPOSITORY/$RELEASE_IMAGE"