Status: Open (View Workflow)
Component/s: multi-branch-project-plugin (not Pipeline)
Environment:Jenkins on Windows, Latest releases as of 24-FEB-2016
Branch API 2.0.7
GitHub Branch 2.0.3
GitHub API 1.84
Git Client 2.2.1
(and many more)
A section "com.github.mjdetullio.jenkins.plugins.multibranch.BranchProjectProperty" can appear in the template config.xml file after certain configuration operations. When this section is present, running branch indexing will delete the job execution history under all branches.
This section doesn't always exist. One way to create it is to enable "Ant/ivy Artifactory integration", which will create the section. Disabling the "Ant/ivy Artifactory integration" doesn't help - the section will still be present and will still cause the error.
This wast not happening with Multibranch 0.5.2, BranchApi 1.11.1, and SCM 1.3. After upgrading, existing jobs had their jobs deleted when reindexed. I was able to come up with a repro case with a new project:
- Create a new freestyle multibranch project
- Add a GitHub source and save (my source had 2 branches in it, doesn't really matter)
- Branches will build successfully (there are no build steps)
- Scan Project / Run Now - No change to the history
- Here's where the problems start
- Configure the project
- Check the box for "Ant/Ivy-Artifactory Integration"
- Click Apply
- Uncheck the box for "Ant/Ivy-Artifactory Integration"
- Click Save
- Build history and last success are gone
- Run some builds. History and success/fail are back.
- Scan Project / Run now
- Build history and last success are gone again
- Edit the "template/config.xml" file for this job
- A new section has appeared:
- To fix the problem
- Delete this section.
- Reload configuration from disk
- Job history has returned, but the last success is still missing.
- Build the jobs to get another success
- Scan project / Run now
- Job history and last success are present