blob: 16c30c2daa9d05022a106ce52443b9929a36b1b8 [file] [log] [blame]
Alexis de Talhouët50f466c2019-04-12 18:49:29 -04001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 ~ Copyright © 2019 Bell Canada.
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 -->
Timoney, Dan (dt5972)84b361d2019-04-24 15:05:00 -040017<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">
Alexis de Talhouët50f466c2019-04-12 18:49:29 -040018 <modelVersion>4.0.0</modelVersion>
19 <parent>
20 <groupId>org.onap.ccsdk.cds</groupId>
21 <artifactId>ms</artifactId>
Timoney, Dan (dt5972)45bdf842019-08-06 10:19:48 -040022 <version>0.5.1-SNAPSHOT</version>
Alexis de Talhouët50f466c2019-04-12 18:49:29 -040023 <relativePath>..</relativePath>
24 </parent>
25 <artifactId>command-executor</artifactId>
26 <packaging>pom</packaging>
27 <name>Command Executor</name>
28 <description>Micro-service providing python environment with gRPC binding for command execution</description>
29
30 <properties>
31 <assembly.id>maven</assembly.id>
32 <image.name>onap/ccsdk-commandexecutor</image.name>
Alexis de Talhouët50f466c2019-04-12 18:49:29 -040033 <docker.push.phase>deploy</docker.push.phase>
34 <docker.verbose>true</docker.verbose>
35 <ccsdk.project.version>${project.version}</ccsdk.project.version>
36 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
Timoney, Dan (dt5972)68500192019-04-25 08:51:11 -040037 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
Alexis de Talhouët50f466c2019-04-12 18:49:29 -040038 </properties>
39
40 <build>
41 <plugins>
42 <plugin>
43 <artifactId>maven-resources-plugin</artifactId>
44 <version>2.6</version>
45 <executions>
46 <execution>
47 <id>copy-dockerfile</id>
48 <goals>
49 <goal>copy-resources</goal>
50 </goals>
51 <phase>validate</phase>
52 <configuration>
53 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
54 <resources>
55 <resource>
56 <directory>src/main/docker</directory>
57 <includes>
58 <include>Dockerfile</include>
59 <include>start.sh</include>
60 </includes>
61 <filtering>true</filtering>
62 </resource>
63 </resources>
64 </configuration>
65 </execution>
66 </executions>
67 </plugin>
Alexis de Talhouëtee120a52019-04-12 18:51:26 -040068 <plugin>
69 <artifactId>maven-assembly-plugin</artifactId>
70 <version>3.1.0</version>
71 <configuration>
72 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
73 <descriptors>
74 <descriptor>src/main/docker/distribution.xml</descriptor>
75 </descriptors>
76 <tarLongFileMode>posix</tarLongFileMode>
77 </configuration>
78 <executions>
79 <execution>
80 <id>${assembly.id}</id>
81 <phase>package</phase>
82 <goals>
83 <goal>single</goal>
84 </goals>
85 </execution>
86 </executions>
87 </plugin>
Alexis de Talhouët50f466c2019-04-12 18:49:29 -040088 <plugin>
89 <groupId>org.codehaus.groovy.maven</groupId>
90 <artifactId>gmaven-plugin</artifactId>
91 <version>1.0</version>
92 <executions>
93 <execution>
94 <phase>validate</phase>
95 <goals>
96 <goal>execute</goal>
97 </goals>
98 <configuration>
99 <source>${basedir}/../../TagVersion.groovy</source>
100 </configuration>
101 </execution>
102 </executions>
103 </plugin>
104 </plugins>
105 </build>
106
107 <profiles>
108 <profile>
109 <id>docker</id>
110 <build>
111 <plugins>
112 <plugin>
113 <groupId>io.fabric8</groupId>
114 <artifactId>docker-maven-plugin</artifactId>
115 <version>0.26.1</version>
116 <inherited>false</inherited>
117 <configuration>
118 <images>
119 <image>
120 <name>${image.name}</name>
121 <build>
122 <cleanup>try</cleanup>
123 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
124 <tags>
Alexis de Talhouëtf2136a42019-04-24 10:05:02 -0400125 <tag>${project.docker.latestminortag.version}</tag>
Alexis de Talhouët50f466c2019-04-12 18:49:29 -0400126 <tag>${project.docker.latestfulltag.version}</tag>
Alexis de Talhouëtf2136a42019-04-24 10:05:02 -0400127 <tag>${project.docker.latesttagtimestamp.version}</tag>
Alexis de Talhouët50f466c2019-04-12 18:49:29 -0400128 </tags>
129 </build>
130 </image>
131 </images>
132 <verbose>true</verbose>
133 </configuration>
134 <executions>
135 <execution>
136 <id>generate-images</id>
137 <phase>package</phase>
138 <goals>
139 <goal>build</goal>
140 </goals>
141 </execution>
142 <execution>
143 <id>push-images</id>
144 <phase>${docker.push.phase}</phase>
145 <goals>
146 <goal>build</goal>
147 <goal>push</goal>
148 </goals>
149 </execution>
150 </executions>
151 </plugin>
152 </plugins>
153 </build>
154 </profile>
155 </profiles>
156</project>