summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dt5972@att.com>2018-09-12 15:31:10 -0400
committerDan Timoney <dt5972@att.com>2018-09-13 15:04:11 +0000
commitd5510f3133d37b80c0786908e336260a5d75d38a (patch)
treec601204107852b9ada0833daff9f4e5cd4d68bcf
parent99f4a1e766cf27d35fb7b68b4904d1e49e7fa787 (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>
-rw-r--r--ms/controllerblueprints/.gitignore3
-rw-r--r--ms/controllerblueprints/application/pom.xml2
-rw-r--r--ms/controllerblueprints/distribution/pom.xml90
3 files changed, 53 insertions, 42 deletions
diff --git a/ms/controllerblueprints/.gitignore b/ms/controllerblueprints/.gitignore
index 644e3b492..8cda363d8 100644
--- a/ms/controllerblueprints/.gitignore
+++ b/ms/controllerblueprints/.gitignore
@@ -20,4 +20,5 @@
**/*versionsBackup
**/blackDuckHub*
-**/*.jsonld \ No newline at end of file
+**/*.jsonld
+/target-ide/
diff --git a/ms/controllerblueprints/application/pom.xml b/ms/controllerblueprints/application/pom.xml
index 38f81c169..24f4debe0 100644
--- a/ms/controllerblueprints/application/pom.xml
+++ b/ms/controllerblueprints/application/pom.xml
@@ -198,5 +198,7 @@
</plugin>
</plugins>
</build>
+
+
</project>
diff --git a/ms/controllerblueprints/distribution/pom.xml b/ms/controllerblueprints/distribution/pom.xml
index 37c0b8448..7a2c67920 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>