blob: f8625d66dbc9f113d03c9cfd4aa565ef0e2baa6f [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>
ChrisCe407cea2020-10-30 16:44:46 +010015 <version>1.8.0-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>
sebdetb988cb62020-09-25 15:48:10 +0200129 <tag>latest</tag>
130 <tag>
131 ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
132 </tag>
133 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-${maven.build.timestamp}</tag>
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +0200134 </tags>
135 </build>
136 </image>
137 </images>
138 </configuration>
139 <executions>
140 <execution>
141 <id>clean-images</id>
142 <phase>pre-clean</phase>
143 <goals>
144 <goal>remove</goal>
145 </goals>
146 <configuration>
147 <removeAll>true</removeAll>
148 <image>${docker.namespace}/${docker.image.name}</image>
149 </configuration>
150 </execution>
151
152 <execution>
153 <id>generate-images</id>
154 <phase>install</phase>
155 <goals>
156 <goal>build</goal>
157 </goals>
158 </execution>
159
160 <execution>
161 <id>push-images</id>
162 <phase>deploy</phase>
163 <goals>
164 <goal>push</goal>
165 </goals>
166 <configuration>
167 <image>${docker.namespace}/${docker.image.name}</image>
168 </configuration>
169 </execution>
170 </executions>
171 </plugin>
172 </plugins>
173 </build>
174</project>
175