blob: acf8c386c65d18a4ac7d9854b5c43a6567d8bb38 [file] [log] [blame]
Michael Dürre4ddb1e92020-06-29 09:59:57 +02001<?xml version="1.0" encoding="UTF-8"?>
2<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">
3 <modelVersion>4.0.0</modelVersion>
4
5 <parent>
6 <groupId>org.onap.ccsdk.distribution</groupId>
Dan Timoney2d682e42020-07-14 09:46:02 -04007 <artifactId>distribution-alpine-root</artifactId>
Michael Dürre4ddb1e92020-06-29 09:59:57 +02008 <version>1.0.0-SNAPSHOT</version>
9 </parent>
10
11 <artifactId>distribution-j11-alpine</artifactId>
12 <version>1.0.0-SNAPSHOT</version>
13 <packaging>pom</packaging>
14
15 <name>ccsdk-distribution :: alpine :: java11</name>
16 <description>Creates base alpine Docker container</description>
17 <organization>
18 <name>openECOMP</name>
19 </organization>
20
21 <properties>
22 <image.name>onap/ccsdk-alpine-j11-image</image.name>
23 <ccsdk.project.version>${project.version}</ccsdk.project.version>
24 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
25 </properties>
26
27 <build>
28 <plugins>
29
30 <plugin>
31 <groupId>org.codehaus.groovy.maven</groupId>
32 <artifactId>gmaven-plugin</artifactId>
33 <executions>
34 <execution>
35 <phase>validate</phase>
36 <goals>
37 <goal>execute</goal>
38 </goals>
39 <configuration>
40 <source>${basedir}/../../src/main/scripts/TagVersion.groovy</source>
41 </configuration>
42 </execution>
43 </executions>
44 </plugin>
45
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><!-- here the phase you need -->
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 </includes>
64 <filtering>true</filtering>
65 </resource>
66 </resources>
67 </configuration>
68 </execution>
69 </executions>
70 </plugin>
71 </plugins>
72 </build>
73
74 <profiles>
75 <profile>
76 <id>docker</id>
77 <build>
78 <plugins>
79 <plugin>
80 <groupId>io.fabric8</groupId>
81 <artifactId>docker-maven-plugin</artifactId>
82 <version>0.28.0</version>
83 <inherited>false</inherited>
84 <configuration>
85
86 <images>
87 <image>
88 <name>${image.name}</name>
89 <build>
90 <cleanup>try</cleanup>
91 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
92 <dockerFile>Dockerfile</dockerFile>
93 <tags>
94 <tag>${project.docker.latestminortag.version}</tag>
95 <tag>${project.docker.latestfulltag.version}</tag>
96 <tag>${project.docker.latesttagtimestamp.version}</tag>
97 </tags>
98 </build>
99 </image>
100 </images>
101 </configuration>
102 <executions>
103 <execution>
104 <id>generate-images</id>
105 <phase>generate-sources</phase>
106 <goals>
107 <goal>build</goal>
108 </goals>
109 </execution>
110
111 <execution>
112 <id>push-images</id>
113 <phase>deploy</phase>
114 <goals>
115 <goal>build</goal>
116 <goal>push</goal>
117 </goals>
118 </execution>
119 </executions>
120 </plugin>
121
122 </plugins>
123 </build>
124 </profile>
125 </profiles>
126</project>