Skip to content

Backup/Restore issue with Multibranch plugin #104

@blucas

Description

@blucas

I'm using Jenkins Operator v0.2.0 and backup-pvc v0.0.6

When restoring a Bitbucket Team job (Organization Folder) using the cloudbees-bitbucket-branch-source:2.4.6 plugin, the operator fails to "fully" restore the folder and jobs. After the restore completes and when you navigate to the Bitbucket Team job in the Jenkins UI, it displays as if it has yet to scan the Bitbucket Team and all of that team's repositories / branches.

I checked the backup file. It does contain the builds for each repository/branch and did successfully restore them on disk. The only way to get the builds to display after restore is to issue a new "Scan Organization Folder Now" operation on the Organization Folder. But this creates further issues as that scan assumes it's the first and so resets nextBuildNumber to 1.

The issue is that the plugin or framework expects that the job's config.xml file is also restored. If I remove --exclude jobs/*/config.xml from backup.sh and trigger a restore, then everything displays as expected in the UI. Jenkins knows what the nextBuildNumber should be for all jobs under the Organization Folder.

I would like to suggest that exclusion of the config.xml file become a configurable setting. For example add an env_var EXCLUDE_CONFIG_XML=true|false whereby the default is true and one can disable that functionality on the backup container by providing a false value when configuring the container's environment variables

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions