Add setDockerLabels method
* Add mandatory LABEL to the end of the Dockerfile
* User can also add some custom properties
1. Simple usage, which adds mandatory properties to Dockerfile which
is located in current directory
tools.setDockerfileLabels()
2. Extended usage, add Labels to calico ctl and node images
def properties = [
"CALICO_NODE_IMAGE_REPO=${calicoNodeImageRepo}",
"CALICOCTL_IMAGE_REPO=${calicoCtlImageRepo}",
"CALICO_VERSION=${calicoVersion}"
]
tools.setDockerfileLabels("./calicoctl/Dockerfile", properties)
tools.setDockerfileLabels("./calico_node/Dockerfile", properties)
Change-Id: I0f9e6b83d4ffe5fe6a5ff02da50658b9eded5824
diff --git a/src/ci/mcp/Tools.txt b/src/ci/mcp/Tools.txt
index 2c4c1d5..8229970 100644
--- a/src/ci/mcp/Tools.txt
+++ b/src/ci/mcp/Tools.txt
@@ -45,6 +45,24 @@
server.publishBuildInfo buildInfo
+setDockerfileLabels
+-------------------
+// simple usage, which adds mandatory properties to Dockerfile which is
+// located in current directory
+tools.setDockerfileLabels()
+
+// extended usage
+// add Labels to calico ctl and node images
+ def properties = [
+ "CALICO_NODE_IMAGE_REPO=${calicoNodeImageRepo}",
+ "CALICOCTL_IMAGE_REPO=${calicoCtlImageRepo}",
+ "CALICO_VERSION=${calicoVersion}"
+ ]
+ tools.setDockerfileLabels("./calicoctl/Dockerfile", properties)
+ tools.setDockerfileLabels("./calico_node/Dockerfile", properties)
+
+
+
uriByProperties
---------------