-
Notifications
You must be signed in to change notification settings - Fork 242
Description
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