From 4d19876e687e3c6bec24e967c2812a46669de94e Mon Sep 17 00:00:00 2001 From: ChrisC Date: Fri, 12 Jun 2020 10:31:14 +0200 Subject: 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 --- pom.xml | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) 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 -- cgit 1.2.3-korg