-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
git-plugin compiled from master.
This bug does not exist in git-plugin 2.5.3
Problem
If you compile git-plugin from the source, and set 'Discard old items' in the multibranch pipeline, deleted branches on the SCM are not deleted from the job list. If you install the 2.5.3 version of this plugin and restart Jenkins, these branches are deleted.
How to reproduce it
Configure a Jenkins installation
- Download a fresh Jenkins (2.7.2), rename your current home
- Start it: java -jar jenkins.war
- Choose the default packages option during the first boot
- Clone git-plugin repository, compile it (mvn.cmd '-Dmaven.test.skip=true' clean install hpi:hpi)
- Import your git-plugin (the one you compiled) in Jenkins (advanced tab)
- Restart Jenkins
See the error
- Create a test git repository with a Jenkinsfile on many branches
- Add a new multibranch pipeline, select "Discard old items"
- Save, check that your branches appear in the list
- Delete a branch from your repository. git push origin :features/a-random-branch
- Run a branch indexing
- See that your branch was not deleted
Check that 2.5.3 is working
- Restore the git-plugin in its original version, 2.5.3
- Restart Jenkins
- Rerun branch indexing, see that your branch has disappeared !
Investigations
I didn't have the time to run a Jenkins instance in debug, or to read the commits yet. So I've no idea why this bug happens. I'll update this section later if I've time.
[JENKINS-37727] Multibranch pipeline project jobs are not deleted when branches are deleted
Summary | Original: Branches of multibranch pipelines are not anymore deleted in upstream | New: Jobs of a multibranch pipeline project are not anymore deleted in upstream |
Description |
Original:
h2. Problem If you compile git-plugin from the source, and set 'Discard old items' in the multibranch pipeline, deleted branches on the SCM are not deleted from the job list. If you install the 2.5.3 version of this plugin and restart Jenkins, these branches are deleted. h2. How to reproduce it # Download a fresh Jenkins (2.7.2), rename your current home # Start it: java -jar jenkins.war # Choose the default packages for the first boot # Clone git-plugin repository, compile it (mvn.cmd '-Dmaven.test.skip=true' clean install hpi:hpi) # Import your git-plugin (the one you compiled) in Jenkins (advanced tab) # Restart Jenkins # Create a test git repository with a Jenkinsfile on many branches # Add a new multibranch pipeline, select "Discard old items" # Save, check that your branches appear in the list # Delete a branch from your repository. git push origin :features/a-random-branch # Run a branch indexing # See that your branch was not deleted # Restore the git-plugin in its original version, 2.5.3 # Restart Jenkins # Rerun branch indexing, see that your branch has disappeared ! |
New:
h2. Problem If you compile git-plugin from the source, and set 'Discard old items' in the multibranch pipeline, deleted branches on the SCM are not deleted from the job list. If you install the 2.5.3 version of this plugin and restart Jenkins, these branches are deleted. h2. How to reproduce it *Configure a Jenkins installation* # Download a fresh Jenkins (2.7.2), rename your current home # Start it: java -jar jenkins.war # Choose the default packages option during the first boot # Clone git-plugin repository, compile it (mvn.cmd '-Dmaven.test.skip=true' clean install hpi:hpi) # Import your git-plugin (the one you compiled) in Jenkins (advanced tab) # Restart Jenkins *See the error* # Create a test git repository with a Jenkinsfile on many branches # Add a new multibranch pipeline, select "Discard old items" # Save, check that your branches appear in the list # Delete a branch from your repository. git push origin :features/a-random-branch # Run a branch indexing # See that your branch was not deleted *Check that 2.5.3 is working* # Restore the git-plugin in its original version, 2.5.3 # Restart Jenkins # Rerun branch indexing, see that your branch has disappeared ! |
Description |
Original:
h2. Problem If you compile git-plugin from the source, and set 'Discard old items' in the multibranch pipeline, deleted branches on the SCM are not deleted from the job list. If you install the 2.5.3 version of this plugin and restart Jenkins, these branches are deleted. h2. How to reproduce it *Configure a Jenkins installation* # Download a fresh Jenkins (2.7.2), rename your current home # Start it: java -jar jenkins.war # Choose the default packages option during the first boot # Clone git-plugin repository, compile it (mvn.cmd '-Dmaven.test.skip=true' clean install hpi:hpi) # Import your git-plugin (the one you compiled) in Jenkins (advanced tab) # Restart Jenkins *See the error* # Create a test git repository with a Jenkinsfile on many branches # Add a new multibranch pipeline, select "Discard old items" # Save, check that your branches appear in the list # Delete a branch from your repository. git push origin :features/a-random-branch # Run a branch indexing # See that your branch was not deleted *Check that 2.5.3 is working* # Restore the git-plugin in its original version, 2.5.3 # Restart Jenkins # Rerun branch indexing, see that your branch has disappeared ! |
New:
h2. Problem If you compile git-plugin from the source, and set 'Discard old items' in the multibranch pipeline, deleted branches on the SCM are not deleted from the job list. If you install the 2.5.3 version of this plugin and restart Jenkins, these branches are deleted. h2. How to reproduce it *Configure a Jenkins installation* # Download a fresh Jenkins (2.7.2), rename your current home # Start it: java -jar jenkins.war # Choose the default packages option during the first boot # Clone git-plugin repository, compile it (mvn.cmd '-Dmaven.test.skip=true' clean install hpi:hpi) # Import your git-plugin (the one you compiled) in Jenkins (advanced tab) # Restart Jenkins *See the error* # Create a test git repository with a Jenkinsfile on many branches # Add a new multibranch pipeline, select "Discard old items" # Save, check that your branches appear in the list # Delete a branch from your repository. git push origin :features/a-random-branch # Run a branch indexing # See that your branch was not deleted *Check that 2.5.3 is working* # Restore the git-plugin in its original version, 2.5.3 # Restart Jenkins # Rerun branch indexing, see that your branch has disappeared ! h2. Investigations I didn't have the time to run a Jenkins instance in debug, or to read the commits yet. So I've no idea why this bug happens. I'll update this section later if I've time. |
Summary | Original: Jobs of a multibranch pipeline project are not anymore deleted in upstream | New: Jobs of a multibranch pipeline project are not anymore deleted in upstream if "/" in branch name |
Summary | Original: Jobs of a multibranch pipeline project are not anymore deleted in upstream if "/" in branch name | New: Jobs of a multibranch pipeline project are not deleted when branch is deleted |
Priority | Original: Minor [ 4 ] | New: Critical [ 2 ] |
Summary | Original: Jobs of a multibranch pipeline project are not deleted when branch is deleted | New: Jobs of a multibranch pipeline project are not deleted when branches are deleted |
Summary | Original: Jobs of a multibranch pipeline project are not deleted when branches are deleted | New: Multibranch pipeline project jobs are not deleted when branches are deleted |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Progress [ 3 ] | New: Resolved [ 5 ] |