Revert "Allow promote only to release-engineering and aptly-promote-users"
This reverts commit 226fa32beba47a9e9c5d3290a9d3d83959afafaa.
Change-Id: I29c0fe6d7dadd4613b024fdbdcf8d3e5a49da36b
diff --git a/aptly-promote-pipeline.groovy b/aptly-promote-pipeline.groovy
index 795080f..b9545a7 100644
--- a/aptly-promote-pipeline.groovy
+++ b/aptly-promote-pipeline.groovy
@@ -29,9 +29,12 @@
node("docker&&hardware") {
try {
- if (!jenkinsUtils.currentUserInGroup(["release-engineering", "aptly-promote-users"])) {
+ if (("testing" in TARGET || "proposed" in TARGET) && !jenkinsUtils.currentUserInGroup(["release-engineering", "aptly-promote-users"])) {
insufficientPermissions = true
- throw new Exception("Only release-engineering or aptly-promote-users can perform promote to " + TARGET)
+ 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.")
}
stage("promote") {
// promote is restricted to users in aptly-promote-users LDAP group