-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PDK update and check Ruby 1.9.3 syntax
As long as we support PE 2016.4, 2018.1, and therefore jruby 1.7, we need to keep syntax compatible with Ruby 1.9.3.
- Loading branch information
Showing
5 changed files
with
192 additions
and
177 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--relative |
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,76 +1,76 @@ | ||
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 || JSON.load(File.read('metadata.json'))['name'] | ||
raise "unable to find the changelog_project in .sync.yml or the name 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 = 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.configure_sections = { | ||
"Changed" => { | ||
"prefix" => "### Changed", | ||
"labels" => ["backwards-incompatible"], | ||
}, | ||
"Added" => { | ||
"prefix" => "### Added", | ||
"labels" => ["feature", "enhancement"], | ||
}, | ||
"Fixed" => { | ||
"prefix" => "### Fixed", | ||
"labels" => ["bugfix"], | ||
}, | ||
} | ||
end | ||
else | ||
desc 'Generate a Changelog from GitHub' | ||
task :changelog do | ||
raise <<EOM | ||
The changelog tasks depends on unreleased features of the github_changelog_generator gem. | ||
Please manually add it to your .sync.yml for now, and run `pdk update`: | ||
--- | ||
Gemfile: | ||
optional: | ||
':development': | ||
- gem: 'github_changelog_generator' | ||
git: 'https://github.com/skywinder/github-changelog-generator' | ||
ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' | ||
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')" | ||
EOM | ||
end | ||
end | ||
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 || JSON.load(File.read('metadata.json'))['name'] | ||
raise "unable to find the changelog_project in .sync.yml or the name 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 = 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.configure_sections = { | ||
"Changed" => { | ||
"prefix" => "### Changed", | ||
"labels" => ["backwards-incompatible"], | ||
}, | ||
"Added" => { | ||
"prefix" => "### Added", | ||
"labels" => ["feature", "enhancement"], | ||
}, | ||
"Fixed" => { | ||
"prefix" => "### Fixed", | ||
"labels" => ["bugfix"], | ||
}, | ||
} | ||
end | ||
else | ||
desc 'Generate a Changelog from GitHub' | ||
task :changelog do | ||
raise <<EOM | ||
The changelog tasks depends on unreleased features of the github_changelog_generator gem. | ||
Please manually add it to your .sync.yml for now, and run `pdk update`: | ||
--- | ||
Gemfile: | ||
optional: | ||
':development': | ||
- gem: 'github_changelog_generator' | ||
git: 'https://github.com/skywinder/github-changelog-generator' | ||
ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' | ||
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')" | ||
EOM | ||
end | ||
end | ||
|
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,63 +1,74 @@ | ||
--- | ||
version: 1.1.x.{build} | ||
branches: | ||
only: | ||
- master | ||
skip_commits: | ||
message: /^\(?doc\)?.*/ | ||
clone_depth: 10 | ||
init: | ||
- SET | ||
- 'mkdir C:\ProgramData\PuppetLabs\code && exit 0' | ||
- 'mkdir C:\ProgramData\PuppetLabs\facter && exit 0' | ||
- 'mkdir C:\ProgramData\PuppetLabs\hiera && exit 0' | ||
- 'mkdir C:\ProgramData\PuppetLabs\puppet\var && exit 0' | ||
environment: | ||
matrix: | ||
- | ||
RUBY_VERSION: 24-x64 | ||
CHECK: syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop | ||
- | ||
PUPPET_GEM_VERSION: ~> 6.0 | ||
RUBY_VERSION: 25 | ||
CHECK: spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 6.0 | ||
RUBY_VERSION: 25-x64 | ||
CHECK: spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 4.0 | ||
RUBY_VERSION: 21 | ||
CHECK: spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 4.0 | ||
RUBY_VERSION: 21-x64 | ||
CHECK: spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 5.0 | ||
RUBY_VERSION: 24 | ||
CHECK: spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 5.0 | ||
RUBY_VERSION: 24-x64 | ||
CHECK: spec | ||
matrix: | ||
fast_finish: true | ||
install: | ||
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH% | ||
- bundle install --jobs 4 --retry 2 --without system_tests | ||
- type Gemfile.lock | ||
build: off | ||
test_script: | ||
- bundle exec puppet -V | ||
- ruby -v | ||
- gem -v | ||
- bundle -v | ||
- bundle exec rake %CHECK% | ||
notifications: | ||
- provider: Email | ||
to: | ||
- nobody@nowhere.com | ||
on_build_success: false | ||
on_build_failure: false | ||
on_build_status_changed: false | ||
--- | ||
version: 1.1.x.{build} | ||
branches: | ||
only: | ||
- master | ||
skip_commits: | ||
message: /^\(?doc\)?.*/ | ||
clone_depth: 10 | ||
init: | ||
- SET | ||
- 'mkdir C:\ProgramData\PuppetLabs\code && exit 0' | ||
- 'mkdir C:\ProgramData\PuppetLabs\facter && exit 0' | ||
- 'mkdir C:\ProgramData\PuppetLabs\hiera && exit 0' | ||
- 'mkdir C:\ProgramData\PuppetLabs\puppet\var && exit 0' | ||
environment: | ||
matrix: | ||
- | ||
RUBY_VERSION: 24-x64 | ||
CHECK: syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop | ||
- | ||
PUPPET_GEM_VERSION: ~> 5.0 | ||
RUBY_VERSION: 24 | ||
CHECK: parallel_spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 5.0 | ||
RUBY_VERSION: 24-x64 | ||
CHECK: parallel_spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 6.0 | ||
RUBY_VERSION: 25 | ||
CHECK: parallel_spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 6.0 | ||
RUBY_VERSION: 25-x64 | ||
CHECK: parallel_spec | ||
- | ||
RUBY_VERSION: 193 | ||
CHECK: rubocop | ||
- | ||
PUPPET_GEM_VERSION: ~> 4.0 | ||
RUBY_VERSION: 21 | ||
CHECK: spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 4.0 | ||
RUBY_VERSION: 21-x64 | ||
CHECK: spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 5.0 | ||
RUBY_VERSION: 24 | ||
CHECK: spec | ||
- | ||
PUPPET_GEM_VERSION: ~> 5.0 | ||
RUBY_VERSION: 24-x64 | ||
CHECK: spec | ||
matrix: | ||
fast_finish: true | ||
install: | ||
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH% | ||
- bundle install --jobs 4 --retry 2 --without system_tests | ||
- type Gemfile.lock | ||
build: off | ||
test_script: | ||
- bundle exec puppet -V | ||
- ruby -v | ||
- gem -v | ||
- bundle -v | ||
- bundle exec rake %CHECK% | ||
notifications: | ||
- provider: Email | ||
to: | ||
- nobody@nowhere.com | ||
on_build_success: false | ||
on_build_failure: false | ||
on_build_status_changed: false |
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,39 +1,39 @@ | ||
{ | ||
"name": "puppetlabs-scheduled_task", | ||
"version": "1.0.0", | ||
"author": "puppetlabs", | ||
"summary": "Manage scheduled tasks for Windows Server 2008 and newer operating systems.", | ||
"license": "Apache-2.0", | ||
"source": "https://github.com/puppetlabs/puppetlabs-scheduled_task.git", | ||
"project_page": "https://github.com/puppetlabs/puppetlabs-scheduled_task", | ||
"issues_url": "https://tickets.puppet.com/browse/MODULES", | ||
"dependencies": [ | ||
|
||
], | ||
"operatingsystem_support": [ | ||
{ | ||
"operatingsystem": "windows", | ||
"operatingsystemrelease": [ | ||
"2008", | ||
"2008 R2", | ||
"2012", | ||
"2012 R2", | ||
"2016", | ||
"2019", | ||
"7", | ||
"8", | ||
"8.1", | ||
"10" | ||
] | ||
} | ||
], | ||
"requirements": [ | ||
{ | ||
"name": "puppet", | ||
"version_requirement": ">= 4.9.0 < 7.0.0" | ||
} | ||
], | ||
"pdk-version": "1.8.0", | ||
"template-url": "https://github.com/puppetlabs/pdk-templates", | ||
"template-ref": "heads/master-0-g7281db5" | ||
{ | ||
"name": "puppetlabs-scheduled_task", | ||
"version": "1.0.0", | ||
"author": "puppetlabs", | ||
"summary": "Manage scheduled tasks for Windows Server 2008 and newer operating systems.", | ||
"license": "Apache-2.0", | ||
"source": "https://github.com/puppetlabs/puppetlabs-scheduled_task.git", | ||
"project_page": "https://github.com/puppetlabs/puppetlabs-scheduled_task", | ||
"issues_url": "https://tickets.puppet.com/browse/MODULES", | ||
"dependencies": [ | ||
|
||
], | ||
"operatingsystem_support": [ | ||
{ | ||
"operatingsystem": "windows", | ||
"operatingsystemrelease": [ | ||
"2008", | ||
"2008 R2", | ||
"2012", | ||
"2012 R2", | ||
"2016", | ||
"2019", | ||
"7", | ||
"8", | ||
"8.1", | ||
"10" | ||
] | ||
} | ||
], | ||
"requirements": [ | ||
{ | ||
"name": "puppet", | ||
"version_requirement": ">= 4.9.0 < 7.0.0" | ||
} | ||
], | ||
"pdk-version": "1.9.0", | ||
"template-url": "https://github.com/puppetlabs/pdk-templates", | ||
"template-ref": "heads/master-0-gccb6124" | ||
} |