Moving to xargs instead of trying to use groovy.
Change-Id: I6346908298730e1108440478da6413522191ef6d
diff --git a/cicd/pipelines/tasks/task_update_mirrors.jenkins b/cicd/pipelines/tasks/task_update_mirrors.jenkins
index a5ab188..d4ba653 100644
--- a/cicd/pipelines/tasks/task_update_mirrors.jenkins
+++ b/cicd/pipelines/tasks/task_update_mirrors.jenkins
@@ -26,13 +26,19 @@
stage('Mirror') {
for (mirror in mirrorList) {
- sh "aptly update ${mirror}"
+ sh """
+ aptly mirror list -raw \
+ | xargs -n1 aptly update
+ """
}
}
stage('Snapshot') {
for (mirror in mirrorList) {
- sh "aptly snapshot create ${mirror}-${stamp} from mirror ${mirror}"
+ sh """
+ aptly mirror list -raw \
+ | xargs -n1 -d_ aptly snapshot create _-${stamp} from mirror _
+ """
}
}
}