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

Fix #540 #576

Merged
merged 1 commit into from
Mar 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 18 additions & 21 deletions recipes/_master_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,32 @@
dpkg_autostart 'jenkins' do
allow false
end

package 'jenkins' do
version node['jenkins']['master']['version']
end

template '/etc/default/jenkins' do
source 'jenkins-config-debian.erb'
mode '0644'
notifies :restart, 'service[jenkins]', :immediately
end
when 'rhel'
yum_repository 'jenkins-ci' do
baseurl node['jenkins']['master']['repository']
gpgkey node['jenkins']['master']['repository_key']
end
end

package 'jenkins' do
version node['jenkins']['master']['version']
end
package 'jenkins' do
version node['jenkins']['master']['version']
end

# The package install creates the Jenkins user so now is the time to set the home
# directory permissions.
directory node['jenkins']['master']['home'] do
owner node['jenkins']['master']['user']
group node['jenkins']['master']['group']
mode '0755'
recursive true
end
directory node['jenkins']['master']['home'] do
owner node['jenkins']['master']['user']
group node['jenkins']['master']['group']
mode '0755'
recursive true
end

case node['platform_family']
when 'debian'
template '/etc/default/jenkins' do
source 'jenkins-config-debian.erb'
mode '0644'
notifies :restart, 'service[jenkins]', :immediately
end
when 'rhel'
template '/etc/sysconfig/jenkins' do
source 'jenkins-config-rhel.erb'
mode '0644'
Expand Down