summaryrefslogtreecommitdiffstats
path: root/certService
diff options
context:
space:
mode:
authorTomasz Golabek <tomasz.golabek@nokia.com>2020-02-13 12:07:35 +0100
committerTomasz Golabek <tomasz.golabek@nokia.com>2020-02-13 12:18:27 +0100
commit3b5547904b5b34a79ec30d7a479ddf518321b3fb (patch)
tree059edebcd7c019d8e6a7d35c8ce93d747dada21a /certService
parentffc14a52bd91bdfbca7a92a40cd50266f212b05e (diff)
Modified configuration of docker build
Configuration of docker profile taken from hv-ves Issue-ID: AAF-997 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com> Change-Id: I37311477214b2f50b516fa64e951ae37d24137ce
Diffstat (limited to 'certService')
-rw-r--r--certService/pom.xml87
1 files changed, 30 insertions, 57 deletions
diff --git a/certService/pom.xml b/certService/pom.xml
index ea919f8c..6ee630ac 100644
--- a/certService/pom.xml
+++ b/certService/pom.xml
@@ -39,12 +39,20 @@
<springdoc-openapi-ui.version>1.2.21</springdoc-openapi-ui.version>
<bouncycastle.version>1.60</bouncycastle.version>
<docker-maven-plugin.version>0.33.0</docker-maven-plugin.version>
- <docker.tag>${project.version}</docker.tag>
<springdoc-openapi-maven-plugin.apiDocsUrl>http://localhost:8080/v3/api-docs
</springdoc-openapi-maven-plugin.apiDocsUrl>
- <docker-maven-plugin.image-name>onap/${project.artifactId}</docker-maven-plugin.image-name>
<springdoc-openapi-maven-plugin.version>0.2</springdoc-openapi-maven-plugin.version>
<gson.version>2.8.6</gson.version>
+
+ <!-- Docker -->
+ <skipDockerPush>true</skipDockerPush>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
+ <docker-image.registry>${onap.nexus.dockerregistry.daily}</docker-image.registry>
+ <docker-image.namespace>onap</docker-image.namespace>
+ <docker-image.name>${project.groupId}.${project.artifactId}</docker-image.name>
+ <docker-image.latest>${project.version}</docker-image.latest>
+ <docker.http_proxy/>
+
</properties>
<dependencyManagement>
@@ -230,86 +238,51 @@
<activation>
<activeByDefault>false</activeByDefault>
</activation>
+ <properties>
+ <os.detected.name>linux</os.detected.name>
+ <os.detected.arch>x86_64</os.detected.arch>
+ <os.detected.classifier>${os.detected.name}-${os.detected.arch}</os.detected.classifier>
+ </properties>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
+ <version>0.26.0</version>
<executions>
<execution>
- <id>clean-images</id>
- <phase>pre-clean</phase>
- <goals>
- <goal>remove</goal>
- </goals>
- <configuration>
- <removeAll>true</removeAll>
- <image>${docker-maven-plugin.image-name}</image>
- </configuration>
- </execution>
- <execution>
- <id>generate-images</id>
- <phase>install</phase>
+ <id>docker-build-image</id>
+ <phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
-<!-- It has to be published on nexus firstly to uncomment integration tests-->
-<!-- <execution>-->
-<!-- <id>start</id>-->
-<!-- <phase>pre-integration-test</phase>-->
-<!-- <goals>-->
-<!-- <goal>start</goal>-->
-<!-- </goals>-->
-<!-- </execution>-->
-<!-- <execution>-->
-<!-- <id>stop</id>-->
-<!-- <phase>post-integration-test</phase>-->
-<!-- <goals>-->
-<!-- <goal>stop</goal>-->
-<!-- </goals>-->
-<!-- </execution>-->
<execution>
- <id>push-images</id>
+ <id>docker-push-image</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
- <configuration>
- <image>${docker-maven-plugin.image-name}</image>
- </configuration>
</execution>
</executions>
<configuration>
- <apiVersion>1.23</apiVersion>
- <registry>nexus3.onap.org:10001</registry>
- <authConfig>
- <pull>
- <username>docker</username>
- <password>docker</password>
- </pull>
- </authConfig>
+ <skipPush>${skipDockerPush}</skipPush>
+ <verbose>true</verbose>
+ <imagePullPolicy>IfNotPresent</imagePullPolicy>
<images>
<image>
- <name>${docker-maven-plugin.image-name}</name>
- <alias>cert-service</alias>
+ <alias>${project.artifactId}</alias>
+ <name>${docker-image.namespace}/${docker-image.name}
+ </name>
+ <registry>${docker-image.registry}</registry>
<build>
- <dockerFile>${project.basedir}/Dockerfile</dockerFile >
+ <dockerFileDir>${project.basedir}</dockerFileDir>
<tags>
- <tag>${docker.tag}</tag>
+ <tag>${project.version}-${maven.build.timestamp}Z</tag>
+ <tag>${project.version}</tag>
+ <tag>${docker-image.latest}</tag>
</tags>
</build>
- <run>
- <ports>
- <port>8080:8080</port>
- </ports>
- <wait>
- <!-- Check for this URL to return a 200 return code .... -->
- <url>http://localhost:8080/actuator/health</url>
- <time>120000</time>
- </wait>
- </run>
</image>
</images>
</configuration>