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

Pin the Jenkins version to the last pre-systemd version. #790

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
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
46 changes: 24 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ This file is used to list changes made in each version of the jenkins cookbook.

## Unreleased

- Pin the last version of Jenkins LTS which uses sysvinit scripts that this cookbook expects.
- Use Chef 17 or lower due to multiple issues

## 9.5.4 - *2022-12-08*

Standardise files with files in sous-chefs/repo-management
- Standardise files with files in sous-chefs/repo-management

## 9.5.3 - *2022-12-02*

Standardise files with files in sous-chefs/repo-management
- Standardise files with files in sous-chefs/repo-management

## 9.5.2 - *2022-03-28*

Expand Down Expand Up @@ -56,11 +59,11 @@ Standardise files with files in sous-chefs/repo-management
### Breaking Changes / Deprecations

- `jenkins_jnlp_slave`:
- Renamed `runit_groups` property to `service_groups`
- New service created -- old Runit service will need manual cleanup
- Renamed `runit_groups` property to `service_groups`
- New service created -- old Runit service will need manual cleanup

- `jenkins::_master_war`:
- New service created -- old Runit service will need manual cleanup
- New service created -- old Runit service will need manual cleanup

## 8.2.3 - *2021-03-25*

Expand Down Expand Up @@ -517,23 +520,22 @@ Standardise files with files in sous-chefs/repo-management
- Move testing instructions into contribution guidelines
- Remove old TODO file
- Refactor attributes into semantic groupings and namespaces

- `jenkins.cli` has been removed
- `jenkins.java_home` has been changed to `jenkins.java` and accepts the full path to the java binary, not the JAVA_HOME
- `jenkins.iptables_allow` has been removed
- `jenkins.mirror` -> `jenkins.master.mirror`
- `jenkins.executor` created
- `jenkins.executor.timeout` created
- `jenkins.executor.private_key` created
- `jenkins.executor.proxy` created
- `jenkins.master` created and only refers to the Jenkins master installation
- `jenkins.master.source` created to refer to the full URL of the war download
- `jenkins.master.jvm_options` created
- `jenkins.master.jenkins_args` added
- `jenkins.master.url` -> `jenkins.master.endpoint`
- `jenkins.master.log_directory` created
- `jenkins.node` attributes have all been removed
- `jenkins.server` attributes have all been removed
- `jenkins.cli` has been removed
- `jenkins.java_home` has been changed to `jenkins.java` and accepts the full path to the java binary, not the JAVA_HOME
- `jenkins.iptables_allow` has been removed
- `jenkins.mirror` -> `jenkins.master.mirror`
- `jenkins.executor` created
- `jenkins.executor.timeout` created
- `jenkins.executor.private_key` created
- `jenkins.executor.proxy` created
- `jenkins.master` created and only refers to the Jenkins master installation
- `jenkins.master.source` created to refer to the full URL of the war download
- `jenkins.master.jvm_options` created
- `jenkins.master.jenkins_args` added
- `jenkins.master.url` -> `jenkins.master.endpoint`
- `jenkins.master.log_directory` created
- `jenkins.node` attributes have all been removed
- `jenkins.server` attributes have all been removed

- Removed Chef MiniTest handler

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of

### Platforms

- Debian 9+
- Debian 10+
- Ubuntu 18.04+
- RHEL/CentOS 7+

### Chef

- Chef 13.0+
- Chef 13.0+, < 18.0

#### Java cookbook

Expand Down
3 changes: 2 additions & 1 deletion attributes/master.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
# package version (from the yum or apt repo), or the version of the war
# file to download from the Jenkins mirror.
#
master['version'] = nil
# The current default is the last version of Jenkins which uses sysvinit scripts instead of systemd units.
master['version'] = '2.319.3'

#
# The "channel" to use, default is stable
Expand Down
2 changes: 1 addition & 1 deletion kitchen.dokken.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
driver:
name: dokken
privileged: true # because Docker and SystemD
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
chef_version: <%= ENV['CHEF_VERSION'] || '17' %>
env: [CHEF_LICENSE=accept]
## Uncomment to allow access to the Jenkins webui which is useful when troubleshooting
# ports:
Expand Down
1 change: 1 addition & 0 deletions kitchen.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
driver:
name: vagrant
chef_version: <%= ENV['CHEF_VERSION'] || '17' %>
customize:
cpus: 2
memory: 1024
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
version '9.5.4'
source_url 'https://github.com/sous-chefs/jenkins'
issues_url 'https://github.com/sous-chefs/jenkins/issues'
chef_version '>= 13.0'
chef_version '>= 13.0', '< 18.0'

supports 'amazon'
supports 'centos'
Expand Down
10 changes: 5 additions & 5 deletions recipes/_master_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
version node['jenkins']['master']['version']
end

service 'jenkins' do
supports status: true, restart: true, reload: true
action [:enable, :start]
end

directory node['jenkins']['master']['home'] do
owner node['jenkins']['master']['user']
group node['jenkins']['master']['group']
Expand Down Expand Up @@ -91,8 +96,3 @@
notifies :restart, 'service[jenkins]', :immediately
end
end

service 'jenkins' do
supports status: true, restart: true, reload: true
action [:enable, :start]
end