diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-02-21 23:30:40 -0600 |
---|---|---|
committer | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-02-21 23:30:40 -0600 |
commit | 8205d4a0e1cc32d7ecfba6e62ee2ee1d6fac10b8 (patch) | |
tree | ffad84c54b68c92cbdfdabad1c2c58405f3e1d80 | |
parent | 9849908bc526807c8c11f6609dbc5cef6ab2a872 (diff) |
pull + tag base image for ci workings
Change-Id: Id8759b1ad7a2ddaccc0739074eca7b00124c45ab
Issue-ID: POLICY-1537
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
-rw-r--r-- | controlloop/build/docker-cl | 22 | ||||
-rw-r--r-- | controlloop/packages/docker-controlloop/src/main/docker/Dockerfile | 2 |
2 files changed, 15 insertions, 9 deletions
diff --git a/controlloop/build/docker-cl b/controlloop/build/docker-cl index 659c2bad9..663b1f4b1 100644 --- a/controlloop/build/docker-cl +++ b/controlloop/build/docker-cl @@ -45,7 +45,12 @@ function build { tags="${tags} --tag ${tag}" done - (set -x; docker build ${BUILD_ARGS} ${tags} ${IMAGE_PATH}) + ( + set -x; + docker pull "${DOCKER_PULL_REPOSITORY}"/onap/policy-drools + docker tag "${DOCKER_PULL_REPOSITORY}"/onap/policy-drools onap/policy-drools + docker build ${BUILD_ARGS} ${tags} ${IMAGE_PATH} + ) if [[ $? != 0 ]]; then echo -e "\nERROR: docker build\n" @@ -131,7 +136,7 @@ function run { ( set -x docker run --rm ${debugEnv} -it -v "${volume}":/tmp/policy-install/config -p 9696:9696 \ - --name pdpd-cl onap/policy-pdpd-cl ${cmd} + --name pdpd-cl onap/"${IMAGE}" ${cmd} ) return $? @@ -153,7 +158,8 @@ if [[ ! -f "${VERSION_PATH}" ]]; then fi fi -DOCKER_REPOSITORY="nexus3.onap.org:10003" +DOCKER_PULL_REPOSITORY="nexus3.onap.org:10001" +DOCKER_PUSH_REPOSITORY="nexus3.onap.org:10003" IMAGE=policy-pdpd-cl IMAGE_PATH="controlloop/packages/docker-controlloop/target/${IMAGE}" @@ -186,17 +192,17 @@ echo -e "BUILD INFO:" echo -e "\timage: ${IMAGE}" echo -e "\timage-path: ${IMAGE_PATH}" echo -e "\timage: ${IMAGE}" -echo -e "\tregistry: ${DOCKER_REPOSITORY}" +echo -e "\tregistry: ${DOCKER_PUSH_REPOSITORY}" echo -e "\tpatch: ${VERSION}" echo -e "\tversion: ${MAJOR_MINOR_VERSION}" echo -e "\ttimestamp: ${TIMESTAMP}" echo TAG_LATEST="onap/${IMAGE}:latest" -TAG_REPO_LATEST="${DOCKER_REPOSITORY}/onap/${IMAGE}:latest" -TAG_REPO_VERSION_LATEST="${DOCKER_REPOSITORY}/onap/${IMAGE}:${MAJOR_MINOR_VERSION}-latest" -TAG_REPO_VERSION_TIMESTAMP="${DOCKER_REPOSITORY}/onap/${IMAGE}:${VERSION}-${TIMESTAMP}Z" -TAG_REPO_VERSION_STAGING_TIMESTAMP="${DOCKER_REPOSITORY}/onap/${IMAGE}:${VERSION}-STAGING-${TIMESTAMP}Z" +TAG_REPO_LATEST="${DOCKER_PUSH_REPOSITORY}/onap/${IMAGE}:latest" +TAG_REPO_VERSION_LATEST="${DOCKER_PUSH_REPOSITORY}/onap/${IMAGE}:${MAJOR_MINOR_VERSION}-latest" +TAG_REPO_VERSION_TIMESTAMP="${DOCKER_PUSH_REPOSITORY}/onap/${IMAGE}:${VERSION}-${TIMESTAMP}Z" +TAG_REPO_VERSION_STAGING_TIMESTAMP="${DOCKER_PUSH_REPOSITORY}/onap/${IMAGE}:${VERSION}-STAGING-${TIMESTAMP}Z" VERIFY_BUILD_TAGS="${TAG_LATEST} ${TAG_REPO_VERSION_LATEST} ${TAG_REPO_VERSION_TIMESTAMP}" diff --git a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile index 7bb2006cf..f718b1601 100644 --- a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile +++ b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM onap/policy-drools:1.4-SNAPSHOT-latest +FROM onap/policy-drools ARG BUILD_VERSION_APP_CL=${BUILD_VERSION_APP_CL} ENV BUILD_VERSION_APP_CL=${BUILD_VERSION_APP_CL} |