blob: 3cb67cf95f00c7f6b5d5b685079a8fd6b9bdfa7e [file] [log] [blame]
JulienBea247e9f2017-03-08 13:07:21 -08001#!/bin/bash
2
3if [ -z "$VERSION" ];
4then
5 echo "Error: no version provided"
6 exit 1
7fi
8
9if [ -z "$TIMESTAMP" ];
10then
11 echo "Error: no timestamp provided"
12 exit 1
13fi
14
15if [ -z "$PROJECT" ];
16then
17 echo "Error: no project provided"
18 exit 1
19fi
20
21RELEASE_REPOSITORY="nexus3.openecomp.org:10002"
22SNAPSHOT_REPOSITORY="nexus3.openecomp.org:10003"
23STAGING_IMAGE="openecomp/$PROJECT:$VERSION-STAGING-$TIMESTAMP"
24RELEASE_IMAGE="openecomp/$PROJECT:$VERSION"
25
26docker pull "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE"
27docker tag "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE" "$RELEASE_REPOSITORY/$RELEASE_IMAGE"
28docker push "$RELEASE_REPOSITORY/$RELEASE_IMAGE"