diff options
author | sunil.unnava <su622b@att.com> | 2019-03-23 01:42:50 -0400 |
---|---|---|
committer | sunil.unnava <su622b@att.com> | 2019-03-23 01:43:11 -0400 |
commit | b32e82e48e9e781e63b8d038eb7399503c9d8290 (patch) | |
tree | 6acb8fdbce81dfd9156add092d7b01a0b1ffdbaf /pom.xml | |
parent | 99ac3680dbc0bdf17d1e3ccc53d81c59eaf8be57 (diff) |
revert pom changes for image optimization0.0.4
Issue-ID: DMAAP-909
Change-Id: I539d54a277cf98a6e011e58dd67e3dc96693fa08
Signed-off-by: sunil.unnava <su622b@att.com>
Diffstat (limited to 'pom.xml')
-rw-r--r-- | pom.xml | 173 |
1 files changed, 93 insertions, 80 deletions
@@ -39,16 +39,6 @@ </developers> <build> - <!-- Copy files to docker-stage to be included in image --> - <resources> - <resource> - <targetPath>${basedir}/target/docker-stage</targetPath> - <directory>${basedir}/src/main/docker</directory> - <includes> - <include>*</include> - </includes> - </resource> - </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -170,32 +160,97 @@ </execution> </executions> </plugin> - <!-- Copy jar to docker-stage to be included in image --> - <plugin> - <artifactId>maven-resources-plugin</artifactId> - <version>2.7</version> - <executions> - <execution> - <id>copy-jar</id> - <phase>install</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${basedir}/target/docker-stage</outputDirectory> - <resources> - <resource> - <directory>${basedir}/target</directory> - <includes> - <include>dmaapMMAgent.jar</include> - <include>kafka11aaf-jar-with-dependencies.jar</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> + <plugin> + <groupId>com.spotify</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>1.0.0</version> + <configuration> + <imageName>onap/dmaap/kafka01101</imageName> + <dockerDirectory>src/main/docker</dockerDirectory> + <serverId>docker-hub</serverId> + <imageTags> + <imageTag>${dockertag1}</imageTag> + <imageTag>${dockertag2}</imageTag> + </imageTags> + <resources> + <!-- <resource> <targetPath>/</targetPath> <directory>${dockerLocation}</directory> + <include>${project.build.finalName}.jar</include> </resource> --> + <resource> + <targetPath>/</targetPath> + <directory>${project.build.directory}</directory> + <include>**/**</include> + </resource> + <resource> + <targetPath>/</targetPath> + <directory>${project.build.directory}</directory> + <include>dmaapMMAgent.jar</include> + </resource> + </resources> + </configuration> + <executions> + <execution> + <id>build-image</id> + <phase>install</phase> + <goals> + <goal>build</goal> + </goals> + <configuration> + <skipDockerBuild>${skip.docker.build}</skipDockerBuild> + </configuration> + </execution> + + <execution> + <id>tag-image-project-version</id> + <phase>install</phase> + <goals> + <goal>tag</goal> + </goals> + <configuration> + <image>onap/dmaap/kafka01101</image> + <newName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag2}</newName> + <skipDockerTag>${skip.docker.push}</skipDockerTag> + </configuration> + </execution> + + <execution> + <id>tag-image-latest</id> + <phase>install</phase> + <goals> + <goal>tag</goal> + </goals> + <configuration> + <image>onap/dmaap/kafka01101</image> + <newName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag1}</newName> + <skipDockerTag>${skip.docker.push}</skipDockerTag> + </configuration> + </execution> + + <execution> + <id>push-image</id> + <phase>deploy</phase> + <goals> + <goal>push</goal> + </goals> + <configuration> + <imageName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag2}</imageName> + <skipDockerPush>${skip.docker.push}</skipDockerPush> + </configuration> + </execution> + + <execution> + <id>push-image-latest</id> + <phase>deploy</phase> + <goals> + <goal>push</goal> + </goals> + <configuration> + <imageName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag1}</imageName> + <skipDockerPush>${skip.docker.push}</skipDockerPush> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> @@ -333,50 +388,8 @@ </execution> </executions> </plugin> - <!-- build docker image --> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.28.0</version> - <configuration> - <verbose>${docker.verbose}</verbose> - <apiVersion>${docker.apiVersion}</apiVersion> - <pullRegistry>${docker.pull.registry}</pullRegistry> - <pushRegistry>${docker.push.registry}</pushRegistry> - <images> - <image> - <name>onap/dmaap/kafka01101</name> - <build> - <cleanup>try</cleanup> - <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> - <dockerFile>Dockerfile</dockerFile> - <tags> - <tag>${dockertag1}</tag> - <tag>${dockertag2}</tag> - </tags> - </build> - </image> - </images> - </configuration> - <executions> - <execution> - <id>generate-images</id> - <phase>install</phase> - <goals> - <goal>build</goal> - </goals> - </execution> - <execution> - <id>push-images</id> - <phase>deploy</phase> - <goals> - <goal>push</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> + </plugins> + </build> </profile> </profiles> |