diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2019-02-22 15:25:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-02-22 15:25:15 +0000 |
commit | 5cd902ff9e11c0f401e0633a32902a63f18596ba (patch) | |
tree | 4ac51fe06c41db92f4c5938f7125a8db9c101ec1 /controlloop/build | |
parent | 98ae013cb3db7c3a696044e2f9a46a545f891942 (diff) | |
parent | 8205d4a0e1cc32d7ecfba6e62ee2ee1d6fac10b8 (diff) |
Merge "pull + tag base image for ci workings"
Diffstat (limited to 'controlloop/build')
-rw-r--r-- | controlloop/build/docker-cl | 22 |
1 files changed, 14 insertions, 8 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}" |