diff options
author | 2019-06-12 13:18:35 +0000 | |
---|---|---|
committer | 2019-06-12 13:18:35 +0000 | |
commit | cc40e38a3a51322fa3ad60c7bb7045180ad39842 (patch) | |
tree | 48e19bab43b3d82c9863823b8998ad2d775f9599 /controlloop/packages/docker-controlloop/src/main | |
parent | 3b90d560d3beafed560b42364d014123375bdb5a (diff) | |
parent | 19cade1c9284316bf15456002db354c894844c96 (diff) |
Merge "Use io.fabric8:docker-maven-plugin to build and push docker images"
Diffstat (limited to 'controlloop/packages/docker-controlloop/src/main')
-rw-r--r-- | controlloop/packages/docker-controlloop/src/main/assembly/assembly.xml | 45 | ||||
-rw-r--r-- | controlloop/packages/docker-controlloop/src/main/docker/Dockerfile | 44 | ||||
-rw-r--r-- | controlloop/packages/docker-controlloop/src/main/resources/docker-entrypoint.sh (renamed from controlloop/packages/docker-controlloop/src/main/docker/docker-entrypoint.sh) | 0 |
3 files changed, 67 insertions, 22 deletions
diff --git a/controlloop/packages/docker-controlloop/src/main/assembly/assembly.xml b/controlloop/packages/docker-controlloop/src/main/assembly/assembly.xml new file mode 100644 index 000000000..7deffeb8f --- /dev/null +++ b/controlloop/packages/docker-controlloop/src/main/assembly/assembly.xml @@ -0,0 +1,45 @@ +<!-- + ============LICENSE_START======================================================= + PDP-D APPS Installation Package + ================================================================================ + Copyright (C) 2019 Bell Canada. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + <id>docker-drools-apps</id> + <fileSets> + <fileSet> + <directory>${project.basedir}/src/main/resources</directory> + <outputDirectory>.</outputDirectory> + <filtered>true</filtered> + <includes> + <include>docker-entrypoint.sh</include> + </includes> + <fileMode>755</fileMode> + </fileSet> + </fileSets> + <dependencySets> + <dependencySet> + <includes> + <include>org.onap.policy.drools-applications.controlloop.packages:apps-controlloop</include> + </includes> + <outputDirectory>.</outputDirectory> + <outputFileNameMapping>apps-controlloop.zip</outputFileNameMapping> + </dependencySet> + </dependencySets> +</assembly> diff --git a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile index 9f1845da3..e1bed07b2 100644 --- a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile +++ b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile @@ -1,35 +1,35 @@ -FROM onap/policy-drools:1.4.0 +FROM onap/policy-drools:1.5.0-SNAPSHOT ARG BUILD_VERSION_APP_CL=${BUILD_VERSION_APP_CL} ENV BUILD_VERSION_APP_CL=${BUILD_VERSION_APP_CL} -COPY apps-controlloop.zip ${POLICY_INSTALL}/ +COPY /maven/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_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_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/* && \ - chmod 700 ${POLICY_INSTALL}/*.sh && \ - rm -f ${POLICY_INSTALL}/*.conf + mkdir -p $POLICY_HOME/logs $POLICY_HOME/config $HOME/.m2 && \ + 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_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/* && \ + chmod 700 $POLICY_INSTALL/*.sh && \ + rm -f $POLICY_INSTALL/*.conf -COPY docker-entrypoint.sh ${POLICY_HOME}/bin/ +COPY /maven/docker-entrypoint.sh $POLICY_HOME/bin/ -RUN . ${POLICY_HOME}/etc/profile.d/env.sh && \ +RUN . $POLICY_HOME/etc/profile.d/env.sh && \ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:get \ - --settings=${POLICY_HOME}/etc/m2/standalone-settings.xml \ + --settings=$POLICY_HOME/etc/m2/standalone-settings.xml \ -DartifactId=feature-controlloop-management \ - -DgroupId=org.onap.policy.drools-applications.controlloop.common -Dversion=${BUILD_VERSION_APP_CL} && \ - ${POLICY_HOME}/bin/features install healthcheck distributed-locking lifecycle && \ - ${POLICY_HOME}/bin/features install controlloop-utils controlloop-trans controlloop-management && \ - ${POLICY_HOME}/bin/features install controlloop-amsterdam controlloop-usecases && \ - ${POLICY_HOME}/bin/features enable healthcheck distributed-locking lifecycle && \ - ${POLICY_HOME}/bin/features enable controlloop-trans controlloop-management && \ - ${POLICY_HOME}/bin/features enable controlloop-amsterdam controlloop-usecases && \ - rm ${POLICY_INSTALL}/*.zip ${POLICY_INSTALL}/*.gz 2> /dev/null + -DgroupId=org.onap.policy.drools-applications.controlloop.common -Dversion=$BUILD_VERSION_APP_CL && \ + $POLICY_HOME/bin/features install healthcheck distributed-locking lifecycle && \ + $POLICY_HOME/bin/features install controlloop-utils controlloop-trans controlloop-management && \ + $POLICY_HOME/bin/features install controlloop-amsterdam controlloop-usecases && \ + $POLICY_HOME/bin/features enable healthcheck distributed-locking lifecycle && \ + $POLICY_HOME/bin/features enable controlloop-trans controlloop-management && \ + $POLICY_HOME/bin/features enable controlloop-amsterdam controlloop-usecases && \ + rm $POLICY_INSTALL/*.zip $POLICY_INSTALL/*.gz 2> /dev/null ENTRYPOINT ["/opt/app/policy/bin/docker-entrypoint.sh"] CMD ["boot"] diff --git a/controlloop/packages/docker-controlloop/src/main/docker/docker-entrypoint.sh b/controlloop/packages/docker-controlloop/src/main/resources/docker-entrypoint.sh index 73781619e..73781619e 100644 --- a/controlloop/packages/docker-controlloop/src/main/docker/docker-entrypoint.sh +++ b/controlloop/packages/docker-controlloop/src/main/resources/docker-entrypoint.sh |