aboutsummaryrefslogtreecommitdiffstats
path: root/deliveries/pom.xml
blob: 1b89e1e5c5c981971e5e2161167e1c2225b0047d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.onap.vid</groupId>
        <artifactId>vid-parent</artifactId>
        <version>4.0.0-SNAPSHOT</version>
    </parent>

    <packaging>pom</packaging>
    <artifactId>vid-deliveries</artifactId>

    <name>VID Deliveries</name>
    <description>ONAP VID Deliveries</description>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <docker.push.registry>${docker_registry}</docker.push.registry>
        <docker.verbose>true</docker.verbose>
    </properties>

    <profiles>

        <profile>
            <id>docker-proxy</id>
            <!-- activate profile if environment variable `http_proxy` is set -->
            <activation>
                <property>
                    <name>env.http_proxy</name>
                </property>
            </activation>
            <properties>
                <docker.buildArg.http_proxy>${env.http_proxy}</docker.buildArg.http_proxy>
            </properties>
        </profile>

    </profiles>

    <build>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.28.0</version>

                <configuration>
                    <verbose>true</verbose>
                    <apiVersion>1.23</apiVersion>
                    <images>
                        <image>
                            <name>onap/vid:${project.version}</name>
                            <build>
                                <cleanup>remove</cleanup>
                                <dockerFileDir>docker-files</dockerFileDir>
                                <assembly>
                                    <basedir>/</basedir>
                                    <user>vidadmin:vidadmin:vidadmin</user>
                                    <descriptor>assembly/assembly-for-plugin.xml</descriptor>
                                </assembly>
                                <tags>
                                    <tag>4.0-STAGING-latest</tag>
                                    <tag>latest</tag>
                                </tags>

                            </build>
                        </image>
                    </images>
                </configuration>

                <executions>
                    <execution>
                        <id>generate-image</id>
                        <phase>package</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>push-image</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>build</goal>
                            <goal>push</goal>
                        </goals>
                    </execution>
                </executions>

            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>