diff options
Diffstat (limited to 'javatoscachecker/service/pom.xml')
-rw-r--r-- | javatoscachecker/service/pom.xml | 99 |
1 files changed, 98 insertions, 1 deletions
diff --git a/javatoscachecker/service/pom.xml b/javatoscachecker/service/pom.xml index 26597c4..94da89f 100644 --- a/javatoscachecker/service/pom.xml +++ b/javatoscachecker/service/pom.xml @@ -27,12 +27,27 @@ <properties> <java.version>1.8</java.version> - <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss a</maven.build.timestamp.format> + <maven.build.timestamp.format>yyyy.MM.dd'T'hh.mm.ss'Z'</maven.build.timestamp.format> + <docker.push.registry>${onap.nexus.dockerregistry.daily}</docker.push.registry> + <docker.tag.version>${project.version}</docker.tag.version> + <docker.tag.timestamp>${maven.build.timestamp}</docker.tag.timestamp> </properties> <build> <sourceDirectory>src/main/java</sourceDirectory> <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.4.2</version> + <configuration> + <environmentVariables> + <DOCKER_HOST>tcp://127.0.0.1:2375</DOCKER_HOST> + </environmentVariables> + </configuration> + </plugin> + <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> @@ -115,6 +130,88 @@ </execution> </executions> </plugin> + + <plugin> + <groupId>com.spotify</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>1.0.0</version> + <configuration> + <imageName>onap/modeling/javatoscachecker</imageName> + <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory> + <!-- <serverId>docker-daily</serverId> --> + <!-- <serverId>ecomp-snapshots</serverId> --> + + <noCache>true</noCache> + <imageTags> + <imageTag>latest</imageTag> + <imageTag>${docker.tag.version}-${docker.tag.timestamp}</imageTag> + </imageTags> + <forceTags>true</forceTags> + <resources> + <resource> + <targetPath>/</targetPath> + <directory>${project.build.directory}</directory> + <include>${project.build.finalName}.jar</include> + </resource> + <resource> + <targetPath>/</targetPath> + <directory>${project.basedir}</directory> + <include>application.properties</include> + </resource> + </resources> + </configuration> + <executions> + <execution> + <id>build-image</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + <execution> + <id>tag-image-latest-timestamp</id> + <phase>package</phase> + <goals> + <goal>tag</goal> + </goals> + <configuration> + <image>onap/modeling/javatoscachecker:${docker.tag.version}-${docker.tag.timestamp}</image> + <newName>${docker.push.registry}/onap/modeling/javatoscachecker:${docker.tag.version}-${docker.tag.timestamp}</newName> + </configuration> + </execution> + <execution> + <id>push-image-latest-timestamp</id> + <phase>deploy</phase> + <goals> + <goal>push</goal> + </goals> + <configuration> + <imageName>${docker.push.registry}/onap/modeling/javatoscachecker:${docker.tag.version}-${docker.tag.timestamp}</imageName> + </configuration> + </execution> + <execution> + <id>tag-image-latest</id> + <phase>package</phase> + <goals> + <goal>tag</goal> + </goals> + <configuration> + <image>onap/modeling/javatoscachecker:latest</image> + <newName>${docker.push.registry}/onap/modeling/javatoscachecker:latest</newName> + </configuration> + </execution> + <execution> + <id>push-image-latest</id> + <phase>deploy</phase> + <goals> + <goal>push</goal> + </goals> + <configuration> + <imageName>${docker.push.registry}/onap/modeling/javatoscachecker:latest</imageName> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> |