diff options
author | Timoney, Dan (dt5972) <dt5972@att.com> | 2018-09-12 15:31:10 -0400 |
---|---|---|
committer | Dan Timoney <dt5972@att.com> | 2018-09-13 15:04:11 +0000 |
commit | 74896075be266b6f974eb9e1042ca7c6b5ed70db (patch) | |
tree | 8736651c26934100e3dade17d26ee03ab0c157e3 /ms/controllerblueprints/distribution/pom.xml | |
parent | 5eebfaa6ac0d4cb4fdf20d19ead7cd0303fc6f29 (diff) |
Control docker build with profile
Docker build should only be run if docker profile is enabled.
Change-Id: I6942c3e59b769053fd47d04fe98f3e4b95ea33dd
Issue-ID: CCSDK-558
Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
Diffstat (limited to 'ms/controllerblueprints/distribution/pom.xml')
-rw-r--r-- | ms/controllerblueprints/distribution/pom.xml | 90 |
1 files changed, 49 insertions, 41 deletions
diff --git a/ms/controllerblueprints/distribution/pom.xml b/ms/controllerblueprints/distribution/pom.xml index 37c0b844..7a2c6792 100644 --- a/ms/controllerblueprints/distribution/pom.xml +++ b/ms/controllerblueprints/distribution/pom.xml @@ -34,7 +34,10 @@ <name.space>org.onap.ccsdk.apps</name.space> <!-- <name.space>${namespace}</name.space> -->
<serviceArtifactName>controllerblueprints</serviceArtifactName>
<image.name>onap/ccsdk-controllerblueprints</image.name>
- </properties>
+ <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
+ <docker.push.phase>deploy</docker.push.phase>
+ <docker.verbose>true</docker.verbose>
+ </properties>
<dependencies>
<dependency>
@@ -141,47 +144,52 @@ </execution>
</executions>
</plugin>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.26.1</version>
- <inherited>false</inherited>
- <configuration>
- <images>
- <image>
- <name>${image.name}</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
- <tags>
- <tag>${project.version}</tag>
- <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
- </tags>
- </build>
- </image>
- </images>
- <verbose>true</verbose>
- </configuration>
- <executions>
- <!--<execution>-->
- <!--<id>build-images</id>-->
- <!--<phase>package</phase>-->
- <!--<goals>-->
- <!--<goal>build</goal>-->
- <!--</goals>-->
- <!--</execution>-->
- <execution>
- <id>push-images</id>
- <phase>deploy</phase>
- <goals>
- <goal>build</goal>
- <goal>push</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.26.1</version>
+ <inherited>false</inherited>
+ <configuration>
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <id>push-images</id>
+ <phase>${docker.build.phase}</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
</project>
|