Skip to content
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

Core plugins not updated at first install #286

Closed
rmestrum opened this issue May 4, 2015 · 1 comment
Closed

Core plugins not updated at first install #286

rmestrum opened this issue May 4, 2015 · 1 comment

Comments

@rmestrum
Copy link

rmestrum commented May 4, 2015

Hi,

I'm using the 1.4.0 release of this module.

I'm using the plugin code like this:
include jenkins

The yaml file i've put the list of plugins as followed:
jenkins::plugin_hash:
credentials:
version: '1.22'

I'm finding that only core plugins do not update

When puppet runs, it says it installed the plugin:

Notice: /Stage[main]/Jenkins::Package/Package[jenkins]/ensure: created
Notice: /Stage[main]/Jenkins::Plugins/Jenkins::Plugin[credentials]/File[/var/lib/jenkins/plugins]/ensure: created
Notice: /Stage[main]/Jenkins::Plugins/Jenkins::Plugin[credentials]/Exec[download-credentials]/returns: executed successfully
Notice: /Stage[main]/Jenkins::Plugins/Jenkins::Plugin[credentials]/File[/var/lib/jenkins/plugins/credentials.hpi]/owner: owner changed 'root' to 'jenkins'
Notice: /File[/var/lib/jenkins/plugins/credentials.hpi]/seluser: seluser changed 'unconfined_u' to 'system_u'
Info: /Stage[main]/Jenkins::Plugins/Jenkins::Plugin[credentials]/File[/var/lib/jenkins/plugins/credentials.hpi]: Scheduling refresh of Service[jenkins]
Info: /Stage[main]/Jenkins::Plugins/Jenkins::Plugin[credentials]/File[/var/lib/jenkins/plugins/credentials.hpi]: Scheduling refresh of Service[jenkins]
Info: Class[Jenkins::Plugins]: Scheduling refresh of Class[Jenkins::Service]
Info: Class[Jenkins::Service]: Scheduling refresh of Service[jenkins]

I've done some research and i discovered that jenkins creates the *.jpi files on startup. In the puppet class jenkins the jenkins service is started after the plugins are installed.

So when the plugins are installed no *.jpi files for the core packages are available and that means that no .jpi.pinned files are created by the following code when a plugin is installed
# create a pinned file if the plugin has a .jpi extension
# to override the builtin module versions
exec { "create-pinnedfile-${name}" :
command => "touch ${plugin_dir}/${name}.jpi.pinned",
cwd => $plugin_dir,
require => File[$plugin_dir],
path => ['/usr/bin', '/usr/sbin', '/bin'],
onlyif => "test -f ${plugin_dir}/${name}.jpi -a ! -f ${plugin_dir}/${name}.jpi.pinned",
before => Exec["download-${name}"],
}

@jhoblitt
Copy link
Member

I believe that #389 should resolve the pinning issues. I'm going to close this issue but please reopen it if this is still reproducible with the current master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants