aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--installation/appc/pom.xml37
-rw-r--r--pom.xml10
2 files changed, 44 insertions, 3 deletions
diff --git a/installation/appc/pom.xml b/installation/appc/pom.xml
index 317273d..e46f1d7 100644
--- a/installation/appc/pom.xml
+++ b/installation/appc/pom.xml
@@ -192,6 +192,40 @@
<build>
<plugins>
<plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <properties>
+ <ver>${project.version}</ver>
+ <timestamp>${maven.build.timestamp}</timestamp>
+ </properties>
+ <source>
+ println project.properties['ver'];
+ def versionArray;
+ if ( project.properties['ver'] != null ) {
+ versionArray = project.properties['ver'].split('\\.');
+ }
+ if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
+ project.properties['dockertag1']=project.properties['ver'] + "-latest";
+ project.properties['dockertag2']="latest";
+ } else {
+ project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+ project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
+ }
+ println 'docker tag 1: ' + project.properties['dockertag1'];
+ println 'docker tag 2: ' + project.properties['dockertag2'];
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.16.5</version>
@@ -205,8 +239,7 @@
<dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
<dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
<tags>
- <!-- <tag>${appc.docker.staging.version}-STAGING-${maven.build.timestamp}</tag> -->
- <tag>${release_name}.${sprint_number}-STAGING-latest</tag>
+ <tag>${dockertag1}</tag>
</tags>
</build>
</image>
diff --git a/pom.xml b/pom.xml
index 83a73fb..ac6e44b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,6 +12,14 @@
<name>APPC Docker Project</name>
<description>The APP-C component contains SDNC Docker Image, and installs APPC/SDNC components on top.</description>
+ <properties>
+ <!-- NEXUS URLS -->
+ <openecomp.nexus.host>nexus.onap.org</openecomp.nexus.host>
+ <openecomp.nexus.url>https://${openecomp.nexus.host}/content</openecomp.nexus.url>
+ <openecomp.nexus.snapshot-url>${openecomp.nexus.url}/repositories/snapshots/</openecomp.nexus.snapshot-url>
+ <openecomp.nexus.release-url>${openecomp.nexus.url}/repositories/releases/</openecomp.nexus.release-url>
+ </properties>
+
<!-- ================================================================================== -->
<!-- Define plugin repositories -->
<!-- ================================================================================== -->
@@ -44,7 +52,7 @@
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
- <nexusUrl>https://nexus.openecomp.org</nexusUrl>
+ <nexusUrl>https://${openecomp.nexus.host}</nexusUrl>
<stagingProfileId>176c31dfe190a</stagingProfileId>
<serverId>ecomp-staging</serverId>
</configuration>