Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup testing and expeditor configs to match other Chef projects #265

Merged
merged 10 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
# Documentation available at https://expeditor.chef.io/docs/getting-started/
---
# Slack channel in Chef Software slack to send notifications about build failures, etc
slack:
notify_channel: releng-notify

# This publish is triggered by the `built_in:publish_rubygems` artifact_action.
rubygems:
- mixlib-install

github:
# This deletes the GitHub PR branch after successfully merged into the release branch
delete_branch_on_merge: true
version_tag_format: v{{version}}
# The tag format to use (e.g. v1.0.0)
version_tag_format: "v{{version}}"
# allow bumping the minor release via label
minor_bump_labels:
- "Version: Bump Minor"
- "Expeditor: Bump Minor Version"

rubygems:
- mixlib-install
changelog:
rollup_header: Changes not yet released to rubygems.org

# These actions are taken, in order they are specified, anytime a Pull Request is merged.
merge_actions:
- built_in:bump_version:
ignore_labels:
- "Version: Skip Bump"
- "Expeditor: Skip Version Bump"
- "Expeditor: Skip All"
- bash:.expeditor/update_version.sh:
only_if: built_in:bump_version
- built_in:update_changelog:
ignore_labels:
- "Changelog: Skip Update"
- "Expeditor: Exclude From Changelog"
- "Expeditor: Skip All"
- built_in:build_gem:
only_if:
- built_in:bump_version
only_if: built_in:bump_version

promote:
action:
actions:
- built_in:rollover_changelog
- built_in:publish_rubygems
3 changes: 3 additions & 0 deletions .expeditor/update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
set -evx

sed -i -r "s/VERSION = \".+\"/VERSION = \"$(cat VERSION)\"/" lib/mixlib/install/version.rb

# Once Expeditor finshes executing this script, it will commit the changes and push
# the commit as a new tag corresponding to the value in the VERSION file.
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ matrix:
include:
# WE SUPPORT UPGRADES OF CHEF 11.x on RUBY 1.9.3 VIA chef_client_updater COOKBOOK
- rvm: 1.9.3
bundler_args: --without chefstyle functional --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
bundler_args: --without chefstyle functional development docs --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
script:
- bundle exec rake unit
- bundle exec rake functional
- rvm: 2.0
- rvm: 2.1.10
- rvm: 2.2.10
- rvm: 2.3.7
- rvm: 2.4.4
- rvm: 2.5.1
- rvm: 2.3.8
- rvm: 2.4.5
- rvm: 2.5.3
- rvm: ruby-head
allow_failures:
- rvm: ruby-head
Expand All @@ -34,11 +34,12 @@ branches:
only:
- master

script:
- bundle exec rake travis:ci
bundler_args: --without docs development

before_install:
- gem install bundler
- bundle --version
- gem update --system
- gem --version

script: bundle exec rake
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@
- Update install scripts to not mention Omnibus [#271](https://github.com/chef/mixlib-install/pull/271) ([tas50](https://github.com/tas50))
<!-- latest_release -->

## [v3.11.6](https://github.com/chef/mixlib-install/tree/v3.11.6) (2018-08-29)
<!-- release_rollup since=3.11.5 -->
### Changes not yet released to rubygems.org

#### Merged Pull Requests
- Rename suse platform to opensuseleap [#268](https://github.com/chef/mixlib-install/pull/268) ([tas50](https://github.com/tas50))
- Update install scripts to not mention Omnibus [#271](https://github.com/chef/mixlib-install/pull/271) ([tas50](https://github.com/tas50)) <!-- 3.11.7 -->
- Rename suse platform to opensuseleap [#268](https://github.com/chef/mixlib-install/pull/268) ([tas50](https://github.com/tas50)) <!-- 3.11.6 -->
<!-- release_rollup -->

<!-- latest_stable_release -->
## [v3.11.5](https://github.com/chef/mixlib-install/tree/v3.11.5) (2018-08-08)

#### Merged Pull Requests
- update amazon platform mapping to support Versions 1, 2, and 2 RCs [#264](https://github.com/chef/mixlib-install/pull/264) ([wrightp](https://github.com/wrightp))
<!-- latest_stable_release -->

## [v3.11.4](https://github.com/chef/mixlib-install/tree/v3.11.4) (2018-08-01)

Expand Down Expand Up @@ -293,4 +298,4 @@

## [1.0.0]
- Ability to query product artifacts from multiple channels
- Ability to generate installation scripts for `sh` and `ps1`
- Ability to generate installation scripts for `sh` and `ps1`
17 changes: 15 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ source "https://rubygems.org"

gemspec

group :test, :development do
group :docs do
gem "yard"
gem "redcarpet"
gem "github-markup"
end

group :test do
gem "rake"
gem "rspec"
gem "vcr"
Expand All @@ -19,8 +25,15 @@ if RUBY_VERSION =~ /^2/
end
end

group :development do
gem "pry"
gem "pry-byebug"
gem "pry-stack_explorer"
gem "rb-readline"
end

instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]

# If you want to load debugging tools into the bundle exec sandbox,
# add these additional dependencies into Gemfile.local
eval(IO.read(__FILE__ + ".local"), binding) if File.exist?(__FILE__ + ".local")
eval_gemfile(__FILE__ + ".local") if File.exist?(__FILE__ + ".local")
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.org/chef/mixlib-install.svg?branch=master)](https://travis-ci.org/chef/mixlib-install)
[![Gem Version](https://badge.fury.io/rb/mixlib-install.svg)](https://badge.fury.io/rb/mixlib-install)

# Mixlib::Install

Expand Down Expand Up @@ -218,9 +219,9 @@ Mixlib::Install instantiation option `install_command_options` can accept variab

Some of the more common options include:

`download_url_override`: Use the provided URL instead of fetching the metadata URL from Chef Software Inc's software distribution systems.
`checksum`: SHA256 value associated to the directed file for the download_url_override option. This setting is optional. Not setting this will download the file even if a cached file is detected.
`install_strategy`: Set to "once" to have the script exit if the product being installed is detected.
`download_url_override`: Use the provided URL instead of fetching the metadata URL from Chef Software Inc's software distribution systems.
`checksum`: SHA256 value associated to the directed file for the download_url_override option. This setting is optional. Not setting this will download the file even if a cached file is detected.
`install_strategy`: Set to "once" to have the script exit if the product being installed is detected.

```ruby
options = {
Expand Down
18 changes: 10 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,13 @@ end
begin
require "chefstyle"
require "rubocop/rake_task"
RuboCop::RakeTask.new(:chefstyle) do |task|
task.options << "--display-cop-names"
RuboCop::RakeTask.new(:style) do |task|
task.options += ["--display-cop-names", "--no-color"]
end
rescue LoadError
puts "chefstyle gem is not installed"
end

namespace :travis do
desc "Run tests on Travis CI"
task ci: %w{chefstyle unit functional}
end

desc "Render product matrix documentation"
task "matrix" do
require "mixlib/install/product"
Expand All @@ -45,6 +40,13 @@ task "matrix" do
end
end

begin
require "yard"
YARD::Rake::YardocTask.new(:docs)
rescue LoadError
puts "yard is not available. bundle install first to make sure all dependencies are installed."
end

task :console do
require "irb"
require "irb/completion"
Expand All @@ -53,4 +55,4 @@ task :console do
IRB.start
end

task default: %w{travis:ci}
task default: %w{style unit functional}