summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2019-12-20 21:53:04 -0800
committerTim Smith <tsmith84@gmail.com>2019-12-20 21:53:04 -0800
commit322fd21cee0815102af8bdc2be8b016d6ea346f0 (patch)
tree0c73278eaa52e3c7f44dbe52d82a7bba1140ca80
parentcacf2ec72ca4f07f60a6ea97abd287a754d635ac (diff)
downloadwmi-lite-322fd21cee0815102af8bdc2be8b016d6ea346f0.tar.gz
Migrate testing to Buildkite
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--.expeditor/config.yml13
-rwxr-xr-x.expeditor/run_linux_tests.sh53
-rw-r--r--.expeditor/update_version.sh2
-rw-r--r--.expeditor/verify.pipeline.yml32
-rw-r--r--.github/CODEOWNERS5
-rw-r--r--.github/ISSUE_TEMPLATE.md12
-rw-r--r--.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md29
-rw-r--r--.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md40
-rw-r--r--.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md17
-rw-r--r--.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md11
-rw-r--r--.github/PULL_REQUEST_TEMPLATE.md1
-rw-r--r--.github/lock.yml1
-rw-r--r--.rspec2
-rw-r--r--.travis.yml21
-rw-r--r--CONTRIBUTING.md1
-rw-r--r--Gemfile6
-rw-r--r--Rakefile28
17 files changed, 229 insertions, 45 deletions
diff --git a/.expeditor/config.yml b/.expeditor/config.yml
index 185f96e..c4b970e 100644
--- a/.expeditor/config.yml
+++ b/.expeditor/config.yml
@@ -1,8 +1,11 @@
# 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-notify
+ notify_channel:
+ - sustaining-notify
+ - chef-ws-notify
# This publish is triggered by the `built_in:publish_rubygems` artifact_action.
rubygems:
@@ -16,6 +19,9 @@ github:
# allow bumping the minor release via label
minor_bump_labels:
- "Expeditor: Bump Version Minor"
+ # allow bumping the major release via label
+ major_bump_labels:
+ - "Expeditor: Bump Version Major"
changelog:
rollup_header: Changes not yet released to rubygems.org
@@ -39,3 +45,8 @@ promote:
actions:
- built_in:rollover_changelog
- built_in:publish_rubygems
+
+pipelines:
+ - verify:
+ description: Pull Request validation tests
+ public: true
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/update_version.sh b/.expeditor/update_version.sh
index 38723c2..9538662 100644
--- a/.expeditor/update_version.sh
+++ b/.expeditor/update_version.sh
@@ -8,5 +8,5 @@ set -evx
sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" lib/wmi-lite/version.rb
-# Once Expeditor finshes executing this script, it will commit the changes and push
+# Once Expeditor finishes executing this script, it will commit the changes and push
# the commit as a new tag corresponding to the value in the VERSION file.
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
new file mode 100644
index 0000000..8ab2bfa
--- /dev/null
+++ b/.expeditor/verify.pipeline.yml
@@ -0,0 +1,32 @@
+---
+
+steps:
+
+- label: run-specs-ruby-2.4
+ command:
+ - .expeditor/run_linux_tests.sh rake
+ expeditor:
+ executor:
+ docker:
+ image: ruby:2.4-buster
+- label: run-specs-ruby-2.5
+ command:
+ - .expeditor/run_linux_tests.sh rake
+ expeditor:
+ executor:
+ docker:
+ image: ruby:2.5-buster
+- label: run-specs-ruby-2.6
+ command:
+ - .expeditor/run_linux_tests.sh rake
+ expeditor:
+ executor:
+ docker:
+ image: ruby:2.6-buster
+- label: run-specs-ruby-2.7-rc
+ command:
+ - .expeditor/run_linux_tests.sh rake
+ expeditor:
+ executor:
+ docker:
+ image: ruby:2.7-rc-buster \ No newline at end of file
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index fee8d42..b82929a 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,4 +1,5 @@
# Order is important. The last matching pattern has the most precedence.
-* @chef/client-maintainers
-.expeditor/** @chef/jex-team
+* @chef/msys-developers
+.expeditor/ @chef/jex-team
+*.md @chef/docs-team
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 90c720d..0000000
--- a/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,12 +0,0 @@
-## Description
-<!--- Briefly describe the issue -->
-
-## Gem Version
-<!--- Tell us which version of the gem you are using. -->
-
-## Windows Version
-<!--- Tell us which version of Windows you are running. -->
-
-## Replication Case
-<!--- Tell us what steps to take to replicate your problem. See [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve)
-for information on how to create a good replication case. -->
diff --git a/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md b/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md
new file mode 100644
index 0000000..87ac9b4
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md
@@ -0,0 +1,29 @@
+---
+name: � Bug Report
+about: If something isn't working as expected �.
+labels: "Status: Untriaged, Type: Bug"
+---
+
+# Version:
+
+[Version of the project installed]
+
+# Environment:
+
+[Details about the environment such as the Operating System, cookbook details, etc...]
+
+# Scenario:
+
+[What you are trying to achieve and you can't?]
+
+# Steps to Reproduce:
+
+[If you are filing an issue what are the things we need to do in order to repro your problem?]
+
+# Expected Result:
+
+[What are you expecting to happen as the consequence of above reproduction steps?]
+
+# Actual Result:
+
+[What actually happens after the reproduction steps?]
diff --git a/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md b/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md
new file mode 100644
index 0000000..9508b09
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md
@@ -0,0 +1,40 @@
+---
+name: Design Proposal
+about: I have a significant change I would like to propose and discuss before starting
+labels: "Status: Untriaged, Type: Design Proposal"
+---
+
+### When a Change Needs a Design Proposal
+
+A design proposal should be opened any time a change meets one of the following qualifications:
+
+- Significantly changes the user experience of a project in a way that impacts users.
+- Significantly changes the underlying architecture of the project in a way that impacts other developers.
+- Changes the development or testing process of the project such as a change of CI systems or test frameworks.
+
+### Why We Use This Process
+
+- Allows all interested parties (including any community member) to discuss large impact changes to a project.
+- Serves as a durable paper trail for discussions regarding project architecture.
+- Forces design discussions to occur before PRs are created.
+- Reduces PR refactoring and rejected PRs.
+
+---
+
+<!--- Proposal description and rationale. -->
+
+## Motivation
+
+<!---
+ As a <<user_profile>>,
+ I want to <<functionality>>,
+ so that <<benefit>>.
+ -->
+
+## Specification
+
+<!--- A detailed description of the planned implementation. -->
+
+## Downstream Impact
+
+<!--- Which other tools will be impacted by this work? -->
diff --git a/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md b/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..0cf83a0
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md
@@ -0,0 +1,17 @@
+---
+name: 🚀 Enhancement Request
+about: I have a suggestion (and may want to implement it 🙂)!
+labels: "Status: Untriaged"
+---
+
+### Describe the Enhancement
+<!--- What you are trying to achieve that you can't? -->
+
+### Describe the Need
+<!--- What kind of user do you believe would utilize this enhancement, and how many users might want this functionality -->
+
+### Current Alternative
+<!--- Is there a current alternative that you can utilize to workaround the lack of this enhancement -->
+
+### Can We Help You Implement This?
+<!--- The best way to ensure your enhancement is built is to help implement the enhancement yourself. If you're interested in helping out we'd love to give you a hand to make this possible. Let us know if there's something you need. -->
diff --git a/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md b/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
new file mode 100644
index 0000000..80435f8
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
@@ -0,0 +1,11 @@
+---
+name: 🤗 Support Question
+about: If you have a question 💬, please check out our Slack!
+---
+
+We use GitHub issues to track bugs and feature requests. If you need help please post to our Mailing List or join the Chef Community Slack.
+
+* Chef Community Slack at <http://community-slack.chef.io/.>
+* Chef Mailing List <https://discourse.chef.io/>
+
+ Support issues opened here will be closed and redirected to Slack or Discourse.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 29bf60c..0df03f8 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -12,3 +12,4 @@ StackOverflow discussions that are relevant]
- [ ] New functionality includes tests
- [ ] All tests pass
- [ ] All commits have been signed-off for the Developer Certificate of Origin. See <https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco>
+- [ ] PR title is a worthy inclusion in the CHANGELOG \ No newline at end of file
diff --git a/.github/lock.yml b/.github/lock.yml
new file mode 100644
index 0000000..66d5d49
--- /dev/null
+++ b/.github/lock.yml
@@ -0,0 +1 @@
+daysUntilLock: 60
diff --git a/.rspec b/.rspec
index 7bfa3f2..8c18f1a 100644
--- a/.rspec
+++ b/.rspec
@@ -1,2 +1,2 @@
+--format documentation
--color
--fs
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index b79ba4c..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-sudo: false
-language: ruby
-cache: bundler
-dist: xenial
-
-matrix:
- include:
- - rvm: 2.3.8
- - rvm: 2.4.5
- - rvm: 2.5.3
- - rvm: ruby-head
- allow_failures:
- - rvm: ruby-head
-
-branches:
- only:
- - master
-
-bundler_args: --jobs 7 --without docs debug
-
-script: bundle exec rspec --color --format progress
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..03fdbfa
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please refer to https://github.com/chef/chef/blob/master/CONTRIBUTING.md
diff --git a/Gemfile b/Gemfile
index 3f0c104..e3b6279 100644
--- a/Gemfile
+++ b/Gemfile
@@ -13,9 +13,3 @@ group :debug do
gem "pry-byebug"
gem "pry-stack_explorer"
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_gemfile(__FILE__ + ".local") if File.exist?(__FILE__ + ".local")
diff --git a/Rakefile b/Rakefile
index c71976d..2e0489d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,4 +1,28 @@
-require 'bundler/gem_tasks'
+require "bundler/gem_tasks"
+
+begin
+ require "rspec/core/rake_task"
+
+ RSpec::Core::RakeTask.new do |t|
+ t.pattern = "spec/**/*_spec.rb"
+ end
+rescue LoadError
+ desc "rspec is not installed, this task is disabled"
+ task :spec do
+ abort "rspec is not installed. bundle install first to make sure all dependencies are installed."
+ end
+end
+
+begin
+ require "chefstyle"
+ require "rubocop/rake_task"
+ desc "Run Chefstyle tests"
+ RuboCop::RakeTask.new(:style) do |task|
+ task.options += ["--display-cop-names", "--no-color"]
+ end
+rescue LoadError
+ puts "chefstyle gem is not installed. bundle install first to make sure all dependencies are installed."
+end
begin
require "yard"
@@ -13,3 +37,5 @@ task :console do
ARGV.clear
IRB.start
end
+
+task default: %i{style spec}