[gerrit]
-host=gerrit.openecomp.org
+host=gerrit.onap.org
port=29418
project=policy/docker.git
defaultbranch=release-1.0.0
#!/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)
#
# 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
#!/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)
#
# 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
#
# 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)
#
# 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
-FROM openecomp/policy/policy-os
+FROM onap/policy/policy-os
# install MariaDB client
-FROM openecomp/policy/policy-os
+FROM onap/policy/policy-os
RUN \
apt-get clean && \
-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
-FROM openecomp/policy/policy-os
+FROM onap/policy/policy-os
# note that in following command sequence, wget exit status is 1 even on success,
-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
<description>OpenECOMP Policy Docker Build</description>
<properties>
- <nexusproxy>https://nexus.openecomp.org</nexusproxy>
+ <nexusproxy>https://nexus.onap.org</nexusproxy>
</properties>
<repositories>