Merge "PyExecutor ResourceResolution store/retrieve templates"
[ccsdk/cds.git] / ms / py-executor / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ Copyright © 2018-2019 AT&T Intellectual Property.
4   ~
5   ~ Licensed under the Apache License, Version 2.0 (the "License");
6   ~ you may not use this file except in compliance with the License.
7   ~ You may obtain a copy of the License at
8   ~
9   ~     http://www.apache.org/licenses/LICENSE-2.0
10   ~
11   ~ Unless required by applicable law or agreed to in writing, software
12   ~ distributed under the License is distributed on an "AS IS" BASIS,
13   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   ~ See the License for the specific language governing permissions and
15   ~ limitations under the License.
16   -->
17
18 <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">
19     <modelVersion>4.0.0</modelVersion>
20
21     <parent>
22         <groupId>org.onap.ccsdk.cds</groupId>
23         <artifactId>ms</artifactId>
24         <version>1.0.0-SNAPSHOT</version>
25     </parent>
26
27     <artifactId>py-executor</artifactId>
28
29     <name>Python Script Executor</name>
30     <description>Micro-service providing python environment with gRPC binding for python script execution</description>
31
32     <properties>
33         <assembly.id>maven</assembly.id>
34         <image.name>onap/ccsdk-py-executor</image.name>
35         <docker.push.phase>deploy</docker.push.phase>
36         <docker.verbose>true</docker.verbose>
37         <ccsdk.project.version>${project.version}</ccsdk.project.version>
38         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
39         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
40         <sonar.skip>true</sonar.skip>
41     </properties>
42
43     <build>
44         <plugins>
45             <plugin>
46                 <artifactId>maven-resources-plugin</artifactId>
47                 <version>2.6</version>
48                 <executions>
49                     <execution>
50                         <id>copy-dockerfile</id>
51                         <goals>
52                             <goal>copy-resources</goal>
53                         </goals>
54                         <phase>validate</phase>
55                         <configuration>
56                             <outputDirectory>${project.basedir}/target/docker-stage</outputDirectory>
57                             <resources>
58                                 <resource>
59                                     <directory>docker</directory>
60                                     <includes>
61                                         <include>Dockerfile</include>
62                                         <include>start.sh</include>
63                                     </includes>
64                                     <filtering>true</filtering>
65                                 </resource>
66                             </resources>
67                         </configuration>
68                     </execution>
69                 </executions>
70             </plugin>
71             <plugin>
72                 <artifactId>maven-assembly-plugin</artifactId>
73                 <version>3.1.0</version>
74                 <configuration>
75                     <outputDirectory>${project.basedir}/target/docker-stage</outputDirectory>
76                     <descriptors>
77                         <descriptor>docker/distribution.xml</descriptor>
78                     </descriptors>
79                     <tarLongFileMode>posix</tarLongFileMode>
80                 </configuration>
81                 <executions>
82                     <execution>
83                         <id>${assembly.id}</id>
84                         <phase>package</phase>
85                         <goals>
86                             <goal>single</goal>
87                         </goals>
88                     </execution>
89                 </executions>
90             </plugin>
91             <plugin>
92                 <groupId>org.codehaus.groovy.maven</groupId>
93                 <artifactId>gmaven-plugin</artifactId>
94                 <version>1.0</version>
95                 <executions>
96                     <execution>
97                         <phase>validate</phase>
98                         <goals>
99                             <goal>execute</goal>
100                         </goals>
101                         <configuration>
102                             <source>${basedir}/../../TagVersion.groovy</source>
103                         </configuration>
104                     </execution>
105                 </executions>
106             </plugin>
107         </plugins>
108     </build>
109
110     <profiles>
111         <profile>
112             <id>docker</id>
113             <build>
114                 <plugins>
115                     <plugin>
116                         <groupId>io.fabric8</groupId>
117                         <artifactId>docker-maven-plugin</artifactId>
118                         <version>0.26.1</version>
119                         <inherited>false</inherited>
120                         <configuration>
121                             <images>
122                                 <image>
123                                     <name>${image.name}</name>
124                                     <build>
125                                         <cleanup>try</cleanup>
126                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
127                                         <tags>
128                                             <tag>${project.docker.latestminortag.version}</tag>
129                                             <tag>${project.docker.latestfulltag.version}</tag>
130                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
131                                         </tags>
132                                     </build>
133                                 </image>
134                             </images>
135                             <verbose>true</verbose>
136                         </configuration>
137                         <executions>
138                             <execution>
139                                 <id>generate-images</id>
140                                 <phase>package</phase>
141                                 <goals>
142                                     <goal>build</goal>
143                                 </goals>
144                             </execution>
145                             <execution>
146                                 <id>push-images</id>
147                                 <phase>${docker.push.phase}</phase>
148                                 <goals>
149                                     <goal>build</goal>
150                                     <goal>push</goal>
151                                 </goals>
152                             </execution>
153                         </executions>
154                     </plugin>
155                 </plugins>
156             </build>
157         </profile>
158     </profiles>
159 </project>