From a2da25f9e90c24630cab95a79f4eea328396b9fc Mon Sep 17 00:00:00 2001 From: lionce Date: Fri, 1 Nov 2019 17:59:42 +0200 Subject: [PATCH] include acceptance stage on travis --- .rubocop.yml | 7 +++++++ .sync.yml | 2 ++ .travis.yml | 1 + Gemfile | 3 +-- Rakefile | 13 +++++++++++-- metadata.json | 4 ++-- spec/default_facts.yml | 1 + 7 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index ee74e8c..33688a7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -27,6 +27,7 @@ GetText/DecorateString: Description: We don't want to decorate test output. Exclude: - spec/**/* + Enabled: false RSpec/BeforeAfterAll: Description: Beware of using after(:all) as it may cause state to leak between tests. A necessary evil in acceptance testing. @@ -89,6 +90,12 @@ Style/MethodCalledOnDoEndBlock: Enabled: true Style/StringMethods: Enabled: true +GetText/DecorateFunctionMessage: + Enabled: false +GetText/DecorateStringFormattingUsingInterpolation: + Enabled: false +GetText/DecorateStringFormattingUsingPercent: + Enabled: false Layout/EndOfLine: Enabled: false Layout/IndentHeredoc: diff --git a/.sync.yml b/.sync.yml index 516ddeb..8430e59 100644 --- a/.sync.yml +++ b/.sync.yml @@ -32,6 +32,7 @@ services: docker stage: acceptance sudo: required + stage: acceptance - bundler_args: dist: trusty @@ -46,6 +47,7 @@ - bundle exec rake litmus:acceptance:parallel services: docker sudo: required + stage: acceptance appveyor.yml: delete: true diff --git a/.travis.yml b/.travis.yml index 742370a..0bd7c1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,6 +55,7 @@ matrix: rvm: 2.5.3 script: ["bundle exec rake litmus:acceptance:parallel"] services: docker + stage: acceptance sudo: required branches: only: diff --git a/Gemfile b/Gemfile index 97ba33d..61d5e69 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,4 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' -gem 'pdk', git: 'https://github.com/puppetlabs/pdk.git', branch: 'master' def location_for(place_or_version, fake_version = nil) git_url_regex = %r{\A(?(https?|git)[:@][^#]*)(#(?.*))?} @@ -72,4 +71,4 @@ extra_gemfiles.each do |gemfile| eval(File.read(gemfile), binding) end end -# vim: syntax=ruby \ No newline at end of file +# vim: syntax=ruby diff --git a/Rakefile b/Rakefile index 13b58c8..c45dfc8 100644 --- a/Rakefile +++ b/Rakefile @@ -16,8 +16,17 @@ end def changelog_project return unless Rake.application.top_level_tasks.include? "changelog" - returnVal = nil || JSON.load(File.read('metadata.json'))['source'].match(%r{.*/([^/]*)})[1] - raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil? + + returnVal = nil + returnVal ||= begin + metadata_source = JSON.load(File.read('metadata.json'))['source'] + metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z}) + + metadata_source_match && metadata_source_match[1] + end + + raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil? + puts "GitHubChangelogGenerator project:#{returnVal}" returnVal end diff --git a/metadata.json b/metadata.json index 19f0e8e..d89c754 100644 --- a/metadata.json +++ b/metadata.json @@ -42,6 +42,6 @@ } ], "template-url": "https://github.com/puppetlabs/pdk-templates/#master", - "template-ref": "1.12.0-0-g55d9ae2", - "pdk-version": "1.12.0" + "template-ref": "tags/1.14.1-0-g0b5b39b", + "pdk-version": "1.14.1" } diff --git a/spec/default_facts.yml b/spec/default_facts.yml index ea1e480..f777abf 100644 --- a/spec/default_facts.yml +++ b/spec/default_facts.yml @@ -3,5 +3,6 @@ # Facts specified here will override the values provided by rspec-puppet-facts. --- ipaddress: "172.16.254.254" +ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" is_pe: false macaddress: "AA:AA:AA:AA:AA:AA" -- 2.45.2