Skip to content

Instantly share code, notes, and snippets.

@visitbethel
Created February 2, 2017 17:52
Show Gist options
  • Save visitbethel/61df84a215521cf24b854e216dad20f3 to your computer and use it in GitHub Desktop.
Save visitbethel/61df84a215521cf24b854e216dad20f3 to your computer and use it in GitHub Desktop.
Jenkins Pipeline GitSCM
=====> https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitSCM.java#L161
@DataBoundConstructor
public GitSCM(
List<UserRemoteConfig> userRemoteConfigs,
List<BranchSpec> branches,
Boolean doGenerateSubmoduleConfigurations,
Collection<SubmoduleConfig> submoduleCfg,
@CheckForNull GitRepositoryBrowser browser,
@CheckForNull String gitTool,
List<GitSCMExtension> extensions) {
=====> Pipeline
checkout([$class: 'GitSCM',
branches: [[name: "origin/${BRANCH_PATTERN}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'LocalBranch']],
submoduleCfg: [],
userRemoteConfigs: [[
credentialsId: 'bitwiseman_github',
url: 'https://github.com/bitwiseman/hermann']]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment