aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUbuntu <lji@research.att.com>2017-02-23 03:56:16 +0000
committerUbuntu <lji@research.att.com>2017-02-23 03:56:16 +0000
commitadacdc4280f0e487bde1ba3424a6fc66d4b02000 (patch)
tree73e4cf55cd2e90f73e9400421ec2616bd5409b51
parentc91f09fe9f004dd368bbb7d6d93deefb3557ec46 (diff)
docker naming, version, staging
Change-Id: I5077d67a4c0a3ab61e1a09a39c62be6ecb081fcd Signed-off-by: Ubuntu <lji@research.att.com>
-rw-r--r--pom.xml11
-rwxr-xr-xscript-dmaapbc-docker-build.sh20
-rw-r--r--version.properties6
3 files changed, 33 insertions, 4 deletions
diff --git a/pom.xml b/pom.xml
index 748dceb..3c7abe1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -145,6 +145,17 @@
</dependency>
</dependencies>
</plugin>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.7</version>
+ <extensions>true</extensions>
+ <configuration>
+ <serverId>ecomp-staging</serverId>
+ <nexusUrl>${nexusproxy}</nexusUrl>
+ <stagingProfileId>176c31dfe190a</stagingProfileId>
+ </configuration>
+ </plugin>
</plugins>
<pluginManagement>
<plugins>
diff --git a/script-dmaapbc-docker-build.sh b/script-dmaapbc-docker-build.sh
index 5727f55..252aa5a 100755
--- a/script-dmaapbc-docker-build.sh
+++ b/script-dmaapbc-docker-build.sh
@@ -23,8 +23,14 @@ else
fi
-IMAGE='dcae_dmaapbc'
-TAG='1.0.0'
+IMAGE='openecomp/dcae_dmaapbc'
+VERSION=$(xpath -e "//project/version/text()" "pom.xml")
+EXT=$(echo "$VERSION" | rev | cut -f1 -d'-' | rev)
+if [ "$EXT" == "SNAPSHOT" ]; then
+ VERSION=$(echo "$VERSION" | rev | cut -f2- -d'-' | rev)
+fi
+TIMESTAMP=$(date +%C%y%m%dT%H%M%S)
+TAG="$VERSION-$TIMESTAMP"
LFQI="${IMAGE}:${TAG}"
BUILD_PATH="${WORKSPACE}"
@@ -43,6 +49,12 @@ fi
# snapshot registry nexus3.openecomp.org:10003"
REPO='nexus3.openecomp.org:10003'
RFQI="${REPO}/${LFQI}"
-docker tag ${LFQI} ${RFQI}
-docker push ${RFQI}
+docker tag "${LFQI}" "${RFQI}"
+docker push "${RFQI}"
+
+TAG="latest"
+LFQI="${IMAGE}:${TAG}"
+RFQI2="${REPO}/${LFQI}"
+docker tag "${RFQI}" "${RFQI2}"
+docker push "${RFQI2}"
diff --git a/version.properties b/version.properties
new file mode 100644
index 0000000..8bc13ef
--- /dev/null
+++ b/version.properties
@@ -0,0 +1,6 @@
+major=1
+minor=0
+patch=0
+base_version="${major}.${minor}.${patch}"
+release_version=${base_version}
+snapshot_version=${base_version}-SNAPSHOT