Parametrize default slave
Change-Id: I406be238f9d7abcd874185a822117d23f5291e10
Closes-Bug: PROD-22184 (PROD:22184)
diff --git a/packer-image-buid.groovy b/packer-image-buid.groovy
index 439f40a..0e53b5d 100644
--- a/packer-image-buid.groovy
+++ b/packer-image-buid.groovy
@@ -63,6 +63,7 @@
//
defaultGitRef = job_env.get('DEFAULT_GIT_REF', 'HEAD')
defaultGitUrl = job_env.get('DEFAULT_GIT_URL', null)
+slaveNode = (env.SLAVE_NODE ?: 'jsl23.mcp.mirantis.net')
// Self-check
for (String req_v : ['BUILD_OS', 'BUILD_ONLY','IMAGE_NAME'] ) {
@@ -85,7 +86,7 @@
}
timeout(time: 6, unit: 'HOURS') {
- node("jsl15.mcp.mirantis.net") {
+ node(slaveNode) {
def checkouted = false
def workspace = common.getWorkspace()
creds = common.getPasswordCredentials(job_env.CREDENTIALS_ID)
@@ -206,6 +207,7 @@
// collect artifacts
// TODO make it possible, process multiply artifacts by one run.
dir('images/') {
+ sh(script: 'find .', returnStdout: true)
def _files = findFiles(glob: "*qemu*/${imageName}*")
if (_files.size() > 1) {
common.warningMsg("Multiply artifacts detected!Only first one will be processed!")