fedora-coreos-pipeline
fedora-coreos-pipeline copied to clipboard
jobs: Add a bump-jenkins-plugins job
We are creating this bump-jenkins-job
in order to periodically update the latest plugin version of Jenkins offered by Openshift/Jenkins.
bump-jenkins-job
automates the process of checking for updates to Jenkins plugins, updating the plugin versions in a configuration file, pushing the changes to a Git repository, and opening a pull request for review.
Plugin Update Process:
- This job reads a list of plugins from the file plugins.txt in the repository.
- It iterates over each plugin, checks for updates and if a newer version is available, it updates the version in the file.
- For each plugin, it fetches the latest version by querying a URL based on the Jenkins plugin repository structure.
- If an update is found, it modifies the
plugins.txt
file to reflect the new version. - The updates in the
plugins.txt
file are committed and pushed to thepr_branch
. - It also opens a pull request with the updated plugin versions.
Ref: https://github.com/coreos/fedora-coreos-pipeline/issues/562
We can create a PR with the jenkins plugin updates with this code - https://github.com/coreosbot-releng/fedora-coreos-pipeline/pull/2
https://jenkins-fedora-coreos-pipeline.apps.ocp.stg.fedoraproject.org/job/bump-jenkins-plugins/49/console
@jlebon I have addressed all the comments and have made the changes.
Posting the links for the PR and jenkins build below for reference:
PR for the plugins update - https://github.com/coreosbot-releng/fedora-coreos-pipeline/pull/10 Jenkins build - https://jenkins-fedora-coreos-pipeline.apps.ocp.stg.fedoraproject.org/job/bump-jenkins-plugins/152/console
Haven't reviewed the code again (will leave that to @dustymabe), but just looking at the example PR in https://github.com/coreosbot-releng/fedora-coreos-pipeline/pull/10, we should include in the commit message the job information. Compare e.g. to: https://github.com/coreos/fedora-coreos-config/commit/1598859194fb66752c6cf17b5953e96d934910c1 (see bump-lockfile.Jenkinsfile
in this repo).
Haven't reviewed the code again (will leave that to @dustymabe), but just looking at the example PR in coreosbot-releng#10, we should include in the commit message the job information. Compare e.g. to: coreos/fedora-coreos-config@1598859 (see
bump-lockfile.Jenkinsfile
in this repo).
Making sure if I understood it right, the commit message already includes the job information as suggested. Please let me know if there are any additional improvements to be made.
Making sure if I understood it right, the commit message already includes the job information as suggested. Please let me know if there are any additional improvements to be made.
Maybe he got confused because the PR description doesn't have that information.
This LGTM.
I think the remaining piece in my mind is what happens to the PRs when they are created?
Do we just merge them or do we require someone to verify the plugins are able to be deployed and an instance brought up first?
It was decided for now that the reviewer would test in staging by pointing the buildconfig at the PR and then make the merge.
Making sure if I understood it right, the commit message already includes the job information as suggested. Please let me know if there are any additional improvements to be made.
Maybe he got confused because the PR description doesn't have that information.
Yes, that's exactly what happened. :)