I created a new pipeline for testing purposes to build a feature branch.
Git branch: feature/show-percentage-of-completion Script path: Jenkinsfile-cirrus-dev-feature Lightweight checkout: Not checked
When I run the build, I get this error below:
Started by user woodsman1@mycompany.com
Checking out git git@github.mycompany.com:IC2E-SPRINT/cirrus-bluecost-ssc-file-generator.git into /jenkins_data/jenkins_home/jobs/cirrus-bluecost-ssc-cost-file-generator-dev-feature/workspace@script to read Jenkinsfile-cirrus-dev-feature
The recommended git tool is: git
using credential bluecost_git
> git rev-parse --resolve-git-dir /jenkins_data/jenkins_home/jobs/cirrus-bluecost-ssc-cost-file-generator-dev-feature/workspace@script/.git # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git@github.mycompany.com:IC2E-SPRINT/cirrus-bluecost-ssc-file-generator.git # timeout=10
Fetching upstream changes from git@github.mycompany.com:IC2E-SPRINT/cirrus-bluecost-ssc-file-generator.git
> git --version # timeout=10
> git --version # 'git version 2.20.1'
using GIT_SSH to set credentials Bluecost (dpydalsprd101.sl.bluecloud.mycompany.com, /home/bluecost/.ssh )
> git fetch --tags --force --progress -- git@github.mycompany.com:IC2E-SPRINT/cirrus-bluecost-ssc-file-generator.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git rev-parse refs/remotes/origin/feature/show-percentage-of-completion^{commit} # timeout=10
> git rev-parse origin/feature/show-percentage-of-completion^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
ERROR: Maximum checkout retry attempts reached, aborting
Finished: FAILURE
What I don't understand about Jenkins is that I give it a repo and a branch name. Does it do git clone my-repo and then git checkout my-branch? No, it have to do this weird git --version, git --version ; git fetch; git rev-parse; git rev-parse. I have no idea why they found a set of cryptic steps to do this.
Also, I've verified both the repository and the branch exist. If I switched to the test branch, it would work. Why?
PS: a comment was made about checking the ref/spec. I wasn't sure where the commenter was referring, but I noticed this exists in the .git/config file as follows:
[branch "feature/show-percentage-of-completion"]
remote = origin
merge = refs/heads/feature/show-percentage-of-completion