[How To] Use the plugin mask passwords in a DSL job

Jenkins - how to use the plugin mask passwords in a DSL job

configure { project ->
    project / 'buildWrappers' / 'com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper' / 'varMaskRegexes'() {
        'varMaskRegex'(regex: '.*ad_secret.*')
    }
}

Or:

maskPasswordsBuildWrapper {
    varPasswordPairs {
        varPasswordPair {
            var('mypass')
            password('somepassword')
        }
    }
    varMaskRegexes {
        varMaskRegex {
            regex('expression*')
        }
    }
}



Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
There are no related articles for this article.
MENU

Subscribe to Knowledge Base

Get notified when new articles are added to the knowledge base.