-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
openshift-4.16
-
False
-
None
-
False
-
-
-
Description of problem:
Scan Multibranch Pipeline is failing with error "Finished: NOT_BUILT" as it seems to only detect one branch.
It works fine first time the pipeline is created but when we click on " Scan Multibranch Pipeline Now" again it start failing.
It's working fine with earlier Jenkins version 2.440.3. Also issue happens while using gitlab repo only it works fine with github repo.
Workaround -: Use older Jenkins version
Prerequisites (if any, like setup, operators/versions):
Jenkins version 2.462.1 with [Image |registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.15.0-1725667716]
OCP Version 4.15.x or 4.16.x
Steps to Reproduce
1. Import any multiple branch repo to gitlab. 2. Start instance of jenkins using below Red Hat [image|registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.15.0-1725667716]
3. Login to Jenkins --> Add new item -> Select Multi Branch Project. Select Source as Git and repo URL the gitlab URL
4. First time the scan detects all 3 branches and build is successful but from second attempt it fails with "NOT_BUILT"
5. Same set up works fine if we use source has github and pass github url for same repo or if we use earlier version [image|registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.14.0-1716468091 ]
Actual results: Fails with error "NOT_BUILT"
Expected results: Build Successful
Reproducibility (Always/Intermittent/Only Once): Always
Definition of Done: Build to be successful everytime
Additional info (Such as Logs, Screenshots, etc):
Started by user Jenkins Admin [Wed Oct 16 09:44:15 UTC 2024] Starting branch indexing... > git --version # timeout=10 > git --version # 'git version 2.43.5' using GIT_ASKPASS to set credentials > git ls-remote --symref -- https://gitlab.com/sudhi4/building-a-multibranch-pipeline-project.git # timeout=10 > git rev-parse --resolve-git-dir /var/lib/jenkins/caches/git-1c9a457bce88818b4b1e7504df599cda/.git # timeout=10 Setting origin to https://gitlab.com/sudhi4/building-a-multibranch-pipeline-project.git > git config remote.origin.url https://gitlab.com/sudhi4/building-a-multibranch-pipeline-project.git # timeout=10 Fetching & pruning origin... Listing remote references... > git config --get remote.origin.url # timeout=10 > git --version # timeout=10 > git --version # 'git version 2.43.5' using GIT_ASKPASS to set credentials > git ls-remote -h -- https://gitlab.com/sudhi4/building-a-multibranch-pipeline-project.git # timeout=10 Fetching upstream changes from origin > git config --get remote.origin.url # timeout=10 using GIT_ASKPASS to set credentials > git fetch --tags --force --progress --prune -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10 Checking branches... Checking branch production 'Jenkinsfile' found Met criteria [Wed Oct 16 09:44:19 UTC 2024] Finished branch indexing. Indexing took 4.7 sec Finished: NOT_BUILT