summaryrefslogtreecommitdiff
path: root/.expeditor
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 /.expeditor
parentcacf2ec72ca4f07f60a6ea97abd287a754d635ac (diff)
downloadwmi-lite-322fd21cee0815102af8bdc2be8b016d6ea346f0.tar.gz
Migrate testing to Buildkite
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to '.expeditor')
-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
4 files changed, 98 insertions, 2 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