diff --git a/.delivery/project.toml b/.delivery/project.toml new file mode 100644 index 0000000000..6d5e361737 --- /dev/null +++ b/.delivery/project.toml @@ -0,0 +1 @@ +remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" diff --git a/.kitchen.docker.yml b/.kitchen.dokken.yml similarity index 100% rename from .kitchen.docker.yml rename to .kitchen.dokken.yml diff --git a/.travis.yml b/.travis.yml index 8597741a3d..d319d415c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ before_script: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - eval "$(/opt/chefdk/bin/chef shell-init bash)" -script: KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE} +script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE} matrix: include: @@ -41,5 +41,5 @@ matrix: - /opt/chefdk/embedded/bin/cookstyle --version - /opt/chefdk/embedded/bin/foodcritic --version - script: - - /opt/chefdk/bin/chef exec rake + - /opt/chefdk/bin/chef exec delivery local all env: UNIT_AND_LINT=1 diff --git a/attributes/master.rb b/attributes/master.rb index 12b33c35ed..39f6132475 100644 --- a/attributes/master.rb +++ b/attributes/master.rb @@ -44,6 +44,12 @@ # master['version'] = nil + # + # The "channel" to use, default is stable + # Alternatively: "latest" + # + master['channel'] = 'stable' + # # The mirror to donload the Jenkins war file. This attribute is only used # in the "war" installation method. @@ -70,7 +76,9 @@ # Warning: Setting this attribute will negate/ignore any values for +mirror+ # and +version+. # - master['source'] = "#{node['jenkins']['master']['mirror']}/#{node['jenkins']['master']['version'] || 'current'}/latest/jenkins.war" + master['source'] = "#{node['jenkins']['master']['mirror']}/"\ + "#{node['jenkins']['master']['version'] || node['jenkins']['master']['channel']}/"\ + 'latest/jenkins.war' # # The checksum of the war file. This is use to verify that the remote war file @@ -214,19 +222,19 @@ master['ulimits'] = nil # - # Repository URL. Default is latest + # Repository URL. Default is stable # master['repository'] = case node['platform_family'] - when 'debian' then 'https://pkg.jenkins.io/debian' - when 'rhel' then 'https://pkg.jenkins.io/redhat' + when 'debian' then 'https://pkg.jenkins.io/debian-stable' + when 'rhel' then 'https://pkg.jenkins.io/redhat-stable' end # - # Repository key. Default is latest + # Repository key. Default is stable # master['repository_key'] = case node['platform_family'] - when 'debian' then 'https://pkg.jenkins.io/debian/jenkins.io.key' - when 'rhel' then 'https://pkg.jenkins.io/redhat/jenkins.io.key' + when 'debian' then 'https://pkg.jenkins.io/debian-stable/jenkins.io.key' + when 'rhel' then 'https://pkg.jenkins.io/redhat-stable/jenkins.io.key' end # diff --git a/libraries/_helper.rb b/libraries/_helper.rb index 6b071093b8..3f3435c074 100644 --- a/libraries/_helper.rb +++ b/libraries/_helper.rb @@ -448,7 +448,7 @@ def ensure_cli_present! # def ensure_update_center_present! node.run_state[:jenkins_update_center_present] ||= begin # ~FC001 - source = uri_join(node['jenkins']['master']['mirror'], 'current', 'update-center.json') + source = uri_join(node['jenkins']['master']['mirror'], node['jenkins']['master']['channel'], 'update-center.json') remote_file = Chef::Resource::RemoteFile.new(update_center_json, run_context) remote_file.source(source) remote_file.backup(false) diff --git a/test/fixtures/cookbooks/jenkins_user/metadata.rb b/test/fixtures/cookbooks/jenkins_user/metadata.rb index c2b05bbc77..2c1783d07a 100644 --- a/test/fixtures/cookbooks/jenkins_user/metadata.rb +++ b/test/fixtures/cookbooks/jenkins_user/metadata.rb @@ -1,2 +1,2 @@ name 'jenkins_user' -depends 'jenkins' +depends 'jenkins_server_wrapper' diff --git a/test/integration/jenkins_command_execute/serverspec/assert_executed_spec.rb b/test/integration/jenkins_command_execute/serverspec/assert_executed_spec.rb index 870eeba1a7..ec645cb617 100644 --- a/test/integration/jenkins_command_execute/serverspec/assert_executed_spec.rb +++ b/test/integration/jenkins_command_execute/serverspec/assert_executed_spec.rb @@ -2,6 +2,7 @@ describe service('jenkins') do it 'cannot have a reliably tested command' do - pending + pending('cannot have a reliably tested command') + raise end end