forked from gocd/go-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
installing of packages with versions and channels — * setting `node['gocd']['use_experimental']` will use experimental repositories * setting `node['gocd']['version']` to `latest` will `action :upgrade` on the package fix attributes to be wrapper-cookbooks friendly don't use if node['gocd']... statements in attributes/default.rb ensure apt https support added windows setup for kitchen
- Loading branch information
Showing
17 changed files
with
436 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,22 @@ | ||
default['gocd']['install_method'] = 'repository' | ||
default['gocd']['download']['baseurl'] = 'https://download.go.cd' | ||
default['gocd']['version'] = nil # can be `latest` or specify a version `X.Y.Z-ABCD` | ||
default['gocd']['use_experimental'] = false | ||
|
||
default['gocd']['repository']['apt']['uri'] = node['gocd']['download']['baseurl'] | ||
default['gocd']['repository']['apt']['components'] = [ '/' ] | ||
if node['platform_family'] == 'windows' | ||
default['gocd']['install_method'] = 'package_file' | ||
else | ||
default['gocd']['install_method'] = 'repository' | ||
end | ||
|
||
default['gocd']['updates']['url'] = nil | ||
|
||
default['gocd']['repository']['apt']['components'] = ['/'] | ||
default['gocd']['repository']['apt']['distribution'] = '' | ||
default['gocd']['repository']['apt']['package_options'] = '' | ||
default['gocd']['repository']['apt']['keyserver'] = 'pgp.mit.edu' | ||
default['gocd']['repository']['apt']['key'] = '0xd8843f288816c449' | ||
|
||
default['gocd']['repository']['yum']['baseurl'] = node['gocd']['download']['baseurl'] | ||
default['gocd']['repository']['yum']['gpgcheck'] = true | ||
default['gocd']['repository']['yum']['gpgkey'] = 'https://download.go.cd/GOCD-GPG-KEY.asc' | ||
|
||
case node['gocd']['install_method'] | ||
when 'repository' | ||
# version = nil so just pick latest available | ||
else | ||
default['gocd']['version'] = '16.2.1-3027' | ||
end | ||
|
||
version = node['gocd']['version'] | ||
os_dir = nil | ||
|
||
case node['platform_family'] | ||
when 'debian' | ||
default['gocd']['server']['package_file']['filename'] = "go-server-#{version}.deb" | ||
default['gocd']['agent']['package_file']['filename'] = "go-agent-#{version}.deb" | ||
default['gocd']['package_file']['baseurl'] = node['gocd']['download']['baseurl'] | ||
os_dir = 'deb' | ||
when 'rhel', 'fedora' | ||
default['gocd']['server']['package_file']['filename'] = "go-server-#{version}.noarch.rpm" | ||
default['gocd']['agent']['package_file']['filename'] = "go-agent-#{version}.noarch.rpm" | ||
default['gocd']['package_file']['baseurl'] = node['gocd']['download']['baseurl'] | ||
os_dir = 'rpm' | ||
when 'windows' | ||
default['gocd']['server']['package_file']['filename'] = "go-server-#{version}-setup.exe" | ||
default['gocd']['agent']['package_file']['filename'] = "go-agent-#{version}-setup.exe" | ||
default['gocd']['package_file']['baseurl'] = node['gocd']['download']['baseurl'] | ||
os_dir = 'win' | ||
end | ||
|
||
default['gocd']['server']['package_file']['path'] = | ||
File.join(Chef::Config[:file_cache_path], node['gocd']['server']['package_file']['filename']) | ||
default['gocd']['server']['package_file']['url'] = | ||
"#{node['gocd']['package_file']['baseurl']}/binaries/#{version}/#{os_dir}/#{node['gocd']['server']['package_file']['filename']}" | ||
default['gocd']['agent']['package_file']['path'] = | ||
File.join(Chef::Config[:file_cache_path], node['gocd']['agent']['package_file']['filename']) | ||
default['gocd']['agent']['package_file']['url'] = | ||
"#{node['gocd']['package_file']['baseurl']}/binaries/#{version}/#{os_dir}/#{node['gocd']['agent']['package_file']['filename']}" | ||
default['gocd']['package_file']['baseurl'] = nil # official - "https://download.go.cd/binaries" | ||
default['gocd']['agent']['package_file']['url'] = nil # official | ||
default['gocd']['server']['package_file']['url'] = nil # official |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.