From: ChrisC Date: Fri, 12 Jun 2020 08:31:14 +0000 (+0200) Subject: Add Labels to Docker images X-Git-Tag: 1.7.0~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=4d19876e687e3c6bec24e967c2812a46669de94e;p=sdc%2Fsdc-docker-base.git Add Labels to Docker images Add vcs_ref and vcs_branch as labels in the maven docker build Added a profile to make this work both in local and with Gerrit Issue-ID: SDC-3113 Signed-off-by: ChrisC Change-Id: I341341fe7846b974e5275dcf150d5111c686f38c --- diff --git a/pom.xml b/pom.xml index 5cab49a..6613c29 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,9 @@ ${docker.tag} ${docker.latest.tag} + + {"vcs_branch":"${scmBranch}","vcs_ref":"${scmRevision}"} + ${project.basedir}/base_sdc-jetty @@ -58,6 +61,9 @@ ${docker.tag} ${docker.latest.tag} + + {"vcs_branch":"${scmBranch}","vcs_ref":"${scmRevision}"} + ${project.basedir}/base_sdc-cassandra @@ -71,6 +77,9 @@ ${docker.tag} ${docker.latest.tag} + + {"vcs_branch":"${scmBranch}","vcs_ref":"${scmRevision}"} + ${project.basedir}/base_sdc-cqlsh @@ -84,6 +93,9 @@ ${docker.tag} ${docker.latest.tag} + + {"vcs_branch":"${scmBranch}","vcs_ref":"${scmRevision}"} + ${project.basedir}/base_sdc-python @@ -97,6 +109,9 @@ ${docker.tag} ${docker.latest.tag} + + {"vcs_branch":"${scmBranch}","vcs_ref":"${scmRevision}"} + ${project.basedir}/base_sdc-sanity @@ -110,6 +125,9 @@ ${docker.tag} ${docker.latest.tag} + + {"vcs_branch":"${scmBranch}","vcs_ref":"${scmRevision}"} + ${project.basedir}/base_sdc-vnc @@ -152,8 +170,76 @@ + + org.codehaus.mojo + buildnumber-maven-plugin + 1.4 + + + validate + gen-scm-info + + create + + + + + false + 8 + scmRevision + + + + + + gerrit-only + + + GERRIT_BRANCH + + + + ${GERRIT_BRANCH} + + + + + org.codehaus.mojo + buildnumber-maven-plugin + 1.4 + + + gen-scm-info + none + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + regex-property + + regex-property + + + scmRevision + ${GERRIT_PATCHSET_REVISION} + .{0,32}$ + + + + + + + + + + central