[k8s-slave] Running function can potentially return values
We can expect reutrning values from function which is running
on k8s cluster
Example:
def artifacts = common.runOnKubernetes([
function : this.&buildCalicoContainers,
jnlpImg : jnlpSlaveImg,
slaveImg : jenkinsSlaveImg
])
// run system test
node ('calico'){
stage ("Run system tests") {
build job: 'calico.system-test.deploy', propagate: true, wait: true, parameters:
[
[$class: 'StringParameterValue', name: 'CALICO_NODE_IMAGE_REPO', value: artifacts["CALICO_NODE_IMAGE_REPO"]],
[$class: 'StringParameterValue', name: 'CALICOCTL_IMAGE_REPO', value: artifacts["CALICOCTL_IMAGE_REPO"]],
[$class: 'StringParameterValue', name: 'CALICO_VERSION', value: artifacts["CALICO_VERSION"]],
[$class: 'StringParameterValue', name: 'MCP_BRANCH', value: 'mcp'],
]
}
}
Change-Id: I058537700e0bec06d9e14b422d452e2e7eb45e23
1 file changed