Skip to content

Instantly share code, notes, and snippets.

@turboBasic
Last active September 21, 2020 23:07
Show Gist options
  • Save turboBasic/8729d008cc1550b63fc6af35dcec4eb2 to your computer and use it in GitHub Desktop.
Save turboBasic/8729d008cc1550b63fc6af35dcec4eb2 to your computer and use it in GitHub Desktop.
Create config provider object on master using Job DSL script #jenkins #job-dsl

Create config-provider object using Job DSL

configFiles {
    propertiesConfig {
        id 'conf-0100-properties'
        name 'created-by-dsl-properties'
        content '''
            GIT.COMMITTER_NAME = name
            GIT.COMMITTER_EMAIL = someone@example.com
        '''
        comment ''
        propertiesCredentialMappings {}
        isReplaceAll true
        providerId 'org.jenkinsci.plugins.configfiles.properties.PropertiesConfig'
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment