diff options
Diffstat (limited to 'cmso-optimizer')
-rw-r--r-- | cmso-optimizer/pom.xml | 29 | ||||
-rw-r--r-- | cmso-optimizer/src/main/docker/Dockerfile | 36 |
2 files changed, 27 insertions, 38 deletions
diff --git a/cmso-optimizer/pom.xml b/cmso-optimizer/pom.xml index 4ffa2e9..c3d8de8 100644 --- a/cmso-optimizer/pom.xml +++ b/cmso-optimizer/pom.xml @@ -30,30 +30,15 @@ <name>cmso-optimizer</name> <properties> - <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> - - <cmso.project.version>${project.version}</cmso.project.version> - <cmso.build.timestamp>${maven.build.timestamp}</cmso.build.timestamp> - <service.name>cmso</service.name> - <release-tag>Dublin</release-tag> <name.space>org.onap.optf.cmso</name.space> <serviceArtifactName>cmso</serviceArtifactName> - <java.version>1.8</java.version> - <eelf.version>1.0.0</eelf.version> - <spring.version>5.1.5.RELEASE</spring.version> - <swagger.core.version>2.0.0</swagger.core.version> - - <maven.compiler.target>1.8</maven.compiler.target> - <maven.compiler.source>1.8</maven.compiler.source> <build.number>${maven.build.timestamp}</build.number> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> <mariadb.version>2.2.1</mariadb.version> <swagger.directory>${basedir}/src/main/resources/META-INF/resources/swagger/</swagger.directory> - <aaf.version>2.1.4</aaf.version> <!-- Sonar --> <ilib.version>2.0.7</ilib.version> @@ -67,8 +52,6 @@ <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath> <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath> - <docker.push.registry>localhost:5000</docker.push.registry> - <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry> <docker.skip.build>false</docker.skip.build> <docker.skip.push>false</docker.skip.push> <docker.skip.tag>false</docker.skip.tag> @@ -335,13 +318,13 @@ <plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> - <version>0.26.0</version> + <version>${docker.maven.plugin.version}</version> <configuration> <verbose>true</verbose> <apiVersion>1.23</apiVersion> <images> <image> - <name>onap/optf-cmso-optimizer</name> + <name>${image.namespace}/optf-cmso-optimizer</name> <alias>onap-optf-cmso-optimizer</alias> <build> <cleanup>true</cleanup> @@ -355,6 +338,12 @@ <descriptor>${project.basedir}/src/main/docker/assembly/cmso-files.xml</descriptor> <name>onap-cmso-optimizer</name> </assembly> + <args> + <!-- plugin cannot handle empty (no proxy) arguments + <http_proxy_arg>${docker.http_proxy}</http_proxy_arg> + <https_proxy_arg>${docker.https_proxy}</https_proxy_arg> + --> + </args> </build> </image> </images> @@ -375,7 +364,7 @@ <goal>push</goal> </goals> <configuration> - <image>onap/optf-cmso-optimizer:%l</image> + <image>${image.namespace}/optf-cmso-optimizer:%l</image> </configuration> </execution> </executions> diff --git a/cmso-optimizer/src/main/docker/Dockerfile b/cmso-optimizer/src/main/docker/Dockerfile index fde2caf..7ce5303 100644 --- a/cmso-optimizer/src/main/docker/Dockerfile +++ b/cmso-optimizer/src/main/docker/Dockerfile @@ -3,10 +3,11 @@ FROM ubuntu:16.04 MAINTAINER "The Onap Team" LABEL Description="This image contains ubuntu 16.04 with the openjdk installed" Version="16.04-8" ENV APP_HOME=/opt/app/cmso -ARG http_proxy -ARG https_proxy -ENV HTTP_PROXY=$http_proxy -ENV HTTPS_PROXY=$https_proxy + +ARG http_proxy_arg +ARG https_proxy_arg +ENV HTTP_PROXY=$http_proxy_arg +ENV HTTPS_PROXY=$https_proxy_arg ENV http_proxy=$HTTP_PROXY ENV https_proxy=$HTTPS_PROXY @@ -16,19 +17,18 @@ ENV MZN_UNZIPNAME MiniZincIDE-${MZN}-bundle-linux ENV MZN_GH_BASE https://github.com/MiniZinc/MiniZincIDE ENV MZN_DL_URL ${MZN_GH_BASE}/releases/download/${MZN}/${MZN_BASENAME}.tgz -RUN test -n "$http_proxy" && echo "Acquire::Proxy \"http://$http_proxy\";" > /etc/apt/apt.conf.d/02proxy || true && \ +RUN test -n "$http_proxy" && echo "Acquire::Proxy \"http://$http_proxy\";" > /etc/apt/apt.conf.d/02proxy || true && \ apt-get update && \ apt-get -y dist-upgrade && \ apt-get install -y openjdk-8-jre-headless && \ - apt-get install wget - - -# Minizinc -RUN wget -q $MZN_DL_URL -O mz.tgz -RUN tar xzf mz.tgz -RUN mv $MZN_UNZIPNAME /mz-dist -RUN rm mz.tgz -RUN echo PATH=/mz-dist:$PATH >> ~/.bashrc + apt-get install -y wget && \ + apt-get install -y curl && \ + set && \ + wget -q $MZN_DL_URL -O mz.tgz && \ + tar xzf mz.tgz && \ + mv $MZN_UNZIPNAME /mz-dist && \ + rm mz.tgz && \ + echo PATH=/mz-dist:$PATH >> ~/.bashrc COPY onap-cmso-optimizer/cmso-optimizer.jar ${APP_HOME}/app.jar @@ -41,10 +41,10 @@ COPY onap-cmso-optimizer/startService.sh ${APP_HOME}/startService.sh COPY onap-cmso-optimizer/data ${APP_HOME}/data COPY onap-cmso-optimizer/scripts ${APP_HOME}/scripts -RUN chmod 700 ${APP_HOME}/startService.sh -RUN ln -s /share/etc ${APP_HOME}/etc -RUN ln -s /share/logs ${APP_HOME}/logs -RUN ln -s /share/debug-logs ${APP_HOME}/debug-logs +RUN chmod 700 ${APP_HOME}/startService.sh && \ + ln -s /share/etc ${APP_HOME}/etc && \ + ln -s /share/logs ${APP_HOME}/logs && \ + ln -s /share/debug-logs ${APP_HOME}/debug-logs WORKDIR ${APP_HOME} ENTRYPOINT ./startService.sh |