Jenkins – Example DSL Pipeline

Sample Pipeline configuration file for a DSL module. This is a parameterized build. Jenkinsfile is located at the root of the repository.

pipelineJob('DSL_Pipeline') {
    displayName('DSL Pipeline')
    definition {
        cpsScm {
            scm {
                git {
                    branches('*/dsl-test')
                    remote {
                        url ('[email protected]:artem/devops.git')
                        credentials ('artem-github')
                    }
                }
                scriptPath ('Jenkinsfile')
                lightweight (true)
            }
        }
    }
    parameters {
        choiceParam('Environment', ['staging', 'production', 'staging-without-cache'], 'Please choice env to build')
    }
    triggers {
        bitbucketPush()
    }
}

Tagged: Tags

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments