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

Can not install Jenkins 2.x release other than the latest version #482

Closed
fawzyj opened this issue Jun 6, 2016 · 11 comments
Closed

Can not install Jenkins 2.x release other than the latest version #482

fawzyj opened this issue Jun 6, 2016 · 11 comments

Comments

@fawzyj
Copy link

fawzyj commented Jun 6, 2016

Cookbook version

2.5

Chef-client version

12.9.38

Platform Details

Ubuntu 14.04

Scenario:

Can not install Jenkins 2.x release other than the latest
For example, currently the 2.x release is 2.8, so if i set the attribute node[:jenkins][:master][:version] = 2.8 it works fine, but if the value is 2.7 , or 2.6... etc it fails with the following message

STDERR: E: Version '2.7' for 'jenkins' was not found
==> default: ---- End output of apt-get -q -y install jenkins=2.7 ----
==> default: Ran apt-get -q -y install jenkins=2.7 returned 100

So, I am able to install the latest version, but when jenkins release new one, my version attribute do not point to the latest version anymore, so my chef run fails

Steps to Reproduce:

[If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?]

Actual Result:

On Ubuntu machine, , set node[:jenkins][:master][:version] = 2.7, it will fail to install that version,
change the value to 2.8 (or whatever latest version on test time is) and it will install jenkins

@Chili-Man
Copy link

Since it seems that you're installing it via an apt package, the apt repos for jenkins will only have the latest version available thus it can never respect the version set in the attributes. You have to install jenkins via the war method by setting:

node.set['jenkins']['master']['install_method'] = 'war'

then it will respect the version you specify in the attributes.

@davidcpell
Copy link

@Chili-Man I've been trying this with 1.653 because the current cookbook seems to have trouble with Jenkins 2, but even with that set and the install_method changed to war, I'm still getting version 2.17 of Jenkins

@JoeNunnelley
Copy link

i am hitting this issue as well. I would like to continue to install 1.653 with my chef runs but its failing to find it even when I set the 'source' attribute and point it at the mirror for the 1.653 war file. It still just install 2.18 which is the latest on that mirror. Is there some configuration for the chef attributes I"m missing?

default['jenkins']['master']['install_method'] = 'war'
default['jenkins']['master']['version'] = '1.651.3'
default['jenkins']['master']['source'] = 'http://mirrors.jenkins-ci.org/war/1.653/jenkins.war'

@davidcpell
Copy link

davidcpell commented Aug 18, 2016

@JoeNunnelley I was able to force the install of v1.651.3 by only setting the source and install_method attributes and not the version. The relevant part of my attributes/default.rb looks like this:

default['jenkins']['master'].tap do |master|
  master['install_method'] = 'war'
  master['source'] = 'http://mirrors.jenkins-ci.org/war-stable/1.651.3/jenkins.war'
end

@lmilbaum
Copy link

lmilbaum commented Dec 8, 2016

+1

@tradenity
Copy link

@davidcpell sure you can, We are talking about version 2.x
The issue is that the apt repo have all 1.x.x versions, but only the latest 2.x release

@lmilbaum
Copy link

lmilbaum commented Dec 8, 2016

@tradenity apt repo have only the latest 2.x release (now it is 2.35). I wanted to install 2.34. It didn't work when used the package install method. Did work as @davidcpell specified.

@tradenity
Copy link

That's what I'm saying... you can install any 1.x version via apt, but only the latest 2.x

@lmilbaum
Copy link

lmilbaum commented Dec 8, 2016

ok. Wasn't sure I understood you.
Who is responsible for updating the apt repos?

@cheeseplus
Copy link

This particular issue has to do with the upstream Jenkins repos themselves and not really anything to do with the cookbook itself, as such closing.

@olgafandeliuk
Copy link

@JoeNunnelley I was able to force the install of v1.651.3 by only setting the source and install_method attributes and not the version. The relevant part of my attributes/default.rb looks like this:

default['jenkins']['master'].tap do |master|
  master['install_method'] = 'war'
  master['source'] = 'http://mirrors.jenkins-ci.org/war-stable/1.651.3/jenkins.war'
end

Thank you for your tip! It really helps us to pin jenkins-master version=)

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

8 participants