Class Approval
- All Implemented Interfaces:
Configurable
,KeyVal.Mixin
,UtilsMixin
/*
* Copyright 2022 Thoughtworks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
stage('deploy') {
approval {
type = 'manual'
allowOnlyOnSuccess = false
users = ['bob', 'alice']
roles = ['admins', 'deployers']
}
}
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getRoles()
The list of roles that are authorized to triggergetType()
The type of the approval, either'manual'
or'success'
getUsers()
The list of users that are authorized to triggerint
hashCode()
boolean
Configuration to only allow stage to be scheduled if the previous stage run is successful.void
setAllowOnlyOnSuccess
(boolean allowOnlyOnSuccess) Configuration to only allow stage to be scheduled if the previous stage run is successful.void
The list of roles that are authorized to triggervoid
The type of the approval, either'manual'
or'success'
void
The list of users that are authorized to triggertoString()
Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.Configurable
configure
Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.KeyVal.Mixin
lookup, lookup
Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.UtilsMixin
sanitizeName
-
Constructor Details
-
Approval
public Approval()
-
-
Method Details
-
getType
The type of the approval, either'manual'
or'success'
-
isAllowOnlyOnSuccess
public boolean isAllowOnlyOnSuccess()Configuration to only allow stage to be scheduled if the previous stage run is successful. -
getRoles
The list of roles that are authorized to trigger -
getUsers
The list of users that are authorized to trigger -
setType
The type of the approval, either'manual'
or'success'
-
setAllowOnlyOnSuccess
public void setAllowOnlyOnSuccess(boolean allowOnlyOnSuccess) Configuration to only allow stage to be scheduled if the previous stage run is successful. -
setRoles
The list of roles that are authorized to trigger -
setUsers
The list of users that are authorized to trigger -
equals
-
hashCode
public int hashCode() -
toString
-