Fix throwing error in docker-mirror-images
Related PROD: https://mirantis.jira.com/browse/PROD-26425
Change-Id: I05055ed9cf57bbdc941c9e3df4ccaf1d7d2849e6
diff --git a/docker-mirror-images.groovy b/docker-mirror-images.groovy
index 163ec5a..9e02cef 100644
--- a/docker-mirror-images.groovy
+++ b/docker-mirror-images.groovy
@@ -75,7 +75,7 @@
tagInRelease = tags.any { tag -> releaseTags.any { tag.contains(it) } }
if (tagInRelease) {
if (!jenkinsUtils.currentUserInGroups(allowedGroups)) {
- error: "You - ${user} - don't have permissions to run this job with tags ${tags}!"
+ throw new Exception("You - ${user} - don't have permissions to run this job with tags ${tags}!")
} else {
echo "User `${user}` belongs to one of groups `${allowedGroups}`. Proceeding..."
}