blob: 7ece809a2aeb69084f5fec0227e33652ef7dfaf9 [file] [log] [blame]
Avi Zivc175a0d2018-03-15 13:21:44 +02001<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3 <modelVersion>4.0.0</modelVersion>
4
5 <name>openecomp-sdc-docker-backend</name>
6 <groupId>org.openecomp.sdc</groupId>
7 <artifactId>openecomp-sdc-docker-backend</artifactId>
8 <packaging>pom</packaging>
9
10 <url>http://maven.apache.org</url>
11
12 <parent>
13 <groupId>org.openecomp.sdc</groupId>
14 <artifactId>openecomp-sdc-docker-dist</artifactId>
shrek200065f0aa32020-02-02 10:40:15 +020015 <version>1.6.1-SNAPSHOT</version>
Avi Zivc175a0d2018-03-15 13:21:44 +020016 </parent>
17
18
19 <properties>
20 <docker.image.name>sdc-onboard-backend</docker.image.name>
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +020021 <docker.registry>nexus3.onap.org:10001</docker.registry>
22 <docker.password>docker</docker.password>
23 <docker.username>docker</docker.username>
24 <docker.namespace>onap</docker.namespace>
Avi Zivc175a0d2018-03-15 13:21:44 +020025 </properties>
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +020026
Avi Zivc175a0d2018-03-15 13:21:44 +020027 <build>
28 <plugins>
29 <plugin>
Michael Lando5c9769c2018-08-20 01:27:45 +030030 <groupId>org.apache.maven.plugins</groupId>
31 <artifactId>maven-clean-plugin</artifactId>
32 <executions>
33 <execution>
34 <id>clean files</id>
35 <phase>clean</phase>
36 <goals>
37 <goal>clean</goal>
38 </goals>
39 <configuration>
40 <filesets>
41 <fileset>
42 <directory>${project.basedir}/artifacts/</directory>
43 <followSymlinks>false</followSymlinks>
44 <includes>
45 <include>*.war</include>
46 <include>onboarding_configuration.yaml</include>
47 <include>logback.xml</include>
48 </includes>
49 </fileset>
50 </filesets>
51 </configuration>
52 </execution>
53 </executions>
54 </plugin>
55
56 <plugin>
Avi Zivc175a0d2018-03-15 13:21:44 +020057 <artifactId>maven-resources-plugin</artifactId>
58 <version>3.0.2</version>
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +020059 <executions>
60 <execution>
61 <id>copy-resources-war</id>
62 <phase>verify</phase>
63 <goals>
64 <goal>copy-resources</goal>
65 </goals>
Avi Zivc175a0d2018-03-15 13:21:44 +020066 <configuration>
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +020067 <outputDirectory>${project.basedir}/artifacts</outputDirectory>
68 <resources>
69 <resource>
70 <directory>
71 ${project.parent.basedir}/../../openecomp-be/tools/swagger-ui/target/api-docs
72 </directory>
73 <includes>
74 <include>api-docs.war</include>
75 </includes>
76 </resource>
77 <resource>
78 <directory>
79 ${project.parent.basedir}/../../openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target
80 </directory>
81 <includes>
82 <include>onboarding-be-${project.version}.war</include>
83 </includes>
84 </resource>
85 <resource>
86 <directory>
87 ${project.parent.basedir}/../../openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/resources
88 </directory>
89 <includes>
90 <include>onboarding_configuration.yaml</include>
91 </includes>
92 </resource>
93 <resource>
94 <directory>
95 ${project.parent.basedir}/../../catalog-be/src/main/resources/config
96 </directory>
97 <includes>
98 <include>logback.xml</include>
99 </includes>
100 </resource>
101 </resources>
Avi Zivc175a0d2018-03-15 13:21:44 +0200102 </configuration>
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +0200103 </execution>
104 </executions>
105 </plugin>
Avi Zivc175a0d2018-03-15 13:21:44 +0200106
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +0200107 <plugin>
108 <groupId>io.fabric8</groupId>
109 <artifactId>docker-maven-plugin</artifactId>
110 <configuration>
111 <apiVersion>1.23</apiVersion>
112 <registry>${docker.registry}</registry>
113 <authConfig>
114 <pull>
115 <username>${docker.username}</username>
116 <password>${docker.password}</password>
117 </pull>
118 </authConfig>
119 <images>
Avi Zivc175a0d2018-03-15 13:21:44 +0200120
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +0200121 <!-- Build backend image -->
122 <image>
123 <name>${docker.namespace}/${docker.image.name}</name>
124 <alias>${docker.image.name}</alias>
125 <build>
126 <cleanup>try</cleanup>
127 <dockerFileDir>${project.basedir}/artifacts</dockerFileDir>
128 <tags>
129 <tag>${docker.tag}</tag>
130 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
131 </tags>
132 </build>
133 </image>
134 </images>
135 </configuration>
136 <executions>
137 <execution>
138 <id>clean-images</id>
139 <phase>pre-clean</phase>
140 <goals>
141 <goal>remove</goal>
142 </goals>
143 <configuration>
144 <removeAll>true</removeAll>
145 <image>${docker.namespace}/${docker.image.name}</image>
146 </configuration>
147 </execution>
148
149 <execution>
150 <id>generate-images</id>
151 <phase>install</phase>
152 <goals>
153 <goal>build</goal>
154 </goals>
155 </execution>
156
157 <execution>
158 <id>push-images</id>
159 <phase>deploy</phase>
160 <goals>
161 <goal>push</goal>
162 </goals>
163 <configuration>
164 <image>${docker.namespace}/${docker.image.name}</image>
165 </configuration>
166 </execution>
167 </executions>
168 </plugin>
169 </plugins>
170 </build>
171</project>
172