summaryrefslogtreecommitdiffstats
path: root/utils/webseal-simulator/pom.xml
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-08-16 13:44:31 +0300
committerTal Gitelman <tg851x@intl.att.com>2017-08-16 13:44:31 +0300
commitfa222906b5b31c34ee165e290de94dd19c8f18b3 (patch)
treecb610145234fbbb27200cb055cc8f1cf0a6c9f6a /utils/webseal-simulator/pom.xml
parent11f0704f4f1186ae33230e80376aa9459dcfd737 (diff)
[SDC-154] - sdc-simulator docker task
Change-Id: If1ba67353698c4baa91efa0abf6ccb89f208f2f6 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'utils/webseal-simulator/pom.xml')
-rw-r--r--utils/webseal-simulator/pom.xml133
1 files changed, 133 insertions, 0 deletions
diff --git a/utils/webseal-simulator/pom.xml b/utils/webseal-simulator/pom.xml
index 7d5df432fe..443b9679f7 100644
--- a/utils/webseal-simulator/pom.xml
+++ b/utils/webseal-simulator/pom.xml
@@ -9,6 +9,10 @@
<properties>
<jetty-version>9.2.10.v20150310</jetty-version>
+ <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
+ <docker.latest.tag>${project.version}-latest</docker.latest.tag>
+ <!--maven-->
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
</properties>
<dependencies>
@@ -107,4 +111,133 @@
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>docker-staging</id>
+ <properties>
+ <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
+ <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>docker</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <id>copy-resources-simulator</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/sdc-simulator</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}/target</directory>
+ <includes>
+ <include>WSSimulator.war</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-configurations-simulator</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ <includes>
+ <include>webseal.conf</include>
+ <include>logback.xml</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.19.1</version>
+
+ <configuration>
+ <verbose>true</verbose>
+ <apiVersion>1.23</apiVersion>
+
+ <images>
+
+ <!-- Build simulator image -->
+ <image>
+ <name>openecomp/sdc-simulator</name>
+ <alias>sdc-simulator</alias>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}\sdc-simulator</dockerFileDir>
+ <tags>
+ <tag>${docker.tag}</tag>
+ <tag>${docker.latest.tag}</tag>
+ <tag>1.1-STAGING-latest</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>clean-images</id>
+ <phase>pre-clean</phase>
+ <goals>
+ <goal>remove</goal>
+ </goals>
+ <configuration>
+ <removeAll>true</removeAll>
+ <image>openecomp/sdc-simulator</image>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>generate-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>
+ <configuration>
+ <image>openecomp/sdc-simulator</image>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>