Adding noCache docker build argument
[ccsdk/distribution.git] / alpine / java11 / pom.xml
1 <?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>
7         <artifactId>distribution-alpine-root</artifactId>
8         <version>1.2.0-SNAPSHOT</version>
9     </parent>
10
11     <artifactId>distribution-j11-alpine</artifactId>
12     <packaging>pom</packaging>
13
14     <name>ccsdk-distribution :: alpine :: java11</name>
15     <description>Creates base alpine Docker container</description>
16     <organization>
17         <name>openECOMP</name>
18     </organization>
19
20     <properties>
21         <image.name>onap/ccsdk-alpine-j11-image</image.name>
22         <base.image>onap/integration-java11</base.image>
23         <base.image.version>8.0.0</base.image.version>
24     </properties>
25
26     <build>
27         <plugins>
28             <plugin>
29                 <groupId>org.codehaus.groovy.maven</groupId>
30                 <artifactId>gmaven-plugin</artifactId>
31                 <version>1.0</version>
32                 <executions>
33                     <execution>
34                         <phase>validate</phase>
35                         <goals>
36                             <goal>execute</goal>
37                         </goals>
38                         <configuration>
39                             <source>${basedir}/../../src/main/scripts/TagVersion.groovy</source>
40                         </configuration>
41                     </execution>
42                 </executions>
43             </plugin>
44             <plugin>
45                 <artifactId>maven-resources-plugin</artifactId>
46                 <version>2.6</version>
47                 <executions>
48                     <execution>
49                         <id>copy-dockerfile</id>
50                         <goals>
51                             <goal>copy-resources</goal>
52                         </goals><!-- here the phase you need -->
53                         <phase>validate</phase>
54                         <configuration>
55                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
56                             <resources>
57                                 <resource>
58                                     <directory>src/main/docker</directory>
59                                     <includes>
60                                         <include>Dockerfile</include>
61                                     </includes>
62                                     <filtering>true</filtering>
63                                 </resource>
64                             </resources>
65                         </configuration>
66                     </execution>
67                 </executions>
68             </plugin>
69         </plugins>
70     </build>
71
72     <profiles>
73         <profile>
74             <id>docker</id>
75             <build>
76                 <plugins>
77                     <plugin>
78                         <groupId>io.fabric8</groupId>
79                         <artifactId>docker-maven-plugin</artifactId>
80                         <version>0.34.0</version>
81                         <inherited>false</inherited>
82                         <configuration>
83                             <images>
84                                 <image>
85                                     <name>${image.name}</name>
86                                     <build>
87                                         <cleanup>try</cleanup>
88                                         <noCache>true</noCache>
89                                         <contextDir>${basedir}/target/docker-stage</contextDir>
90                                         <dockerFile>Dockerfile</dockerFile>
91                                         <tags>
92                                             <tag>${project.docker.latestminortag.version}</tag>
93                                             <tag>${project.docker.latestfulltag.version}</tag>
94                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
95                                         </tags>
96                                     </build>
97                                 </image>
98                             </images>
99                             <verbose>${docker.verbose}</verbose>
100                             <skipPush>${docker.skip.push}</skipPush>
101                         </configuration>
102                         <executions>
103                             <execution>
104                                 <id>build-push-images</id>
105                                 <goals>
106                                     <goal>build</goal>
107                                     <goal>push</goal>
108                                 </goals>
109                             </execution>
110                         </executions>
111                     </plugin>
112                 </plugins>
113             </build>
114         </profile>
115     </profiles>
116 </project>