Explicit error message in command-executor when script is failing
[ccsdk/cds.git] / ms / command-executor / pom.xml
1 <?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   -->
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         <relativePath>..</relativePath>
26     </parent>
27
28     <artifactId>command-executor</artifactId>
29     <packaging>pom</packaging>
30
31     <name>Command Executor</name>
32     <description>Micro-service providing python environment with gRPC binding for command execution</description>
33
34     <properties>
35         <assembly.id>maven</assembly.id>
36         <image.name>onap/ccsdk-commandexecutor</image.name>
37         <docker.push.phase>deploy</docker.push.phase>
38         <docker.verbose>true</docker.verbose>
39         <ccsdk.project.version>${project.version}</ccsdk.project.version>
40         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
41         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
42     </properties>
43
44     <build>
45         <plugins>
46             <plugin>
47                 <artifactId>maven-resources-plugin</artifactId>
48                 <version>2.6</version>
49                 <executions>
50                     <execution>
51                         <id>copy-dockerfile</id>
52                         <goals>
53                             <goal>copy-resources</goal>
54                         </goals>
55                         <phase>validate</phase>
56                         <configuration>
57                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
58                             <resources>
59                                 <resource>
60                                     <directory>src/main/docker</directory>
61                                     <includes>
62                                         <include>Dockerfile</include>
63                                         <include>start.sh</include>
64                                     </includes>
65                                     <filtering>true</filtering>
66                                 </resource>
67                             </resources>
68                         </configuration>
69                     </execution>
70                 </executions>
71             </plugin>
72             <plugin>
73                 <artifactId>maven-assembly-plugin</artifactId>
74                 <version>3.1.0</version>
75                 <configuration>
76                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
77                     <descriptors>
78                         <descriptor>src/main/docker/distribution.xml</descriptor>
79                     </descriptors>
80                     <tarLongFileMode>posix</tarLongFileMode>
81                 </configuration>
82                 <executions>
83                     <execution>
84                         <id>${assembly.id}</id>
85                         <phase>package</phase>
86                         <goals>
87                             <goal>single</goal>
88                         </goals>
89                     </execution>
90                 </executions>
91             </plugin>
92             <plugin>
93                 <groupId>org.codehaus.groovy.maven</groupId>
94                 <artifactId>gmaven-plugin</artifactId>
95                 <version>1.0</version>
96                 <executions>
97                     <execution>
98                         <phase>validate</phase>
99                         <goals>
100                             <goal>execute</goal>
101                         </goals>
102                         <configuration>
103                             <source>${basedir}/../../TagVersion.groovy</source>
104                         </configuration>
105                     </execution>
106                 </executions>
107             </plugin>
108         </plugins>
109     </build>
110
111     <profiles>
112         <profile>
113             <id>docker</id>
114             <build>
115                 <plugins>
116                     <plugin>
117                         <groupId>io.fabric8</groupId>
118                         <artifactId>docker-maven-plugin</artifactId>
119                         <version>0.26.1</version>
120                         <inherited>false</inherited>
121                         <configuration>
122                             <images>
123                                 <image>
124                                     <name>${image.name}</name>
125                                     <build>
126                                         <cleanup>try</cleanup>
127                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
128                                         <tags>
129                                             <tag>${project.docker.latestminortag.version}</tag>
130                                             <tag>${project.docker.latestfulltag.version}</tag>
131                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
132                                         </tags>
133                                     </build>
134                                 </image>
135                             </images>
136                             <verbose>true</verbose>
137                         </configuration>
138                         <executions>
139                             <execution>
140                                 <id>generate-images</id>
141                                 <phase>package</phase>
142                                 <goals>
143                                     <goal>build</goal>
144                                 </goals>
145                             </execution>
146                             <execution>
147                                 <id>push-images</id>
148                                 <phase>${docker.push.phase}</phase>
149                                 <goals>
150                                     <goal>build</goal>
151                                     <goal>push</goal>
152                                 </goals>
153                             </execution>
154                         </executions>
155                     </plugin>
156                 </plugins>
157             </build>
158         </profile>
159     </profiles>
160 </project>