diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2019-04-26 12:12:47 -0500 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2019-04-26 12:12:47 -0500 |
commit | 74f5aea3da13f47573bff055397c5bbe5e1db55f (patch) | |
tree | 04b9b58d0f9651be1151adcb7e464de54a57a57f | |
parent | e32d0fac919c8cc5657496a16c300877bd29621e (diff) |
New BUILD_VERSION needed as fixed in parent image
BUILD_VERSION could not be used in ENV variable
as it is cooked in the base image itself. Need to
create a new one to reflect the drools build to
get by.
Some minor additional changes as to exit shell when
a docker command fails for clarity when executing
these operations is added as well.
Change-Id: Ic8dfc03bc0563c088d55b1991a0f8c431ab0fab2
Issue-ID: INT-998
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 files changed, 5 insertions, 3 deletions
diff --git a/controlloop/build/docker-cl b/controlloop/build/docker-cl index 7fd0c53a8..6a5363366 100644 --- a/controlloop/build/docker-cl +++ b/controlloop/build/docker-cl @@ -48,6 +48,7 @@ function build { chmod 755 "${IMAGE_PATH}"/*.sh ( + set -e set -x; docker pull "${DOCKER_PULL_REPOSITORY}"/onap/policy-drools:"${MAJOR_MINOR_VERSION}"-latest docker tag "${DOCKER_PULL_REPOSITORY}"/onap/policy-drools:"${MAJOR_MINOR_VERSION}"-latest onap/policy-drools:"${MAJOR_MINOR_VERSION}"-latest @@ -78,6 +79,7 @@ function push { fi ( + set -e; set -x; for tag in "$@"; do docker push "${tag}" diff --git a/controlloop/common/eventmanager/src/test/resources/tosca-policy-operational-restart.json b/controlloop/common/eventmanager/src/test/resources/tosca-policy-operational-restart.json index 1b17d2cf5..fd7c718db 100644 --- a/controlloop/common/eventmanager/src/test/resources/tosca-policy-operational-restart.json +++ b/controlloop/common/eventmanager/src/test/resources/tosca-policy-operational-restart.json @@ -2,7 +2,7 @@ "type": "onap.policies.controlloop.Operational", "type_version": "1.0.0", "properties": { - "content": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+true%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard" + "content": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard" }, "name": "operational.restart", "version": "1.0.0" diff --git a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile index c5248ee74..c0b31418a 100644 --- a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile +++ b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile @@ -7,9 +7,9 @@ COPY apps-controlloop.zip ${POLICY_INSTALL}/ RUN unzip apps-controlloop.zip && \ mkdir -p ${POLICY_HOME}/logs ${POLICY_HOME}/config ${HOME}/.m2 && \ - tar -C ${POLICY_HOME} -xvf base-${BUILD_VERSION}.tar.gz --no-same-owner && \ + tar -C ${POLICY_HOME} -xvf base-${BUILD_VERSION_DROOLS}.tar.gz --no-same-owner && \ tar -C ${POLICY_HOME} -xvf basex-controlloop-${BUILD_VERSION_APP_CL}.tar.gz --no-same-owner && \ - unzip policy-management-${BUILD_VERSION}.zip -d ${POLICY_HOME} && \ + unzip policy-management-${BUILD_VERSION_DROOLS}.zip -d ${POLICY_HOME} && \ echo "source ${POLICY_HOME}/etc/profile.d/env.sh" >> "${HOME}/.bashrc" && \ chmod 700 ${POLICY_HOME}/bin/* && \ chmod 600 ${POLICY_HOME}/config/* && \ |