JulienBe | a247e9f | 2017-03-08 13:07:21 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
JulienBe | d45ff95 | 2017-03-28 02:54:51 -0700 | [diff] [blame] | 3 | if [ -z "$X" ]; |
JulienBe | a247e9f | 2017-03-08 13:07:21 -0800 | [diff] [blame] | 4 | then |
JulienBe | d45ff95 | 2017-03-28 02:54:51 -0700 | [diff] [blame] | 5 | echo "Error: no X version provided" |
JulienBe | a247e9f | 2017-03-08 13:07:21 -0800 | [diff] [blame] | 6 | exit 1 |
| 7 | fi |
| 8 | |
JulienBe | d45ff95 | 2017-03-28 02:54:51 -0700 | [diff] [blame] | 9 | if [ -z "$Y" ]; |
JulienBe | a247e9f | 2017-03-08 13:07:21 -0800 | [diff] [blame] | 10 | then |
JulienBe | d45ff95 | 2017-03-28 02:54:51 -0700 | [diff] [blame] | 11 | echo "Error: no Y version provided" |
| 12 | exit 1 |
| 13 | fi |
| 14 | |
| 15 | if [ -z "$Z" ]; |
| 16 | then |
| 17 | echo "Error: no Z version provided" |
JulienBe | a247e9f | 2017-03-08 13:07:21 -0800 | [diff] [blame] | 18 | exit 1 |
| 19 | fi |
| 20 | |
| 21 | if [ -z "$PROJECT" ]; |
| 22 | then |
| 23 | echo "Error: no project provided" |
| 24 | exit 1 |
| 25 | fi |
| 26 | |
Jeremy Phelps | 48028ab | 2017-03-28 15:38:24 -0500 | [diff] [blame] | 27 | RELEASE_REPOSITORY="nexus3.onap.org:10002" |
| 28 | SNAPSHOT_REPOSITORY="nexus3.onap.org:10003" |
JulienBe | d45ff95 | 2017-03-28 02:54:51 -0700 | [diff] [blame] | 29 | STAGING_IMAGE="openecomp/$PROJECT:$X.$Y-STAGING-latest" |
| 30 | RELEASE_IMAGE="openecomp/$PROJECT:$X.$Y.$Z" |
JulienBe | a247e9f | 2017-03-08 13:07:21 -0800 | [diff] [blame] | 31 | |
| 32 | docker pull "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE" |
| 33 | docker tag "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE" "$RELEASE_REPOSITORY/$RELEASE_IMAGE" |
Jeremy Phelps | 48028ab | 2017-03-28 15:38:24 -0500 | [diff] [blame] | 34 | docker push "$RELEASE_REPOSITORY/$RELEASE_IMAGE" |