Merge "Add failFast option for parallel builds for salt-ci-wrapper"
diff --git a/aptly-promote-pipeline.groovy b/aptly-promote-pipeline.groovy
index 1d12d97..795080f 100644
--- a/aptly-promote-pipeline.groovy
+++ b/aptly-promote-pipeline.groovy
@@ -28,12 +28,10 @@
timeout(time: 12, unit: 'HOURS') {
node("docker&&hardware") {
try {
- if ("testing" in TARGET && !jenkinsUtils.currentUserInGroup(["release-engineering", "aptly-promote-users"])) {
+
+ if (!jenkinsUtils.currentUserInGroup(["release-engineering", "aptly-promote-users"])) {
insufficientPermissions = true
- throw new Exception("Only release-engineering or aptly-promote-users can perform promote to testing.")
- } else if (!jenkinsUtils.currentUserInGroup(["release-engineering"])) {
- insufficientPermissions = true
- throw new Exception("Only release-engineering team can perform promote.")
+ throw new Exception("Only release-engineering or aptly-promote-users can perform promote to " + TARGET)
}
stage("promote") {
// promote is restricted to users in aptly-promote-users LDAP group