diff options
author | Bruno Sakoto <bruno.sakoto@bell.ca> | 2020-01-07 17:48:00 -0500 |
---|---|---|
committer | Bruno Sakoto <bruno.sakoto@bell.ca> | 2020-01-09 13:13:51 -0500 |
commit | 0945c4f6fad83f1dfe59914a5cb4717d41211b23 (patch) | |
tree | 770ad8758fc68cdda89ccfa20fd40d7c51e95a4d /controlloop/packages/docker-controlloop/pom.xml | |
parent | 33b0fb8aa6194a39fe9dbd7457d02a109d56a8a5 (diff) |
Parameterize base-image version for drools-apps
Issue-ID: POLICY-2318
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: I5cc2761adb2621bca094fb035e626dd40baa08e1
Diffstat (limited to 'controlloop/packages/docker-controlloop/pom.xml')
-rw-r--r-- | controlloop/packages/docker-controlloop/pom.xml | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/controlloop/packages/docker-controlloop/pom.xml b/controlloop/packages/docker-controlloop/pom.xml index f709585ee..a4c893a19 100644 --- a/controlloop/packages/docker-controlloop/pom.xml +++ b/controlloop/packages/docker-controlloop/pom.xml @@ -3,7 +3,7 @@ ONAP ================================================================================ Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - Modifications Copyright (C) 2019 Bell Canada. + Modifications Copyright (C) 2019-2020 Bell Canada. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -80,6 +80,32 @@ </execution> </executions> </plugin> + <!--fabric8.io docker-maven-plugin does not support ARG usage in the FROM statement of Dockerfile + even though docker supports it: https://github.com/fabric8io/docker-maven-plugin/issues/859. + As a workaround we shall use maven-antrun-plugin to copy the Dockerfile and apply filters to + replace the parameterized base-image version. The fabric8.io docker-maven-plugin shall use this filtered file + to build the image. After the image is built we perform a cleanup to remove the filtered file.--> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>update-parameterized-dockerfile</id> + <phase>initialize</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <copy file="src/main/docker/Dockerfile" toFile="${project.build.directory}/docker-tmp/Dockerfile"> + <filterset> + <filter token="version.policy.drools-pdp" value="${version.policy.drools-pdp}"/> + </filterset> + </copy> + </tasks> + </configuration> + </execution> + </executions> + </plugin> <plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> @@ -93,6 +119,7 @@ <name>onap/policy-pdpd-cl</name> <build> <cleanup>try</cleanup> + <contextDir>${project.build.directory}/docker-tmp</contextDir> <dockerFile>Dockerfile</dockerFile> <tags> <tag>${project.version}</tag> |