[calico] Change default path to Dockerfile in Felix
Path to the Dockerfile was changed in projectcalico/felix
repository, so changed it in our jobs. Aslo added an ability
to specify a custom path for backward compatibility.
Change-Id: I4f0f2135cbfe8d5498f088c4aa68dad40913e067
diff --git a/src/com/mirantis/mcp/Calico.groovy b/src/com/mirantis/mcp/Calico.groovy
index 0d7428c..2d14741 100644
--- a/src/com/mirantis/mcp/Calico.groovy
+++ b/src/com/mirantis/mcp/Calico.groovy
@@ -414,6 +414,7 @@
* - projectNamespace String, artifactory server namespace (optional)
* - felixImage String, calico/felix image name (optional)
* - felixImageTag String, tag of docker image (optional)
+ * - dockerFilePath String, path to the Dockerfile for image (optional)
*
* Usage example:
*
@@ -434,11 +435,12 @@
def felixImage = config.get('felixImage', "calico/felix")
def felixImageTag = config.get('felixImageTag', git.getGitDescribe(true) + "-" + common.getDatetime())
+ def dockerFilePath = config.get('dockerFilePath', "./docker-image/Dockerfile")
def felixContainerName = dockerRegistry ? "${dockerRegistry}/${projectNamespace}/${felixImage}:${felixImageTag}" : "${felixImage}:${felixImageTag}"
stage ('Build calico/felix image') {
- docker.setDockerfileLabels("./Dockerfile", ["docker.imgTag=${felixImageTag}"])
+ docker.setDockerfileLabels(dockerFilePath, ["docker.imgTag=${felixImageTag}"])
sh """
make calico/felix
docker tag calico/felix ${felixContainerName}