fix jenkins staing jobs with policy agent image 88/2088/1
authorYongchaoWu <yongchao.wu@est.tech>
Fri, 20 Dec 2019 10:03:11 +0000 (11:03 +0100)
committeryongchao <yongchao.wu@est.tech>
Fri, 20 Dec 2019 10:07:16 +0000 (11:07 +0100)
add a build execution before pushing execution

Issue-ID: NONRTRIC-79
Signed-off-by: YongchaoWu <yongchao.wu@est.tech>
Change-Id: I23c7fad8b9f1f76cd6d820779c06dcfb3eb49139

policy-agent/pom.xml

index 18158c3..bb6cdb7 100644 (file)
                 <version>${docker-maven-plugin}</version>
                 <inherited>false</inherited>
                 <executions>
+                    <execution>
+                        <id>generate-policy-agent-image</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                        <configuration>
+                            <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
+                            <images>
+                                <image>
+                                    <name>o-ran-sc/policy-agent:${project.version}</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <contextDir>${basedir}</contextDir>
+                                        <dockerFile>Dockerfile</dockerFile>
+                                        <tags>
+                                            <tag>${project.version}</tag>
+                                        </tags>
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                    </execution>
                     <execution>
                         <id>push-policy-agent-image</id>
                         <goals>