summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-12-29 18:39:05 -0800
committerGitHub <noreply@github.com>2019-12-29 18:39:05 -0800
commit25b6e3cc1001869d55c0bc02b7461971f7cad19e (patch)
treecf32b603c677f81d3cfffca0fbc6d0b763b561f6
parentc35d241209d5067afd6ed5fd23c063bf1ae74a58 (diff)
parentd150d02ed25010be4b5dfeaf0a2e40e96a01deae (diff)
downloadmixlib-shellout-25b6e3cc1001869d55c0bc02b7461971f7cad19e.tar.gz
Merge pull request #198 from chef/windows_testing
Add Ruby 2.6/2.7 and Windows testing
-rw-r--r--.expeditor/config.yml3
-rwxr-xr-x.expeditor/run_linux_tests.sh53
-rw-r--r--.expeditor/verify.pipeline.yml43
-rw-r--r--.github/CODEOWNERS4
-rw-r--r--.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md2
-rw-r--r--.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md2
-rw-r--r--.rubocop.yml3
-rw-r--r--Gemfile10
-rw-r--r--README.md2
-rw-r--r--appveyor.yml47
-rw-r--r--ci/jenkins_run_tests.bat14
-rwxr-xr-xci/jenkins_run_tests.sh13
12 files changed, 98 insertions, 98 deletions
diff --git a/.expeditor/config.yml b/.expeditor/config.yml
index 7032e6c..a3d4b3d 100644
--- a/.expeditor/config.yml
+++ b/.expeditor/config.yml
@@ -1,5 +1,6 @@
# 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: chef-found-notify
@@ -12,6 +13,8 @@ rubygems:
github:
# This deletes the GitHub PR branch after successfully merged into the release branch
delete_branch_on_merge: true
+ # 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:
- "Expeditor: Bump Version Minor"
diff --git a/.expeditor/run_linux_tests.sh b/.expeditor/run_linux_tests.sh
new file mode 100755
index 0000000..4c14c80
--- /dev/null
+++ b/.expeditor/run_linux_tests.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+#
+# This script runs a passed in command, but first setups up the bundler caching on the repo
+
+set -ue
+
+export USER="root"
+
+echo "--- dependencies"
+export LANG=C.UTF-8 LANGUAGE=C.UTF-8
+S3_URL="s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}"
+
+pull_s3_file() {
+ aws s3 cp "${S3_URL}/$1" "$1" || echo "Could not pull $1 from S3"
+}
+
+push_s3_file() {
+ if [ -f "$1" ]; then
+ aws s3 cp "$1" "${S3_URL}/$1" || echo "Could not push $1 to S3 for caching."
+ fi
+}
+
+apt-get update -y
+apt-get install awscli -y
+
+echo "--- bundle install"
+pull_s3_file "bundle.tar.gz"
+pull_s3_file "bundle.sha256"
+
+if [ -f bundle.tar.gz ]; then
+ tar -xzf bundle.tar.gz
+fi
+
+if [ -n "${RESET_BUNDLE_CACHE:-}" ]; then
+ rm bundle.sha256
+fi
+
+bundle config --local path vendor/bundle
+bundle install --jobs=7 --retry=3
+
+echo "--- bundle cache"
+if test -f bundle.sha256 && shasum --check bundle.sha256 --status; then
+ echo "Bundled gems have not changed. Skipping upload to s3"
+else
+ echo "Bundled gems have changed. Uploading to s3"
+ shasum -a 256 Gemfile.lock > bundle.sha256
+ tar -czf bundle.tar.gz vendor/
+ push_s3_file bundle.tar.gz
+ push_s3_file bundle.sha256
+fi
+
+echo "+++ bundle exec task"
+bundle exec $1
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index a29049b..57afa06 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -1,10 +1,15 @@
+---
+expeditor:
+ defaults:
+ buildkite:
+ timeout_in_minutes: 30
+
steps:
- label: run-lint-and-specs-ruby-2.2
command:
- export USER="root"
- - bundle install --jobs=7 --retry=3 --without docs development style
- - bundle exec rake spec
+ - .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
@@ -13,8 +18,7 @@ steps:
- label: run-lint-and-specs-ruby-2.3
command:
- export USER="root"
- - bundle install --jobs=7 --retry=3 --without docs development
- - bundle exec rake
+ - .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
@@ -23,29 +27,44 @@ steps:
- label: run-lint-and-specs-ruby-2.4
command:
- export USER="root"
- - bundle install --jobs=7 --retry=3 --without docs development
- - bundle exec rake
+ - .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
- image: ruby:2.4-stretch
+ image: ruby:2.4-buster
- label: run-lint-and-specs-ruby-2.5
command:
- - bundle install --jobs=7 --retry=3 --without docs development
- export USER="root"
- - bundle exec rake
+ - .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
- image: ruby:2.5-stretch
+ image: ruby:2.5-buster
- label: run-lint-and-specs-ruby-2.6
command:
- export USER="root"
- - bundle install --jobs=7 --retry=3 --without docs development
+ - .expeditor/run_linux_tests.sh rake
+ expeditor:
+ executor:
+ docker:
+ image: ruby:2.6-buster
+
+- label: run-lint-and-specs-ruby-2.7rc
+ command:
+ - export USER="root"
+ - .expeditor/run_linux_tests.sh rake
+ expeditor:
+ executor:
+ docker:
+ image: ruby:2.7-rc-buster
+
+- label: run-specs-windows
+ command:
+ - bundle install --jobs=7 --retry=3 --without docs debug
- bundle exec rake
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ host_os: windows
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index f1217b3..950afb7 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,5 +1,5 @@
# Order is important. The last matching pattern has the most precedence.
-* @chef/chef-foundation-reviewers
-.expeditor/** @chef/jex-team
+* @chef/chef-foundation-owners @chef/chef-foundation-approvers @chef/chef-foundation-reviewers
+.expeditor/ @chef/jex-team
*.md @chef/docs-team
diff --git a/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md b/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md
index f28915b..87ac9b4 100644
--- a/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md
@@ -1,7 +1,7 @@
---
name: � Bug Report
about: If something isn't working as expected �.
-labels: "Status: Untriaged"
+labels: "Status: Untriaged, Type: Bug"
---
# Version:
diff --git a/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md b/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md
index 9f4a958..9508b09 100644
--- a/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md
+++ b/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md
@@ -1,7 +1,7 @@
---
name: Design Proposal
about: I have a significant change I would like to propose and discuss before starting
-labels: "Status: Untriaged"
+labels: "Status: Untriaged, Type: Design Proposal"
---
### When a Change Needs a Design Proposal
diff --git a/.rubocop.yml b/.rubocop.yml
index f3a8913..e9fb15f 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,3 +1,6 @@
+AllCops:
+ TargetRubyVersion: 2.2
+
Lint/UnderscorePrefixedVariableName:
Exclude:
- 'spec/mixlib/shellout/windows_spec.rb'
diff --git a/Gemfile b/Gemfile
index aaf91fb..35dcaaa 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,19 +8,15 @@ group :docs do
gem "github-markup"
end
-# added to its own group so we can exclude for Ruby 2.2
-group :style do
- gem "chefstyle"
-end
-
group :test do
+ gem "chefstyle", "~> 0.11.0" # still supports Ruby 2.2 TargetRubyVersion
gem "rspec", "~> 3.0"
gem "rake"
end
-group :development do
+group :debug do
gem "pry"
- gem "pry-byebug"
+ gem "pry-byebug", "~> 3.6.0" # Pinned for ruby 2.2
gem "pry-stack_explorer"
gem "rb-readline"
end
diff --git a/README.md b/README.md
index 82cb0a3..7c3cb20 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# Mixlib::ShellOut
-[![Build Status Master](https://ci.appveyor.com/api/projects/status/github/chef/mixlib-shellout?branch=master&svg=true&passingText=master%20-%20Ok&pendingText=master%20-%20Pending&failingText=master%20-%20Failing)](https://ci.appveyor.com/project/Chef/mixlib-shellout/branch/master) [![Build Status](https://badge.buildkite.com/7051b7b35cc19076c35a6e6a9e996807b0c14475ca3f3acd86.svg)](https://buildkite.com/chef-oss/chef-mixlib-shellout-master-verify) [![Gem Version](https://badge.fury.io/rb/mixlib-shellout.svg)](https://badge.fury.io/rb/mixlib-shellout)
+[![Build Status](https://badge.buildkite.com/7051b7b35cc19076c35a6e6a9e996807b0c14475ca3f3acd86.svg)](https://buildkite.com/chef-oss/chef-mixlib-shellout-master-verify) [![Gem Version](https://badge.fury.io/rb/mixlib-shellout.svg)](https://badge.fury.io/rb/mixlib-shellout)
**Umbrella Project**: [Chef Foundation](https://github.com/chef/chef-oss-practices/blob/master/projects/chef-foundation.md)
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index e029cd2..0000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-version: "master-{build}"
-
-os: Windows Server 2012 R2
-platform:
- - x64
-
-cache:
- - vendor/bundle
-environment:
- matrix:
- - ruby_version: "23"
- - ruby_version: "23-x64"
- - ruby_version: "24-x64"
- - ruby_version: "25-x64"
- - ruby_version: "26-x64"
-
-clone_folder: c:\projects\mixlib-shellout
-clone_depth: 1
-skip_tags: true
-branches:
- only:
- - master
-
-skip_commits:
- # version bumps by Expeditor happen as a separate commit after the merge, we can skip
- author: Chef Expeditor
- # if ONLY the files listed below are changed in a commit, skip
- files:
- - MAINTAINERS.md
- - MAINTAINERS.toml
- - CHANGELOG.md
- - RELEASE_NOTES.md
-
-install:
- - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- - echo %PATH%
- - ruby --version
- - gem update --system
- - gem --version
- - gem install bundler --quiet --no-document
- - bundler --version
-
-build_script:
- - bundle install --jobs=7 --retry=3 --without docs development
-
-test_script:
- - bundle exec rspec
diff --git a/ci/jenkins_run_tests.bat b/ci/jenkins_run_tests.bat
deleted file mode 100644
index 9483952..0000000
--- a/ci/jenkins_run_tests.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-ruby -v
-
-call bundle check
-
-if %ERRORLEVEL% NEQ 0 (
- call rm Gemfile.lock
- call bundle install --without docgen --path vendor/bundle
-)
-
-bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec
-
-set RSPEC_ERRORLVL=%ERRORLEVEL%
-REM Return the error level from rspec
-exit /B %RSPEC_ERRORLVL%
diff --git a/ci/jenkins_run_tests.sh b/ci/jenkins_run_tests.sh
deleted file mode 100755
index 5bf7def..0000000
--- a/ci/jenkins_run_tests.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-export PATH=$PATH:/usr/local/bin
-
-ruby -v;
-# remove the Gemfile.lock and try again if bundler fails.
-# This should take care of Gemfile changes that result in "bad" bundles without forcing us to rebundle every time
-bundle install --without docgen --path vendor/bundle || ( rm Gemfile.lock && bundle install --path vendor/bundle )
-bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec;
-RSPEC_RETURNCODE=$?
-
-# exit with the result of running rspec
-exit $RSPEC_RETURNCODE