blob: 6fa0cb7cf418c9ca0b19345b87b9ad7ef135e7fe [file] [log] [blame]
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -04001<?xml version="1.0" encoding="UTF-8"?>
Timoney, Dan (dt5972)4d1e9652019-03-15 08:12:19 -04002<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/maven-v4_0_0.xsd">
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -04003
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -05004 <parent>
5 <groupId>org.onap.ccsdk.parent</groupId>
6 <artifactId>odlparent-lite</artifactId>
Timoney, Dan (dt5972)4d1e9652019-03-15 08:12:19 -04007 <version>1.2.1</version>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -05008 </parent>
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +01009
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050010 <modelVersion>4.0.0</modelVersion>
11 <packaging>pom</packaging>
12 <groupId>org.onap.ccsdk.distribution</groupId>
13 <artifactId>ansible-server</artifactId>
14 <version>0.4.1-SNAPSHOT</version>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040015
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050016 <name>ccsdk :: distribution :: ${project.artifactId}</name>
17 <description>Creates ansible-server Docker container</description>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040018
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050019 <properties>
20 <image.name>onap/ccsdk-ansible-server-image</image.name>
21 <ccsdk.project.version>${project.version}</ccsdk.project.version>
22 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
23 <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
24 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
25 <docker.verbose>true</docker.verbose>
26 </properties>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040027
28
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050029 <build>
30 <plugins>
31 <plugin>
32 <groupId>org.codehaus.groovy.maven</groupId>
33 <artifactId>gmaven-plugin</artifactId>
34 <executions>
35 <execution>
36 <phase>validate</phase>
37 <goals>
38 <goal>execute</goal>
39 </goals>
40 <configuration>
41 <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
42 </configuration>
43 </execution>
44 </executions>
45 </plugin>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040046
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050047 <plugin>
48 <artifactId>maven-resources-plugin</artifactId>
49 <version>2.6</version>
50 <executions>
51 <execution>
52 <id>copy-dockerfile</id>
53 <goals>
54 <goal>copy-resources</goal>
55 </goals><!-- here the phase you need -->
56 <phase>validate</phase>
57 <configuration>
58 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
59 <resources>
60 <resource>
61 <directory>src/main</directory>
62 <includes>
63 <include>**/*</include>
64 </includes>
65 <filtering>false</filtering>
66 </resource>
67 </resources>
68 </configuration>
69 </execution>
70 </executions>
71 </plugin>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040072
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050073 <plugin>
74 <artifactId>exec-maven-plugin</artifactId>
75 <groupId>org.codehaus.mojo</groupId>
76 <version>1.5.0</version>
77 <executions>
78 <execution>
79 <id>change python permissions</id>
80 <phase>process-sources</phase>
81 <goals>
82 <goal>exec</goal>
83 </goals>
84 <configuration>
85 <executable>/usr/bin/find</executable>
86 <arguments>
87 <argument>${basedir}/target/docker-stage/ansible-server</argument>
88 <argument>-name</argument>
89 <argument>*.py</argument>
90 <argument>-exec</argument>
91 <argument>chmod</argument>
92 <argument>+x</argument>
93 <argument>{}</argument>
94 <argument>;</argument>
95 </arguments>
96 </configuration>
97 </execution>
Taka Cho9bec8482019-02-18 14:31:27 -050098 <execution>
99 <id>change shell permissions</id>
100 <phase>process-sources</phase>
101 <goals>
102 <goal>exec</goal>
103 </goals>
104 <configuration>
105 <executable>/usr/bin/find</executable>
106 <arguments>
107 <argument>${basedir}/target/docker-stage/ansible-server</argument>
108 <argument>-name</argument>
109 <argument>*.sh</argument>
110 <argument>-exec</argument>
111 <argument>chmod</argument>
112 <argument>+x</argument>
113 <argument>{}</argument>
114 <argument>;</argument>
115 </arguments>
116 </configuration>
117 </execution>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500118 </executions>
119 </plugin>
120 </plugins>
121 </build>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -0400122
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500123 <profiles>
124 <profile>
125 <id>docker</id>
126 <build>
127 <plugins>
128 <plugin>
129 <groupId>io.fabric8</groupId>
130 <artifactId>docker-maven-plugin</artifactId>
131 <version>0.16.5</version>
132 <inherited>false</inherited>
133 <configuration>
134 <images>
135 <image>
136 <name>${image.name}</name>
137 <build>
138 <cleanup>try</cleanup>
139 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
140 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
141 <tags>
142 <tag>${project.docker.latestminortag.version}</tag>
143 <tag>${project.docker.latestfulltag.version}</tag>
144 <tag>${project.docker.latesttagtimestamp.version}</tag>
145 </tags>
146 </build>
147 </image>
148 </images>
149 </configuration>
150 <executions>
151 <execution>
152 <id>generate-images</id>
153 <phase>package</phase>
154 <goals>
155 <goal>build</goal>
156 </goals>
157 </execution>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -0400158
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500159 <execution>
160 <id>push-images</id>
161 <phase>deploy</phase>
162 <goals>
163 <goal>build</goal>
164 <goal>push</goal>
165 </goals>
166 </execution>
167 </executions>
168 </plugin>
169 </plugins>
170 </build>
171 </profile>
172 </profiles>
173 <organization>
174 <name>ONAP</name>
175 </organization>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -0400176</project>