Installation of Plugins Through CASC Doesn't Trigger Jenkins Restart
See original GitHub issueDescription
I’m currently working on defining a new Jenkins box for my organization, using Ansible and this plugin to try to codify as much as possible. One thing I’ve run into is when Jenkins runs through the initial application/verification of the configuration files, installing a plugin does not seem to trigger a restart. I currently have two config files, with the plugin one named to be read first, alphanumerically. I’ve also tried having the plugin file named to be read last and it doesn’t seem to change anything about whether a restart occurs.
Worth noting, is that the Jenkins UI indicates that a restart is necessary when viewing the Installed Plugins, so that seems to suggest that a restart should happen but is not being triggered.
Questions
- I noticed there’s behavior in the code for plugin support to detect whether or not a restart should happen. I’m only installing new plugins at the moment, as opposed to updating. Would that suggest that the plugin installation is not throwing the
UpdateCenter.DownloadJob.SuccessButRequiresRestart
error that’s expected? - Is there some way to force a restart through the JCASC plugin?
- I’m triggering the application/verification of JCASC files by forcing Jenkins to restart after the config files are updated.
Version info
- Jenkins Version: 2.149
- Plugin Version: 1.2
- OS:
CentOS Linux release 7.5.1804 (Core)
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Configuration as Code - Jenkins
The Jenkins Configuration as Code (JCasC) feature defines Jenkins configuration parameters in a human-readable YAML file that can be stored as source code....
Read more >jenkinsci/configuration-as-code-plugin - Gitter
I have tried to install plugins by installing them online first, grabbed the $JENKINS_HOME/plugins folder and when I was offline drag and dropped...
Read more >Jenkins Plugins are not installed : Command Line
Additionally, you need to restart the jenkins service after installing plugins. It is already running after installation. – Matt Schuchard. Aug ...
Read more >Getting started with plugin management
This option allows for plugins to be defined in code and automates their installation on restart or retry. With CasC, you add plugins...
Read more >Customization with Groovy Scripts and CasC - GitHub Pages
Operator caches downloaded plugins by itself, so that on subsequent installations of the same plugin versions (for example, after a Jenkins restart) Operator ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We won’t add them back 😄 The work should be done inside Jenkins Core as stated. This is the issue to pile in on https://issues.jenkins-ci.org/browse/JENKINS-53767
You’re right that we rely on
SuccessButRequiresRestart
to trigger a restart. I assume the plugin you selected for installation don’t ask for it, but then the message you get from web UI is weird.Please note plugin installation is experimental and mostly hack-ish, if you have any other way to manage plugin installation (maybe relying on install-plugins script), go for it.
Also see https://issues.jenkins-ci.org/browse/JENKINS-53767 for need for this as a generic and official tool