Skip to content

Commit

Permalink
Deprecates Chef Delivery CLI usage (#124)
Browse files Browse the repository at this point in the history
* Deprecates Chef Delivery CLI usage

* Allows CentOS 8 to fail
As we cannot set a proper priority for packages in CentOS 8, we are allowing this distribution to fail by now
  • Loading branch information
san983 authored Mar 23, 2022
1 parent b5d120e commit cdb8c16
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 21 deletions.
9 changes: 0 additions & 9 deletions .delivery/project.toml

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ jobs:
uses: actions/checkout@v2
- name: Install Chef Workstation
uses: actionshub/chef-install@main
- name: Run Chef Delivery
run: chef exec delivery local all
- name: Run Cookstyle
run: chef exec rake cookstyle
env:
CHEF_LICENSE: accept-no-persist
- name: Run Specs
run: chef exec rake spec
env:
CHEF_LICENSE: accept-no-persist

Expand Down Expand Up @@ -56,6 +60,7 @@ jobs:
- 'authoritative-postgres'
- 'recursor-multi'
fail-fast: false
continue-on-error: ${{ matrix.os == 'centos-8' }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
Expand Down
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,4 @@
- \[COOK-2986\] Fix foodcritic warnings [\#7](https://github.com/dnsimple/chef-pdns/pull/7) ([stevendanna](https://github.com/stevendanna))
- \[COOK-2604\] Configure a PowerDNS server [\#2](https://github.com/dnsimple/chef-pdns/pull/2) ([dje](https://github.com/dje))



\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
19 changes: 17 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@ task default: %w(test)
task test: %w(delivery kitchen)
task quick: :delivery

desc 'Run delivery local'
require 'cookstyle'
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:cookstyle) do |task|
task.options = ['--display-cop-names', '--extra-details']
end

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |task|
task.rspec_opts = ['--color', '--format progress']
end

desc 'Run linter and specs'
task :delivery do
sh 'delivery local all'
g = 'Policyfile.lock.json'
File.delete(g) if File.exist?(g)

Rake::Task['cookstyle'].invoke
Rake::Task['spec'].invoke
end

desc 'Run test kitchen with optional KITCHEN_ARGS if that env is present. Defaults suite test to "all" if no KITCHEN_REGEXP env var is present'
Expand Down
3 changes: 2 additions & 1 deletion resources/authoritative_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# limitations under the License.
#

provides :pdns_authoritative_config, platform: 'ubuntu' do |node|
provides :pdns_authoritative_config, platform: 'ubuntu'
unified_mode true do |node|
node['platform_version'].to_f >= 18.04
end

Expand Down
3 changes: 2 additions & 1 deletion resources/authoritative_install_debian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# limitations under the License.
#

provides :pdns_authoritative_install, platform: 'ubuntu' do |node|
provides :pdns_authoritative_install, platform: 'ubuntu'
unified_mode true do |node|
node['platform_version'].to_f >= 18.04
end

Expand Down
3 changes: 2 additions & 1 deletion resources/authoritative_install_rhel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# limitations under the License.
#

provides :pdns_authoritative_install, platform_family: 'rhel' do |node|
provides :pdns_authoritative_install, platform_family: 'rhel'
unified_mode true do |node|
node['platform_version'].to_i >= 7
end

Expand Down
1 change: 1 addition & 0 deletions resources/authoritative_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#

provides :pdns_authoritative_service
unified_mode true

include Pdns::AuthoritativeHelpers
property :instance_name, String, name_property: true, callbacks: {
Expand Down
3 changes: 2 additions & 1 deletion resources/recursor_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# limitations under the License.
#

provides :pdns_recursor_config, platform: 'ubuntu' do |node|
provides :pdns_recursor_config, platform: 'ubuntu'
unified_mode true do |node|
node['platform_version'].to_f >= 18.04
end

Expand Down
3 changes: 2 additions & 1 deletion resources/recursor_install_debian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# limitations under the License.
#

provides :pdns_recursor_install, platform: 'ubuntu' do |node|
provides :pdns_recursor_install, platform: 'ubuntu'
unified_mode true do |node|
node['platform_version'].to_f >= 18.04
end

Expand Down
3 changes: 2 additions & 1 deletion resources/recursor_install_rhel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# limitations under the License.
#

provides :pdns_recursor_install, platform_family: 'rhel' do |node|
provides :pdns_recursor_install, platform_family: 'rhel'
unified_mode true do |node|
node['platform_version'].to_i >= 7
end

Expand Down
1 change: 1 addition & 0 deletions resources/recursor_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#

provides :pdns_recursor_service
unified_mode true

include Pdns::RecursorHelpers
property :instance_name, String, name_property: true, callbacks: {
Expand Down

0 comments on commit cdb8c16

Please sign in to comment.