Skip to content

Commit

Permalink
Fix duplicated method slack it (#7)
Browse files Browse the repository at this point in the history
Add default values to execute argument in stage and slackIt methods
  • Loading branch information
Yogesh Lonkar authored Jul 9, 2019
1 parent a1329bf commit b6460b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/org/lonkar/jenkinsutils/PipelineUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PipelineUtils implements Serializable {
* @param block stage block code
* @return stage object
*/
def stage(name, execute, block) {
def stage(name, boolean execute = true, block) {
if (hasAnsiSupport && !disableAnsi) {
if (execute) {
return this.pipeline.wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'xterm']) {
Expand Down Expand Up @@ -132,7 +132,7 @@ class PipelineUtils implements Serializable {
* @param config.channel?: optional string for sending notification to @individual or #group
* @param config.extraAttachements optional array of attachment object refer https://api.slack.com/docs/message-attachments#fields
*/
def void slackIt(execute = true, config = [:]) {
def void slackIt(boolean execute = true, config = [:]) {
if (!execute) {
return
}
Expand Down

0 comments on commit b6460b1

Please sign in to comment.