diff options
Diffstat (limited to 'installation/dgbuilder/pom.xml')
-rw-r--r-- | installation/dgbuilder/pom.xml | 55 |
1 files changed, 51 insertions, 4 deletions
diff --git a/installation/dgbuilder/pom.xml b/installation/dgbuilder/pom.xml index f7a6375d..c89c766a 100644 --- a/installation/dgbuilder/pom.xml +++ b/installation/dgbuilder/pom.xml @@ -5,20 +5,21 @@ <parent> <groupId>org.openecomp.sdnc.oam</groupId> <artifactId>installation</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <packaging>pom</packaging> <groupId>org.openecomp.sdnc.oam</groupId> <artifactId>installation-dgbuilder</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <name>Installation - dgbuilder</name> <description>Creates docker container for dgbuilder</description> <properties> <image.name>openecomp/dgbuilder-sdnc-image</image.name> + <sdnc.project.version>${project.version}</sdnc.project.version> </properties> @@ -27,6 +28,37 @@ <plugin> + <groupId>org.codehaus.groovy.maven</groupId> + <artifactId>gmaven-plugin</artifactId> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source> + println project.properties['sdnc.project.version']; + def versionArray; + if ( project.properties['sdnc.project.version'] != null ) { + versionArray = + project.properties['sdnc.project.version'].split('\\.'); + } + + if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")) { + project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest"; + } else { + project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; + } + + println 'New Tag for docker:' + + project.properties['project.docker.latesttag.version']; + </source> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.16.5</version> @@ -42,7 +74,8 @@ <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> <tags> <tag>${project.version}</tag> - <tag>latest</tag> + <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> + <tag>${project.docker.latesttag.version}</tag> </tags> </build> </image> @@ -51,7 +84,7 @@ <executions> <execution> <id>generate-images</id> - <phase>generate-sources</phase> + <phase>package</phase> <goals> <goal>build</goal> </goals> @@ -99,6 +132,20 @@ <version>1.5.0</version> <executions> <execution> + <id>Make-stage-dir</id> + <phase>generate-sources</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>/bin/mkdir</executable> + <arguments> + <argument>-p</argument> + <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument> + </arguments> + </configuration> + </execution> + <execution> <id>Unzip dgbuilder</id> <phase>generate-sources</phase> <goals> |