diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2017-03-30 12:46:08 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2017-03-31 06:26:18 -0400 |
commit | 31259b8d353c0d6cd42be6b4e0b81df0bfaf7d02 (patch) | |
tree | e2b47f993ec68e563e22e18633df4d2290dc7427 | |
parent | 170cb7a8605a1a6b2a5265ab80e8aaef5399d246 (diff) |
cherry-pick ONAP changes - with mods
Change-Id: Iedce6eee966e08b2147ad88949b6385bcc25aba6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
-rw-r--r-- | .gitreview | 2 | ||||
-rwxr-xr-x | docker_build.sh | 48 | ||||
-rwxr-xr-x | docker_merge.sh | 34 | ||||
-rwxr-xr-x | docker_verify.sh | 15 | ||||
-rw-r--r-- | policy-base/Dockerfile | 2 | ||||
-rw-r--r-- | policy-db/Dockerfile | 2 | ||||
-rw-r--r-- | policy-drools/Dockerfile | 2 | ||||
-rw-r--r-- | policy-nexus/Dockerfile | 2 | ||||
-rw-r--r-- | policy-pe/Dockerfile | 2 | ||||
-rw-r--r-- | pom.xml | 2 |
10 files changed, 87 insertions, 24 deletions
@@ -1,5 +1,5 @@ [gerrit] -host=gerrit.openecomp.org +host=gerrit.onap.org port=29418 project=policy/docker.git defaultbranch=release-1.0.0 diff --git a/docker_build.sh b/docker_build.sh index 226bf947..ce0d9505 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -1,7 +1,7 @@ #!/bin/bash # echo '============== STARTING SCRIPT TO BUILD DOCKER IMAGES =================' -DOCKER_REPOSITORY=nexus3.openecomp.org:10003 +DOCKER_REPOSITORY=nexus3.onap.org:10003 MVN_VERSION=$(cat target/version) MVN_MAJMIN_VERSION=$(cut -f 1,2 -d . target/version) TIMESTAMP=$(date -u +%Y%m%dT%H%M%S) @@ -43,24 +43,58 @@ for image in policy-os policy-nexus policy-db policy-base policy-drools policy-p # # This is the local latest tagged image. The Dockerfile's need this to build images # - TAGS="--tag openecomp/policy/${image}:latest" + TAGS="--tag onap/policy/${image}:latest" # # This has the nexus repo prepended and only major/minor version with latest # - TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_MAJMIN_VERSION}-latest" + TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/onap/policy/${image}:${MVN_MAJMIN_VERSION}-latest" # # This has the nexus repo prepended and major/minor/patch version with timestamp # - TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-STAGING-${TIMESTAMP}" + TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/onap/policy/${image}:${MVN_VERSION}-STAGING-${TIMESTAMP}" echo $TAGS docker build --quiet $TAGS target/$image + + if [ $? -ne 0 ] + then + echo "Docker build failed" + docker images + exit 1 + fi done +docker images + for image in policy-nexus policy-db policy-drools policy-pe; do echo "Pushing $image" - docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:latest - docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_MAJMIN_VERSION}-latest - docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_VERSION}-STAGING-${TIMESTAMP} + +# DON'T PUSH latest for this branch +# +# docker push ${DOCKER_REPOSITORY}/onap/policy/$image:latest +# +# if [ $? -ne 0 ] +# then +# echo "Docker push failed" +# exit 1 +# +# fi + + docker push ${DOCKER_REPOSITORY}/onap/policy/$image:${MVN_MAJMIN_VERSION}-latest + + if [ $? -ne 0 ] + then + echo "Docker push failed" + exit 1 + + fi + docker push ${DOCKER_REPOSITORY}/onap/policy/$image:${MVN_VERSION}-STAGING-${TIMESTAMP} + + if [ $? -ne 0 ] + then + echo "Docker push failed" + exit 1 + + fi done diff --git a/docker_merge.sh b/docker_merge.sh index 076f84b7..bbc0ca92 100755 --- a/docker_merge.sh +++ b/docker_merge.sh @@ -1,7 +1,7 @@ #!/bin/bash # echo '============== STARTING SCRIPT TO BUILD DOCKER IMAGES =================' -DOCKER_REPOSITORY=nexus3.openecomp.org:10003 +DOCKER_REPOSITORY=nexus3.onap.org:10003 MVN_VERSION=$(cat target/version) MVN_MAJMIN_VERSION=$(cut -f 1,2 -d . target/version) TIMESTAMP=$(date -u +%Y%m%dT%H%M%S) @@ -43,26 +43,48 @@ for image in policy-os policy-nexus policy-db policy-base policy-drools policy-p # # This is the local latest tagged image. The Dockerfile's need this to build images # - TAGS="--tag openecomp/policy/${image}:latest" + TAGS="--tag onap/policy/${image}:latest" # # This has the nexus repo prepended and only major/minor version with latest # - TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_MAJMIN_VERSION}-latest" + TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/onap/policy/${image}:${MVN_MAJMIN_VERSION}-latest" # # This has the nexus repo prepended and major/minor/patch version with timestamp # - TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}" + TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/onap/policy/${image}:${MVN_VERSION}-${TIMESTAMP}" echo $TAGS docker build --quiet $TAGS target/$image + + if [ $? -ne 0 ] + then + echo "Docker build failed" + docker images + exit 1 + fi done +docker images + # # Push images # for image in policy-nexus policy-db policy-drools policy-pe; do echo "Pushing $image" - docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_MAJMIN_VERSION}-latest - docker push ${DOCKER_REPOSITORY}/openecomp/policy/$image:${MVN_VERSION}-${TIMESTAMP} + docker push ${DOCKER_REPOSITORY}/onap/policy/$image:${MVN_MAJMIN_VERSION}-latest + + if [ $? -ne 0 ] + then + echo "Docker push failed" + exit 1 + fi + + docker push ${DOCKER_REPOSITORY}/onap/policy/$image:${MVN_VERSION}-${TIMESTAMP} + + if [ $? -ne 0 ] + then + echo "Docker push failed" + exit 1 + fi done diff --git a/docker_verify.sh b/docker_verify.sh index 3c9be833..cdb42e9d 100755 --- a/docker_verify.sh +++ b/docker_verify.sh @@ -4,7 +4,7 @@ echo '============== STARTING SCRIPT TO BUILD DOCKER IMAGES =================' # # JUST VERIFY ONLY - NO PUSHING # -DOCKER_REPOSITORY=nexus3.openecomp.org:10003 +DOCKER_REPOSITORY=nexus3.onap.org:10003 MVN_VERSION=$(cat target/version) MVN_MAJMIN_VERSION=$(cut -f 1,2 -d . target/version) TIMESTAMP=$(date -u +%Y%m%dT%H%M%S) @@ -46,19 +46,26 @@ for image in policy-os policy-nexus policy-db policy-base policy-drools policy-p # # This is the local latest tagged image. The Dockerfile's need this to build images # - TAGS="--tag openecomp/policy/${image}:latest" + TAGS="--tag onap/policy/${image}:latest" # # This has the nexus repo prepended and only major/minor version with latest # - TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_MAJMIN_VERSION}-latest" + TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/onap/policy/${image}:${MVN_MAJMIN_VERSION}-latest" # # This has the nexus repo prepended and major/minor/patch version with timestamp # - TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/openecomp/policy/${image}:${MVN_VERSION}-${TIMESTAMP}" + TAGS="${TAGS} --tag ${DOCKER_REPOSITORY}/onap/policy/${image}:${MVN_VERSION}-${TIMESTAMP}" echo $TAGS docker build --quiet $TAGS target/$image + + if [ $? -ne 0 ] + then + echo "Docker build failed" + docker images + exit 1 + fi done docker images diff --git a/policy-base/Dockerfile b/policy-base/Dockerfile index 53ae4c18..e6c4b1f5 100644 --- a/policy-base/Dockerfile +++ b/policy-base/Dockerfile @@ -1,4 +1,4 @@ -FROM openecomp/policy/policy-os +FROM onap/policy/policy-os # install MariaDB client diff --git a/policy-db/Dockerfile b/policy-db/Dockerfile index 5bdfd70e..002313cd 100644 --- a/policy-db/Dockerfile +++ b/policy-db/Dockerfile @@ -1,4 +1,4 @@ -FROM openecomp/policy/policy-os +FROM onap/policy/policy-os RUN \ apt-get clean && \ diff --git a/policy-drools/Dockerfile b/policy-drools/Dockerfile index 920920e7..5a5c0ad9 100644 --- a/policy-drools/Dockerfile +++ b/policy-drools/Dockerfile @@ -1,4 +1,4 @@ -FROM openecomp/policy/policy-base +FROM onap/policy/policy-base RUN mkdir -p /opt/app/policy /tmp/policy-install && chown policy /opt/app/policy /tmp/policy-install WORKDIR /tmp/policy-install diff --git a/policy-nexus/Dockerfile b/policy-nexus/Dockerfile index 6bfd01d7..ab3e345f 100644 --- a/policy-nexus/Dockerfile +++ b/policy-nexus/Dockerfile @@ -1,4 +1,4 @@ -FROM openecomp/policy/policy-os +FROM onap/policy/policy-os # note that in following command sequence, wget exit status is 1 even on success, diff --git a/policy-pe/Dockerfile b/policy-pe/Dockerfile index 2f881b98..fe568082 100644 --- a/policy-pe/Dockerfile +++ b/policy-pe/Dockerfile @@ -1,4 +1,4 @@ -FROM openecomp/policy/policy-base +FROM onap/policy/policy-base RUN mkdir -p /opt/app/policy /tmp/policy-install && chown policy /opt/app/policy /tmp/policy-install @@ -32,7 +32,7 @@ <description>OpenECOMP Policy Docker Build</description> <properties> - <nexusproxy>https://nexus.openecomp.org</nexusproxy> + <nexusproxy>https://nexus.onap.org</nexusproxy> </properties> <repositories> |