Skip to content

Commit

Permalink
Use the latest expeditor config and fix buildkite tests (#148)
Browse files Browse the repository at this point in the history
Switch back to community-zero
Nuke the travis config
Make sure Rake can install the gem by specifying the right gem
Fix the version bump script

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 authored Oct 15, 2019
1 parent 6ab8f7b commit 63119c7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 37 deletions.
6 changes: 3 additions & 3 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
@@ -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-ws-notify
Expand Down Expand Up @@ -34,11 +35,10 @@ merge_actions:
only_if: built_in:bump_version
- built_in:update_changelog:
ignore_labels:
- "Expeditor: Exclude From Changelog"
- "Expeditor: Skip Changelog"
- "Expeditor: Skip All"
- built_in:build_gem:
only_if:
- built_in:bump_version
only_if: built_in:bump_version

pipelines:
- verify:
Expand Down
18 changes: 9 additions & 9 deletions .expeditor/run_linux_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ apt-get update -y
apt-get install awscli -y

# grab the s3 bundler if it's there and use it for all operations in bundler
echo "Fetching bundle cache archive from s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.tar.bz2"
aws s3 cp "s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.tar.bz2" bundle.tar.bz2 || echo 'Could not pull the bundler archive from s3 for caching. Builds may be slower than usual as all gems will have to install.'
echo "Fetching bundle cache archive from s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.tar.gz"
aws s3 cp "s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.tar.gz" bundle.tar.gz || echo 'Could not pull the bundler archive from s3 for caching. Builds may be slower than usual as all gems will have to install.'
aws s3 cp "s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.sha256" bundle.sha256 || echo "Could not pull the sha256 hash of the vendor/bundle directory from s3. Without this we will compress and upload the bundler archive to S3 even if it hasn't changed"

echo "Restoring the bundle cache archive to vendor/bundle"
if [ -f bundle.tar.bz2 ]; then
tar -xjf bundle.tar.bz2
if [ -f bundle.tar.gz ]; then
tar -xzf bundle.tar.gz
fi
bundle config --local path vendor/bundle

bundle install --jobs=7 --retry=3
bundle exec $1

if [[ -f bundle.tar.bz2 && -f bundle.sha256 ]]; then # dont' check the sha if we're missing either file
if [[ -f bundle.tar.gz && -f bundle.sha256 ]]; then # dont' check the sha if we're missing either file
if shasum --check bundle.sha256 --status; then # if the the sha matches we're done
echo "Bundled gems have not changed. Skipping upload to s3"
exit
Expand All @@ -34,11 +34,11 @@ fi
echo "Generating sha256 hash file of the vendor/bundle directory to ship to s3"
shasum -a 256 vendor/bundle > bundle.sha256

echo "Creating the tar.bz2 to of the vendor/bundle directory to ship to s3"
tar -cjf bundle.tar.bz2 vendor/
echo "Creating the tar.gz to of the vendor/bundle directory to ship to s3"
tar -czf bundle.tar.gz vendor/

echo "Uploading the tar.bz2 of the vendor/bundle directory to s3"
aws s3 cp bundle.tar.bz2 "s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.tar.bz2" || echo 'Could not push the bundler directory to s3 for caching. Future builds may be slower if this continues.'
echo "Uploading the tar.gz of the vendor/bundle directory to s3"
aws s3 cp bundle.tar.gz "s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.tar.gz" || echo 'Could not push the bundler directory to s3 for caching. Future builds may be slower if this continues.'

echo "Uploading the sha256 hash of the vendor/bundle directory to s3"
aws s3 cp bundle.sha256 "s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.sha256" || echo 'Could not push the bundler directory to s3 for caching. Future builds may be slower if this continues.'
2 changes: 1 addition & 1 deletion .expeditor/update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

set -evx

sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" lib/chef_core/version.rb
sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" lib/stove/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.
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

5 changes: 4 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
require 'bundler/gem_tasks'
require "bundler"
require "bundler/gem_helper"

Bundler::GemHelper.install_tasks name: "stove"

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:unit) do |t|
Expand Down
2 changes: 1 addition & 1 deletion stove.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'aruba', '~> 0.6.0'
spec.add_development_dependency 'bundler'
spec.add_development_dependency 'chef-community-zero', '~> 2.0'
spec.add_development_dependency 'community-zero', '~> 2.0'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rspec-command', '~> 1.0'
Expand Down

0 comments on commit 63119c7

Please sign in to comment.