diff --git a/.sync.yml b/.sync.yml index 29435db..f81ba86 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,19 +1,24 @@ +--- +.travis.yml: + branches: + - main + - master spec/spec_helper.rb: mock_with: ':rspec' strict_level: ':error' Rakefile: extras: - | Blacksmith::RakeTask.new do |t| t.commit_message_pattern = "Bump version to %s" t.tag_message_pattern = "Release %s" t.tag_pattern = "%s" t.tag_sign = true end Gemfile: required: ':system_tests': - gem: ed25519 version: '~> 1.2' - gem: bcrypt_pbkdf version: '~> 1.0' diff --git a/.travis.yml b/.travis.yml index 68d3e96..74b3dda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,49 +1,50 @@ --- os: linux dist: xenial language: ruby cache: bundler before_install: - bundle -v - rm -f Gemfile.lock - "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner" - "# See https://github.com/puppetlabs/pdk-templates/commit/705154d5c437796b821691b707156e1b056d244f for an example of how this was used" - "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set" - '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION' - gem --version - bundle -v script: - 'bundle exec rake $CHECK' bundler_args: --without system_tests rvm: - 2.5.7 stages: - static - spec - acceptance - if: tag =~ ^v\d name: deploy jobs: fast_finish: true include: - env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint" stage: static - env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec rvm: 2.4.5 stage: spec - env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec rvm: 2.5.7 stage: spec - env: DEPLOY_TO_FORGE=yes stage: deploy branches: only: - master - /^v\d/ + - main notifications: email: false diff --git a/Rakefile b/Rakefile index ea6f999..1b8950d 100644 --- a/Rakefile +++ b/Rakefile @@ -1,95 +1,94 @@ # frozen_string_literal: true require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any? require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-syntax/tasks/puppet-syntax' require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any? require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any? require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any? def changelog_user return unless Rake.application.top_level_tasks.include? "changelog" returnVal = nil || JSON.load(File.read('metadata.json'))['author'] raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil? puts "GitHubChangelogGenerator user:#{returnVal}" returnVal end def changelog_project return unless Rake.application.top_level_tasks.include? "changelog" 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 def changelog_future_release return unless Rake.application.top_level_tasks.include? "changelog" returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version'] raise "unable to find the future_release (version) in metadata.json" if returnVal.nil? puts "GitHubChangelogGenerator future_release:#{returnVal}" returnVal end PuppetLint.configuration.send('disable_relative') if Bundler.rubygems.find_name('github_changelog_generator').any? GitHubChangelogGenerator::RakeTask.new :changelog do |config| raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil? config.user = "#{changelog_user}" config.project = "#{changelog_project}" config.future_release = "#{changelog_future_release}" config.exclude_labels = ['maintenance'] config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)." config.add_pr_wo_labels = true config.issues = false - config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM" + config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB" config.configure_sections = { "Changed" => { "prefix" => "### Changed", "labels" => ["backwards-incompatible"], }, "Added" => { "prefix" => "### Added", - "labels" => ["feature", "enhancement"], + "labels" => ["enhancement", "feature"], }, "Fixed" => { "prefix" => "### Fixed", - "labels" => ["bugfix"], + "labels" => ["bug", "documentation", "bugfix"], }, } end else desc 'Generate a Changelog from GitHub' task :changelog do raise <= Gem::Version.new('2.2.2')" + version: '~> 1.15' + condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')" EOM end end Blacksmith::RakeTask.new do |t| t.commit_message_pattern = "Bump version to %s" t.tag_message_pattern = "Release %s" t.tag_pattern = "%s" t.tag_sign = true end diff --git a/metadata.json b/metadata.json index 888dd71..c3569f8 100644 --- a/metadata.json +++ b/metadata.json @@ -1,45 +1,45 @@ { "name": "ssm-hitch", "version": "0.1.5", "author": "ssm", "summary": "Install and configure Hitch TLS proxy", "license": "Apache-2.0", "source": "https://github.com/ssm/ssm-hitch.git", "project_page": "https://github.com/ssm/ssm-hitch", "issues_url": "https://github.com/ssm/ssm-hitch/issues", "dependencies": [ { "name": "puppetlabs-stdlib", "version_requirement": ">= 4.12.0 <= 7.0.0" }, { "name": "puppetlabs-concat", "version_requirement": ">= 4.0.0 <= 7.0.0" } ], "operatingsystem_support": [ { "operatingsystem": "Debian", "operatingsystemrelease": [ "9", "10" ] }, { "operatingsystem": "RedHat", "operatingsystemrelease": [ "7", "8" ] } ], "requirements": [ { "name": "puppet", "version_requirement": ">= 4.10.0 < 7.0.0" } ], - "pdk-version": "1.18.0", - "template-url": "pdk-default#1.18.0", - "template-ref": "tags/1.18.0-0-g095317c" + "pdk-version": "1.18.1", + "template-url": "pdk-default#1.18.1", + "template-ref": "tags/1.18.1-0-g3d2e75c" }