On Tuesday, June 27, 2017 at 5:01:46 PM UTC-6, Mark Waite wrote: > > I suspect you're encountering a conflict between the git plugin > maintaining compatibility with old behavior, and the desire to support > branch names which contain slashes. > > Refer to the online help in the git plugin for alternate ways to define a > branch name. The format "word/word" is (unfortunately) ambiguous since it > can be interpreted as either the local branch "feature/branch" or as a > branch named "branch" on a remote named "feature". > > If you'll ask for "remote/feature/branch", I think you'll get the result > you want. > > As in, "origin/feature/branch" if you're using the default remote name, "origin".
> Refer to https://issues.jenkins-ci.org/browse/JENKINS-14026 for more > history on the issue. > > Mark Waite > > On Tuesday, June 27, 2017 at 3:53:07 PM UTC-6, Abhijith Reddy wrote: >> >> Whenever i specify a branch with GitSCM i see the following issue >> Couldn't find any revision to build. Verify the repository and branch >> configuration for this job. >> >> Here's my Jenkinsfile >> >> node { >> >> deleteDir() >> checkout([$class: 'GitSCM', branches: [[name: 'feature/my-branch]], >> doGenerateSubmoduleConfigurations: false, extensions: [[$class: >> 'CleanBeforeCheckout'],[$class: 'PruneStaleBranch']], submoduleCfg: [], >> userRemoteConfigs: [[credentialsId: 'aaa-aaa-aaa-aaa', url: GIT_URL]]]) >> } >> >> >> and here is the error >> >> >> Checking out git ssh://[email protected]:7999/capt/jenkins-pipelines.git to >> read Jenkinsfile-pull-request >> Wiping out workspace first. >> Cloning the remote Git repository >> Cloning repository ssh://[email protected]:7999/capt/jenkins-pipelines.git >> <http://www.google.com/url?q=http%3A%2F%2Fgit%40stash.com%3A7999%2Fcapt%2Fjenkins-pipelines.git&sa=D&sntz=1&usg=AFQjCNEPRxx-toyDGK3W7XTQn3AjWKtNpg> >> > git init >> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline@script >> >> # timeout=10 >> Fetching upstream changes from ssh:// >> [email protected]:7999/capt/jenkins-pipelines.git >> > git --version # timeout=10 >> using GIT_SSH to set credentials automated repo access >> > git fetch --tags --progress ssh:// >> [email protected]:7999/capt/jenkins-pipelines.git >> +refs/heads/*:refs/remotes/origin/* >> > git config remote.origin.url ssh:// >> [email protected]:7999/capt/jenkins-pipelines.git # timeout=10 >> > git config --add remote.origin.fetch >> +refs/heads/*:refs/remotes/origin/* # timeout=10 >> > git config remote.origin.url ssh:// >> [email protected]:7999/capt/jenkins-pipelines.git # timeout=10 >> Fetching upstream changes from ssh:// >> [email protected]:7999/capt/jenkins-pipelines.git >> using GIT_SSH to set credentials automated repo access >> > git fetch --tags --progress ssh:// >> [email protected]:7999/capt/jenkins-pipelines.git >> +refs/heads/*:refs/remotes/origin/* >> > git rev-parse origin/develop^{commit} # timeout=10 >> Checking out Revision 81cbf859af011118d159c8c3a89cb796b4b1b536 >> (origin/develop) >> > git config core.sparsecheckout # timeout=10 >> > git checkout -f 81cbf859af011118d159c8c3a89cb796b4b1b536 >> > git rev-list 571b6661262fa11ce2e1088338c1f19cd1a5110d # timeout=10 >> First time build. Skipping changelog. >> [Pipeline] node >> Running on q7bld02 in >> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline >> [Pipeline] { >> [Pipeline] deleteDir >> [Pipeline] checkout >> Cloning the remote Git repository >> Cloning repository ssh://[email protected]:7999/api/mpp.git >> > git init >> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline >> # timeout=10 >> Fetching upstream changes from ssh://[email protected]:7999/api/mpp.git >> > git --version # timeout=10 >> using GIT_SSH to set credentials automated repo access >> > git fetch --tags --progress ssh://[email protected]:7999/api/mpp.git >> +refs/heads/*:refs/remotes/origin/* >> > git config remote.origin.url ssh://[email protected]:7999/api/mpp.git # >> timeout=10 >> > git config --add remote.origin.fetch >> +refs/heads/*:refs/remotes/origin/* # timeout=10 >> > git config remote.origin.url ssh://[email protected]:7999/api/mpp.git # >> timeout=10 >> Cleaning workspace >> > git rev-parse --verify HEAD # timeout=10 >> No valid HEAD. Skipping the resetting >> > git clean -fdx # timeout=10 >> Pruning obsolete local branches >> Fetching upstream changes from ssh://[email protected]:7999/api/mpp.git >> using GIT_SSH to set credentials automated repo access >> > git fetch --tags --progress ssh://[email protected]:7999/api/mpp.git >> +refs/heads/*:refs/remotes/origin/* --prune >> > git rev-parse feature/XMEN-512-duplicate-contact-cleanup^{commit} # >> timeout=10 >> > git rev-parse >> refs/remotes/origin/feature/XMEN-512-duplicate-contact-cleanup^{commit} # >> timeout=10 >> > git rev-parse feature/XMEN-512-duplicate-contact-cleanup^{commit} # >> timeout=10 >> [Pipeline] } >> [Pipeline] // node >> [Pipeline] End of Pipeline >> ERROR: Couldn't find any revision to build. Verify the repository and >> branch configuration for this job. >> Finished: FAILURE >> >> >> -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/24b4eee3-3dfb-41fe-bb66-c93b6a6934ae%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
