Do not use ansi colors for test-salt-model jobs
It is causing huge log files in Jenkins.
Change-Id: Ia4a59af69ee14c34df5c8dc63dc07d0378bd2f2d
diff --git a/src/com/mirantis/mk/SaltModelTesting.groovy b/src/com/mirantis/mk/SaltModelTesting.groovy
index 5bba09b..6415d55 100644
--- a/src/com/mirantis/mk/SaltModelTesting.groovy
+++ b/src/com/mirantis/mk/SaltModelTesting.groovy
@@ -7,7 +7,7 @@
* @param extraFormulas extraFormulas to install
* @param formulasSource formulas source (git or pkg)
* @param testDir directory of model
- * @param formulasSource Salt formulas source type (optional, default pkg)
+ * @param formulasSource Salt formulas source type (optional, default pkg)
* @param formulasRevision APT revision for formulas (optional default stable)
*/
@@ -43,38 +43,35 @@
is_mk_ci = false
}
- wrap([$class: 'AnsiColorBuildWrapper']) {
- if (!imageFound) {
- sh("apt-get update && apt-get install -y curl subversion git python-pip sudo python-pip python-dev zlib1g-dev git")
- sh("pip install git+https://github.com/epcim/reclass.git@pr/fix/fix_raise_UndefinedVariableError")
- }
- sh("mkdir -p /srv/salt/ || true")
- sh("cp -r ${testDir} /srv/salt/reclass")
- sh("svn export --force https://github.com/salt-formulas/salt-formulas/trunk/deploy/scripts /srv/salt/scripts")
- sh("git config --global user.email || git config --global user.email 'ci@ci.local'")
- sh("git config --global user.name || git config --global user.name 'CI'")
+ if (!imageFound) {
+ sh("apt-get update && apt-get install -y curl subversion git python-pip sudo python-pip python-dev zlib1g-dev git")
+ sh("pip install git+https://github.com/epcim/reclass.git@pr/fix/fix_raise_UndefinedVariableError")
+ }
+ sh("mkdir -p /srv/salt/ || true")
+ sh("cp -r ${testDir} /srv/salt/reclass")
+ sh("svn export --force https://github.com/salt-formulas/salt-formulas/trunk/deploy/scripts /srv/salt/scripts")
+ sh("git config --global user.email || git config --global user.email 'ci@ci.local'")
+ sh("git config --global user.name || git config --global user.name 'CI'")
- withEnv(["FORMULAS_SOURCE=${formulasSource}", "EXTRA_FORMULAS=${extraFormulas}", "DISTRIB_REVISION=${formulasRevision}", "DEBUG=1", "MASTER_HOSTNAME=${masterName}", "MINION_ID=${masterName}", "HOSTNAME=cfg01", "DOMAIN=mk-ci.local"]){
- sh("bash -c 'echo $MASTER_HOSTNAME'")
- sh("bash -c 'source /srv/salt/scripts/salt-master-init.sh; cd /srv/salt/scripts && system_config'")
- sh("bash -c 'source /srv/salt/scripts/salt-master-init.sh; cd /srv/salt/scripts && saltmaster_bootstrap'")
- sh("bash -c 'source /srv/salt/scripts/salt-master-init.sh; cd /srv/salt/scripts && saltmaster_init'")
+ withEnv(["FORMULAS_SOURCE=${formulasSource}", "EXTRA_FORMULAS=${extraFormulas}", "DISTRIB_REVISION=${formulasRevision}", "DEBUG=1", "MASTER_HOSTNAME=${masterName}", "MINION_ID=${masterName}", "HOSTNAME=cfg01", "DOMAIN=mk-ci.local"]){
+ sh("bash -c 'echo $MASTER_HOSTNAME'")
+ sh("bash -c 'source /srv/salt/scripts/salt-master-init.sh; cd /srv/salt/scripts && system_config'")
+ sh("bash -c 'source /srv/salt/scripts/salt-master-init.sh; cd /srv/salt/scripts && saltmaster_bootstrap'")
+ sh("bash -c 'source /srv/salt/scripts/salt-master-init.sh; cd /srv/salt/scripts && saltmaster_init'")
- if (!is_mk_ci) {
- sh("bash -c 'source /srv/salt/scripts/salt-master-init.sh; cd /srv/salt/scripts && verify_salt_minions'")
- }
- }
+ if (!is_mk_ci) {
+ sh("bash -c 'source /srv/salt/scripts/salt-master-init.sh; cd /srv/salt/scripts && verify_salt_minions'")
+ }
+ }
- if (is_mk_ci) {
- def nodes = sh script: "find /srv/salt/reclass/nodes -name '*.yml' | grep -v 'cfg*.yml'", returnStdout: true
- for (minion in nodes.tokenize()) {
- def basename = sh script: "basename ${minion} .yml", returnStdout: true
- if (!basename.trim().contains(masterName)) {
- testMinion(basename.trim())
- }
+ if (is_mk_ci) {
+ def nodes = sh script: "find /srv/salt/reclass/nodes -name '*.yml' | grep -v 'cfg*.yml'", returnStdout: true
+ for (minion in nodes.tokenize()) {
+ def basename = sh script: "basename ${minion} .yml", returnStdout: true
+ if (!basename.trim().contains(masterName)) {
+ testMinion(basename.trim())
}
}
-
}
}
}