Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not need gstring for simple variable ref #9

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 16 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ pipeline {
stages {
stage("Checkout") {
steps {
// echo "Branch is ${env.BRANCH_NAME}"
// echo "scm is ${scm}"
// echo "scm.userRemoteConfigs is ${scm.userRemoteConfigs}"
// echo "scm.userRemoteConfigs[0].url is ${scm.userRemoteConfigs[0].url}"
// sh "env | sort"
echo "**** Branch is ${env.BRANCH_NAME} ****"
echo "**** scm.branches is ${scm.branches} ****"
echo "**** scm.userRemoteConfigs[0] is ${scm.userRemoteConfigs[0]} ****"
checkout(
[ $class: 'GitSCM',
branches: [[name: "refs/heads/${env.BRANCH_NAME}"]],
extensions: [
[ $class: 'CloneOption', depth: 1, honorRefspec: true, noTags: true, reference: '/var/lib/git/mwaite/bugs/jenkins-bugs.git', shallow: true],
[ $class: 'LocalBranch', localBranch: env.BRANCH_NAME],
[ $class: 'PruneStaleBranch']
branches: scm.branches, // Assumes the multibranch pipeline checkout branch definition is sufficient
// extensions: [
// [ $class: 'CloneOption', shallow: true, depth: 1, honorRefspec: true, noTags: true, reference: '/var/lib/git/mwaite/bugs/jenkins-bugs.git'],
// [ $class: 'LocalBranch', localBranch: env.BRANCH_NAME ],
// [ $class: 'PruneStaleBranch' ]
// ],
// Add honor refspec and reference repo for speed and space improvement
extensions: scm.extensions + [
[$class: 'CloneOption', honorRefspec: true, noTags: true, reference: '/var/lib/git/mwaite/bugs/jenkins-bugs.git'],
],
gitTool: scm.gitTool,
userRemoteConfigs: [
[ refspec: scm.userRemoteConfigs[0].refspec,
url: scm.userRemoteConfigs[0].url
]
]
// Default is missing narrow refspec
userRemoteConfigs: [ [ refspec: '+refs/heads/JENKINS-61120:refs/remotes/origin/JENKINS-61120', url: scm.userRemoteConfigs[0].url ] ]
// userRemoteConfigs: scm.userRemoteConfigs // Assumes the multibranch pipeline checkout remoteconfig is sufficient
]
)
sh "ant info"
sh( script: 'ant info', label: 'Info target from Apache ant' )
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [JENKINS-xxxxx](https://issues.jenkins-ci.org/browse/JENKINS-xxxxx) check public repository
# [JENKINS-xxxxx](https://issues.jenkins.io/browse/JENKINS-xxxxx) check public repository

Many of the bug reports on the Jenkins git plugin and the Jenkins git
client plugin need a repository which contains specific configurations
Expand Down