Add disable job option when the branch is deleted #83

Closed
wants to merge 1 commit into
from

Projects

None yet

4 participants

@wadahiro
Contributor

Currently, when the branch is deleted, the job always be deleted automatically.
I added a checkbox option to change this behavior.
If checked, the job will be disabled instead of deleted when the branch is deleted.

@scaytrase
Member

Yes, this would affect all manually disabled jobs.

But isn't removing forcing job enabling resolves this BC issue? Deleted jobs will be disabled instead of deleting and all other will be just untouched, right?

@wadahiro
Contributor

Thank you for your comments.

Yes, my PR affects all manually disabled jobs, but the jobs will be originally intended to be deleted when the branch is deleted. So I think this option does not affect. Would you please tell me what you think about it?

@scaytrase
Member

you do not understand the problem. jenkins allows to manually disable ''any'' job. it does not matter multibranch project or not. if branch exist and job was manually disabled (i.e. it fails and i do not want it to run this week) your patch will forcibly enable it back (and keep it enabled)

@wadahiro
Contributor
wadahiro commented Sep 1, 2015

Sorry, I misread your comments.

I added deletedBranches field to AbstractMultiranchProject for tracking deleted branches. It's used to distinguish whether the sub-project was disabled instead of deleted, so It does not affect disabled project manually (keep it disabled).
Also, I rebased my PR-branch against latest master branch.
Could you review my PR?

@scaytrase
Member

👍 looks OK, needs testing

@jenkinsadmin
Member

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

@mjdetullio
Collaborator

Support was added in 0.4 via inheritance of ComputedFolder API in Folders Plugin.

@mjdetullio mjdetullio closed this Jun 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment