Refactoring in pipelines to better use salt.groovy lib code
Change-Id: I2643dcdff287384aa623900b7f4b131531d85f49
diff --git a/update-mirror-image.groovy b/update-mirror-image.groovy
index 8bde843..e37d537 100644
--- a/update-mirror-image.groovy
+++ b/update-mirror-image.groovy
@@ -70,16 +70,16 @@
if(UPDATE_DOCKER_REGISTRY.toBoolean()){
stage('Update Docker images'){
common.infoMsg("Updating Docker images.")
- salt.enforceState(venvPepper, '*apt*', ['docker.client.registry'], true)
+ salt.enforceState(venvPepper, '*apt*', 'docker.client.registry')
if(CLEANUP_DOCKER_CACHE.toBoolean()){
- salt.runSaltProcessStep(venvPepper, '*apt*', 'cmd.run', ['docker system prune --all --force'], null, true)
+ salt.cmdRun(venvPepper, '*apt*', 'docker system prune --all --force')
}
}
}
if(UPDATE_PYPI.toBoolean()){
stage('Update PyPi packages'){
common.infoMsg("Updating PyPi packages.")
- salt.runSaltProcessStep(venvPepper, '*apt*', 'cmd.run', ['pip2pi /srv/pypi_mirror/packages/ -r /srv/pypi_mirror/requirements.txt'], null, true)
+ salt.cmdRun(venvPepper, '*apt*', 'pip2pi /srv/pypi_mirror/packages/ -r /srv/pypi_mirror/requirements.txt')
}
}
if(UPDATE_GIT.toBoolean()){
@@ -91,7 +91,7 @@
if(UPDATE_IMAGES.toBoolean()){
stage('Update VM images'){
common.infoMsg("Updating VM images.")
- salt.runSaltProcessStep(venvPepper, '*apt*', 'cmd.run', ['/srv/scripts/update-images.sh'], null, true)
+ salt.runSaltProcessStep(venvPepper, '*apt*', '/srv/scripts/update-images.sh')
}
}
} catch (Throwable e) {
@@ -101,4 +101,4 @@
throw e
}
}
-}
\ No newline at end of file
+}