-
Bug
-
Resolution: Fixed
-
Minor
I have a multi-branch pipeline job setup in Jenkins set to automatically build open branches. However when I close a branch and delete it from the remote it does not seem to remove the project. I checked the discarded items settings to ensure it was unset, but it seems that Jenkins is picking up the branch even though it was deleted from the remote.
I configured the orphaned item strategy, no change. I tried to scan the pipeline manually, but the branch was still detected. I added steps to git clean and git prune origin, but nothing is removed. I am currently on the latest version of the plugin: 2.15.
For example below, the branch feature/INT-542-Sample was deleted from the remote, but it still is being detected as a branch in Jenkins even after pruning.
Started by user Dean Pearce [Wed Jun 07 13:51:52 EDT 2017] Starting branch indexing... > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to git@bitbucket.org: company-ondemand/project-sync.git > git config remote.origin.url git@bitbucket.org: company-ondemand/sf-st-sync.git # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 using GIT_SSH to set credentials Master SSH Key for Git Creation > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* using GIT_SSH to set credentials Master SSH Key for Git Creation > git ls-remote git@bitbucket.org: company-ondemand/project-sync.git # timeout=10 > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to git@bitbucket.org: company-ondemand/project-sync.git > git config remote.origin.url git@bitbucket.org:company-ondemand/project-sync.git # timeout=10 Fetching & pruning origin... Fetching upstream changes from origin > git --version # timeout=10 using GIT_SSH to set credentials Master SSH Key for Git Creation > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune Getting remote branches... Seen branch in repository origin/develop Seen branch in repository origin/feature/INT-542 Seen branch in repository origin/feature/INT-542-Sample Seen branch in repository origin/master Seen 4 remote branches Checking branch feature/INT-542 ‘Jenkinsfile’ found Met criteria No changes detected: feature/INT-542 (still at a88426b7ac1dad632b5df7b4e165aafa12bddce7) Checking branch develop ‘Jenkinsfile’ found Met criteria No changes detected: develop (still at ec776ac8e6c639ea2b395f92e8aad572945ae270) Checking branch master ‘Jenkinsfile’ not found Does not meet criteria Checking branch feature/INT-542-Sample ‘Jenkinsfile’ found Met criteria No changes detected: feature/INT-542-Sample (still at ec776ac8e6c639ea2b395f92e8aad572945ae270) Done. [Wed Jun 07 13:51:54 EDT 2017] Finished branch indexing. Indexing took 2.2 sec Finished: SUCCESS
[JENKINS-44751] Multi-Branch Pipeline Not Pruning Branches Deleted from Remote
Description |
Original:
I have a multi-branch pipeline job setup in Jenkins set to automatically build open branches. However when I close a branch and delete it from the remote it does not seem to remove the project. I checked the discarded items settings to ensure it was unset, but it seems that Jenkins is picking up the branch even though it was deleted from the remote. I configured the orphaned item strategy, no change. I tried to scan the pipeline manually, but the branch was still detected. I added steps to git clean and git prune origin, but nothing is removed. For example below, the branch feature/INT-542-Sample was deleted from the remote, but it still is being detected as a branch in Jenkins even after pruning. {noformat} Started by user Dean Pearce [Wed Jun 07 13:51:52 EDT 2017] Starting branch indexing... > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to git@bitbucket.org: company-ondemand/project-sync.git > git config remote.origin.url git@bitbucket.org: company-ondemand/sf-st-sync.git # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 using GIT_SSH to set credentials Master SSH Key for Git Creation > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* using GIT_SSH to set credentials Master SSH Key for Git Creation > git ls-remote git@bitbucket.org: company-ondemand/project-sync.git # timeout=10 > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to git@bitbucket.org: company-ondemand/project-sync.git > git config remote.origin.url git@bitbucket.org:company-ondemand/project-sync.git # timeout=10 Fetching & pruning origin... Fetching upstream changes from origin > git --version # timeout=10 using GIT_SSH to set credentials Master SSH Key for Git Creation > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune Getting remote branches... Seen branch in repository origin/develop Seen branch in repository origin/feature/INT-542 Seen branch in repository origin/feature/INT-542-Sample Seen branch in repository origin/master Seen 4 remote branches Checking branch feature/INT-542 ‘Jenkinsfile’ found Met criteria No changes detected: feature/INT-542 (still at a88426b7ac1dad632b5df7b4e165aafa12bddce7) Checking branch develop ‘Jenkinsfile’ found Met criteria No changes detected: develop (still at ec776ac8e6c639ea2b395f92e8aad572945ae270) Checking branch master ‘Jenkinsfile’ not found Does not meet criteria Checking branch feature/INT-542-Sample ‘Jenkinsfile’ found Met criteria No changes detected: feature/INT-542-Sample (still at ec776ac8e6c639ea2b395f92e8aad572945ae270) Done. [Wed Jun 07 13:51:54 EDT 2017] Finished branch indexing. Indexing took 2.2 sec Finished: SUCCESS{noformat} |
New:
I have a multi-branch pipeline job setup in Jenkins set to automatically build open branches. However when I close a branch and delete it from the remote it does not seem to remove the project. I checked the discarded items settings to ensure it was unset, but it seems that Jenkins is picking up the branch even though it was deleted from the remote. I configured the orphaned item strategy, no change. I tried to scan the pipeline manually, but the branch was still detected. I added steps to git clean and git prune origin, but nothing is removed. I am currently on the latest version of the plugin: 2.15. For example below, the branch feature/INT-542-Sample was deleted from the remote, but it still is being detected as a branch in Jenkins even after pruning. {noformat} Started by user Dean Pearce [Wed Jun 07 13:51:52 EDT 2017] Starting branch indexing... > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to git@bitbucket.org: company-ondemand/project-sync.git > git config remote.origin.url git@bitbucket.org: company-ondemand/sf-st-sync.git # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 using GIT_SSH to set credentials Master SSH Key for Git Creation > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* using GIT_SSH to set credentials Master SSH Key for Git Creation > git ls-remote git@bitbucket.org: company-ondemand/project-sync.git # timeout=10 > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to git@bitbucket.org: company-ondemand/project-sync.git > git config remote.origin.url git@bitbucket.org:company-ondemand/project-sync.git # timeout=10 Fetching & pruning origin... Fetching upstream changes from origin > git --version # timeout=10 using GIT_SSH to set credentials Master SSH Key for Git Creation > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune Getting remote branches... Seen branch in repository origin/develop Seen branch in repository origin/feature/INT-542 Seen branch in repository origin/feature/INT-542-Sample Seen branch in repository origin/master Seen 4 remote branches Checking branch feature/INT-542 ‘Jenkinsfile’ found Met criteria No changes detected: feature/INT-542 (still at a88426b7ac1dad632b5df7b4e165aafa12bddce7) Checking branch develop ‘Jenkinsfile’ found Met criteria No changes detected: develop (still at ec776ac8e6c639ea2b395f92e8aad572945ae270) Checking branch master ‘Jenkinsfile’ not found Does not meet criteria Checking branch feature/INT-542-Sample ‘Jenkinsfile’ found Met criteria No changes detected: feature/INT-542-Sample (still at ec776ac8e6c639ea2b395f92e8aad572945ae270) Done. [Wed Jun 07 13:51:54 EDT 2017] Finished branch indexing. Indexing took 2.2 sec Finished: SUCCESS{noformat} |
Component/s | New: git-plugin [ 15543 ] | |
Component/s | Original: workflow-multibranch-plugin [ 21465 ] | |
Labels | New: multibranch |
Component/s | New: bitbucket-branch-source-plugin [ 21428 ] | |
Component/s | Original: git-plugin [ 15543 ] |
Component/s | New: git-plugin [ 15543 ] | |
Component/s | Original: bitbucket-branch-source-plugin [ 21428 ] |
Attachment | New: Screen Shot 2017-07-20 at 10.07.18.png [ 38972 ] |
Remote Link | New: This issue links to "PR#514 (Web Link)" [ 17309 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Assignee | New: Stephen Connolly [ stephenconnolly ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "Page (Jenkins Wiki)" [ 17357 ] |