Fix image name of vfc-gvnfm-vnflcm
[vfc/gvnfm/vnflcm.git] / lcm / docker / build_image.sh
1 #!/bin/bash
2
3 BUILD_ARGS="--no-cache"
4 ORG="onap"
5 VERSION="1.0.0-SNAPSHOT"
6 PROJECT="vfc"
7 IMAGE="vnflcm"
8 DOCKER_REPOSITORY="nexus3.onap.org:10003"
9 IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
10
11 if [ $HTTP_PROXY ]; then
12     BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}"
13 fi
14 if [ $HTTPS_PROXY ]; then
15     BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
16 fi
17
18 function build_vnflcm {
19     docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest .
20 }
21
22 function push_vnflcm {
23     docker push ${IMAGE_NAME}:${VERSION}
24     docker push ${IMAGE_NAME}:latest
25 }
26
27 build_vnflcm
28 push_vnflcm
29