blob: b6d27010c60807fe028c9a99269b7a4c6dc08278 [file] [log] [blame]
Ganesh Chandrasekaran8ba2cee2019-02-12 15:01:25 +09001<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3 <modelVersion>4.0.0</modelVersion>
4
5 <parent>
6 <groupId>org.onap.ccsdk.distribution</groupId>
7 <artifactId>distribution-root</artifactId>
8 <version>0.4.1-SNAPSHOT</version>
9 </parent>
10
11 <artifactId>saltstack-server</artifactId>
12 <version>0.4.1-SNAPSHOT</version>
13 <packaging>pom</packaging>
14
15 <name>ccsdk-distribution :: saltstack-server</name>
16 <description>Creates base saltstack-server Docker container</description>
17
18 <properties>
19 <image.name>onap/ccsdk-saltstack-server-image</image.name>
20 <ccsdk.project.version>${project.version}</ccsdk.project.version>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050021 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
Ganesh Chandrasekaran8ba2cee2019-02-12 15:01:25 +090022 </properties>
23
24 <build>
25 <plugins>
26
27 <plugin>
28 <groupId>org.codehaus.groovy.maven</groupId>
29 <artifactId>gmaven-plugin</artifactId>
30 <executions>
31 <execution>
32 <phase>validate</phase>
33 <goals>
34 <goal>execute</goal>
35 </goals>
36 <configuration>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050037 <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
Ganesh Chandrasekaran8ba2cee2019-02-12 15:01:25 +090038 </configuration>
39 </execution>
40 </executions>
41 </plugin>
42
43 <plugin>
44 <artifactId>maven-resources-plugin</artifactId>
45 <version>2.6</version>
46 <executions>
47 <execution>
48 <id>copy-dockerfile</id>
49 <goals>
50 <goal>copy-resources</goal>
51 </goals><!-- here the phase you need -->
52 <phase>validate</phase>
53 <configuration>
54 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
55 <resources>
56 <resource>
57 <directory>src/main/docker</directory>
58 <includes>
59 <include>Dockerfile</include>
60 </includes>
61 <filtering>true</filtering>
62 </resource>
63 </resources>
64 </configuration>
65 </execution>
66 </executions>
67 </plugin>
68 </plugins>
69 </build>
70
71 <profiles>
72 <profile>
73 <id>docker</id>
74 <build>
75 <plugins>
76 <plugin>
77 <groupId>io.fabric8</groupId>
78 <artifactId>docker-maven-plugin</artifactId>
79 <version>0.26.0</version>
80 <inherited>false</inherited>
81 <configuration>
82
83 <images>
84 <image>
85 <name>${image.name}</name>
86 <build>
87 <cleanup>try</cleanup>
88 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
89 <dockerFile>Dockerfile</dockerFile>
90 <tags>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050091 <tag>${project.docker.latestminortag.version}</tag>
92 <tag>${project.docker.latestfulltag.version}</tag>
93 <tag>${project.docker.latesttagtimestamp.version}</tag>
Ganesh Chandrasekaran8ba2cee2019-02-12 15:01:25 +090094 </tags>
95 </build>
96 </image>
97 </images>
98 </configuration>
99 <executions>
100 <execution>
101 <id>generate-images</id>
102 <phase>generate-sources</phase>
103 <goals>
104 <goal>build</goal>
105 </goals>
106 </execution>
107
108 <execution>
109 <id>push-images</id>
110 <phase>deploy</phase>
111 <goals>
112 <goal>build</goal>
113 <goal>push</goal>
114 </goals>
115 </execution>
116 </executions>
117 </plugin>
118
119 </plugins>
120 </build>
121 </profile>
122 </profiles>
123</project>