Corrected Docker Files
[optf/has.git] / conductor / docker / push-dockers.sh
1 #!/bin/bash \r
2 BUILD_ARGS="--no-cache" \r
3 ORG="onap" \r
4 VERSION="1.1.0" \r
5 PROJECT="optf" \r
6 IMAGE="api" \r
7 DOCKER_REPOSITORY="nexus3.onap.org:10003" \r
8 IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" \r
9 TIMESTAMP=$(date +"%Y%m%dT%H%M%S") \r
10  \r
11 if [ $HTTP_PROXY ]; then \r
12 BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}" \r
13 fi \r
14 if [ $HTTPS_PROXY ]; then \r
15     BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}" \r
16 fi \r
17  \r
18 function tag {\r
19      echo "Tagging !!!"\r
20      docker tag api "nexus3.onap.org:10003/onap/optf/api"\r
21      docker tag data "nexus3.onap.org:10003/onap/optf/data"\r
22      docker tag controller "nexus3.onap.org:10003/onap/optf/controller"\r
23      docker tag solver "nexus3.onap.org:10003/onap/optf/solver"\r
24      docker tag reservation "nexus3.onap.org:10003/onap/optf/reservation"\r
25 }\r
26 \r
27 \r
28 function push_image { \r
29      echo "Start push ${IMAGE_NAME}:latest" \r
30      \r
31      tag\r
32      docker push "nexus3.onap.org:10003/onap/optf/api"\r
33      docker push "nexus3.onap.org:10003/onap/optf/data"\r
34      docker push "nexus3.onap.org:10003/onap/optf/controller"\r
35      docker push "nexus3.onap.org:10003/onap/optf/solver"\r
36      docker push "nexus3.onap.org:10003/onap/optf/reservation"\r
37      \r
38      #docker push ${IMAGE_NAME}:latest \r
39      #push_image_tag ${IMAGE_NAME}:${VERSION}-SNAPSHOT-latest \r
40      #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-latest \r
41      #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-${TIMESTAMP} \r
42  } \r
43 push_image\r