-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock base version and all plugins and add bump-jenkins
job
#562
Comments
We also need to start re-building the jenkins container image periodically to pick up new plugin updates so we don't freeze for 6 months and potentially carry security issues. This could be a periodic job that triggers a build in openshift. |
bump-jenkins
job
Let's repurpose this to go a step further and lock down all our plugins and the base Jenkins version itself and e.g. have a job that opens a PR to bump them with a link to documentation on how to test the PR in staging. (And maybe eventually it directly instruments the test in staging itself... or maybe better we request a separate namespace for this.) This will require some investigations to figure out how we can run depsolving ourselves. |
This needs to account to the different clusters we support being different versions (and thus having different Jenkins base versions). We could choose to track the older of the two, or if it's fully mechanical, maintaining two separate base versions + plugins list shouldn't be too bad either. |
We've been discussing possible ways to implement this. One way is to have a job that removes the versions altogether, which would just pull all the latest versions, attempt a build like that and "see if it works" (loaded statement). I tried to manually build the Jenkins instance without any versions and it failed to load because there seems to be an issue with the openshift/jenkins code. I opened openshift/jenkins#1709 regarding it. In the mean time, we might have to find an alternative way to automate this. |
Was chatting with @marmijo about this today. One suggestion is to have the job on the prod Jenkins instrument the Jenkins on the stage cluster. Something like:
We'd need to figure out how to set up authentication across the clusters. Another approach is to instrument the Jenkins from which the job is running itself, but if the plugins break so hard that the Jenkins never comes back up, we'll never hear back from that job. And yet another approach is to bring up a second Jenkins in the same namespace. I think for this we'd need to make sure we get the resource naming right so there's no conflicts between the two, but it could get messy. I think it's more conventional to use a separate namespace/cluster for tests like this. |
bump-jenkins job added to periodically update the jenkins plugins to latest version Ref: coreos#562
bump-jenkins job added to periodically update the jenkins plugins to latest version Ref: coreos#562
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
@aaradhak, @jlebon and I had a long discussion about this today.
It would probably be beneficial to split the workload of this job into two separate jobs. We should also consider renaming the job to
So the workflow would look something like this:
Ideally, we'd like to use the dependency resolution that occurs upstream in openshift/jenkins, but it was removed from the upstream code earlier this year. Our current plan is to investigate if this |
After building a custom Jenkins image that was modified to run resolveDependencies, we found that it will install all dependencies (even optional ones) of the plugins we list in plugins.txt. However, even if the dependency is listed in base-plugins.txt, it will update it's version to the latest required. We saw this today for example:
The dependency plugins that fall into that category are all being updated to their latest versions in a pending PR: openshift/jenkins#1697 |
How many dependencies in the base list were updated? |
There were 7 dependencies already installed by |
I'm not sure if this answers my question or not. Let me ask a different way: in the resulting image, for the plugins in the base set, how many have a version that differs from what was in |
7 plugins. They were already installed by
|
Arent we missing out on the basic-branch-build-strategies plugin dependencies here ?
|
Well, it was already listed in |
OK that's great. I think this could be a viable path forward then. For the record, what I was worried about was how much drift we'd be introducing in the base plugin set; the more we drift from what was built and tested upstream, the more likely we are to hit issues. In this case, it seems like the changes are minimal (though of course in practice it'll depend on how stale the S2I image in the cluster we're running on is). I think the next steps here are to discuss with openshift/jenkins team. One way to do this is to open a PR that allows conditionally turning back on dependency resolution. |
Checked with the Openshift team on the reason why Apparently they had several issues with the So now they run a server on openshift, have Jenkins upgrade all of the plugins, and then run https://github.com/openshift/jenkins/blob/master/scripts/jenkins-script-console.txt in the script console to get a list of all of the upgraded plugins and their versions. Looks like this approach works better for them. |
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
Ack, thanks. This is good info. So where does this leave us? It sounds like |
I haven't looked into the process of using the built-in plugin manager. If we are implementing the testing hack of using
|
OK, looks like Jenkins has an API for installing/updating plugins: So we could use this to request the plugins we own to be updated to the latest and then gather the final list of plugins that Jenkins resolved (e.g. using the same script that openshift/jenkins uses) and open a PR with that. WDYT? |
Ok, will need to look into using this API for updating the plugins. This means that it would require change in the existing approach on how the plugins are updated. |
I think a lot of the code in #917 is still necessary. The main bit is how we construct the new |
Yea sure, we can have a discussion. With the existing code, we can create a PR with the jenkins plugin updates - As you mentioned, the main change in the new approach would be in the part of updating the plugins. |
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
Met with @aaradhak and @marmijo. We're reducing the scope of this to just opening a PR with the updated plugin versions. This little bit of automation is still helpful since then a reviewer can just test it in staging by pointing the buildconfig at the PR. A |
As a first pass, I'd be cool with just cleaning up |
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
bump-jenkins job added to periodically update the jenkins plugins to latest version Co-authored-by: Michael Armijo <[email protected]> Ref: coreos#562
We are creating this bump-jenkins-job in order to periodically update the latest plugins and the version of jenkins offered by https://github.com/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: The script reads a list of plugins from a file (jenkins/controller/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 constructed based on the Jenkins plugin repository structure. If an update is found, it modifies the plugins.txt file to reflect the new version. If any updates were made, it commits the changes to the plugins.txt file and pushes the changes to the pr_branch. It also opens a pull request with the updated plugin versions. Ref: coreos#562 Co-authored-by: Michael Armijo <[email protected]>
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 the pr_branch. It also opens a pull request with the updated plugin versions. Ref: coreos#562 Co-authored-by: Michael Armijo <[email protected]>
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 the pr_branch. It also opens a pull request with the updated plugin versions. Ref: coreos#562 Co-authored-by: Michael Armijo <[email protected]>
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 the pr_branch. It also opens a pull request with the updated plugin versions. Ref: coreos#562 Co-authored-by: Michael Armijo <[email protected]>
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 the pr_branch. It also opens a pull request with the updated plugin versions. Ref: coreos#562 Co-authored-by: Michael Armijo <[email protected]>
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 the pr_branch. It also opens a pull request with the updated plugin versions. Ref: coreos#562 Co-authored-by: Michael Armijo <[email protected]>
Periodically the latest plugins and the version of jenkins offered by https://github.com/openshift/jenkins can get out of sync where jenkins won't come up. Let's run tests on some time schedule (weekly?) that verify the current configuration in this repo is able to at least bring jenkins up without errors.
This will mean that if we ever need to redeploy in haste we'll be ready.
The text was updated successfully, but these errors were encountered: