Migrate docker job for azure plugin
[multicloud/azure.git] / azure / pom.xml
1 <?xml version="1.0"?>
2 <!--
3   Copyright (c) 2018 Amdocs
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   -->
15 <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">
16     <parent>
17         <groupId>org.onap.oparent</groupId>
18         <artifactId>oparent</artifactId>
19         <version>2.0.0</version>
20     </parent>
21     <modelVersion>4.0.0</modelVersion>
22     <groupId>org.onap.multicloud.azure</groupId>
23     <artifactId>multicloud-azure</artifactId>
24     <version>1.2.4-SNAPSHOT</version>
25     <packaging>pom</packaging>
26     <name>multicloud-azure</name>
27     <description>multicloud azure</description>
28     <properties>
29         <encoding>UTF-8</encoding>
30         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
31         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
32         <nexusproxy>https://nexus.onap.org</nexusproxy>
33     </properties>
34     <build>
35         <plugins>
36             <plugin>
37                 <artifactId>maven-assembly-plugin</artifactId>
38                 <configuration>
39                     <appendAssemblyId>false</appendAssemblyId>
40                     <descriptors>
41                         <descriptor>assembly.xml</descriptor>
42                     </descriptors>
43                 </configuration>
44                 <executions>
45                     <execution>
46                         <id>make-assembly</id>
47                         <phase>package</phase>
48                         <goals>
49                             <goal>single</goal>
50                         </goals>
51                     </execution>
52                 </executions>
53             </plugin>
54         </plugins>
55     </build>
56     <profiles>
57         <profile>
58             <id>docker</id>
59             <build>
60                 <plugins>
61                     <plugin>
62                         <groupId>org.apache.maven.plugins</groupId>
63                         <artifactId>maven-resources-plugin</artifactId>
64                         <version>3.1.0</version>
65                         <executions>
66                             <execution>
67                                 <id>copy-resources</id>
68                                 <phase>validate</phase>
69                                 <goals>
70                                     <goal>copy-resources</goal>
71                                 </goals>
72                                 <configuration>
73                                     <outputDirectory>${project.basedir}/docker_target</outputDirectory>
74                                     <resources>
75                                         <resource>
76                                             <directory>${project.basedir}/docker</directory>
77                                             <filtering>true</filtering>
78                                         </resource>
79                                     </resources>
80                                 </configuration>
81                             </execution>
82                         </executions>
83                     </plugin>
84                     <plugin>
85                         <groupId>org.apache.maven.plugins</groupId>
86                         <artifactId>maven-antrun-plugin</artifactId>
87                         <version>1.6</version>
88                         <executions>
89                             <execution>
90                                 <phase>install</phase>
91                                 <inherited>false</inherited>
92                                 <configuration>
93                                     <target>
94                                         <exec executable="docker">
95                                            <arg value="build"/>
96                                            <arg value="-t"/>
97                                            <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:${project.version}"/>
98                                            <arg value="docker_target"/>
99                                         </exec>
100                                         <exec executable="docker">
101                                             <arg value="tag"/>
102                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:${project.version}"/>
103                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:latest"/>
104                                         </exec>
105                                         <exec executable="docker">
106                                             <arg value="push"/>
107                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:${project.version}"/>
108                                         </exec>
109                                         <exec executable="docker">
110                                             <arg value="push"/>
111                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:latest"/>
112                                         </exec>
113                                     </target>
114                                 </configuration>
115                                 <goals>
116                                     <goal>run</goal>
117                                 </goals>
118                             </execution>
119                         </executions>
120                     </plugin>
121                 </plugins>
122             </build>
123             <activation>
124                 <activeByDefault>false</activeByDefault>
125             </activation>
126         </profile>
127     </profiles>
128 </project>