blob: 8c35952136a57ddcb6441b55d83b6a64ed4ac080 [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>
MichaelMorris58787cb2021-09-20 09:11:18 +010015 <version>1.9.2-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>
sebdetdf353be2020-09-21 22:13:05 +0200111 <verbose>${verbose}</verbose>
112 <apiVersion>${docker.api.version}</apiVersion>
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +0200113 <registry>${docker.registry}</registry>
114 <authConfig>
115 <pull>
116 <username>${docker.username}</username>
117 <password>${docker.password}</password>
118 </pull>
119 </authConfig>
120 <images>
Avi Zivc175a0d2018-03-15 13:21:44 +0200121
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +0200122 <!-- Build backend image -->
123 <image>
124 <name>${docker.namespace}/${docker.image.name}</name>
125 <alias>${docker.image.name}</alias>
126 <build>
127 <cleanup>try</cleanup>
128 <dockerFileDir>${project.basedir}/artifacts</dockerFileDir>
129 <tags>
sebdetb988cb62020-09-25 15:48:10 +0200130 <tag>latest</tag>
131 <tag>
132 ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
133 </tag>
134 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-${maven.build.timestamp}</tag>
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +0200135 </tags>
136 </build>
137 </image>
138 </images>
139 </configuration>
140 <executions>
141 <execution>
142 <id>clean-images</id>
143 <phase>pre-clean</phase>
144 <goals>
145 <goal>remove</goal>
146 </goals>
147 <configuration>
148 <removeAll>true</removeAll>
149 <image>${docker.namespace}/${docker.image.name}</image>
150 </configuration>
151 </execution>
152
153 <execution>
154 <id>generate-images</id>
155 <phase>install</phase>
156 <goals>
157 <goal>build</goal>
158 </goals>
159 </execution>
160
161 <execution>
162 <id>push-images</id>
163 <phase>deploy</phase>
164 <goals>
165 <goal>push</goal>
166 </goals>
167 <configuration>
168 <image>${docker.namespace}/${docker.image.name}</image>
169 </configuration>
170 </execution>
171 </executions>
172 </plugin>
173 </plugins>
174 </build>
175</project>
176