Skip to content

Commit

Permalink
Merge pull request #299 from wordpress-mobile/add/buildkite
Browse files Browse the repository at this point in the history
Add Buildkite
  • Loading branch information
AliSoftware authored Oct 22, 2021
2 parents 2a00435 + 9c66e5a commit 4655900
Show file tree
Hide file tree
Showing 12 changed files with 109 additions and 147 deletions.
4 changes: 4 additions & 0 deletions .buildkite/brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
brew "pkg-config"
brew "libxml2"
brew "imagemagick@6"
brew "git-lfs"
18 changes: 18 additions & 0 deletions .buildkite/gem-push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash -eu

echo "--- :beer: Installing Dependencies"
brew bundle --file .buildkite/brewfile

echo "--- :rubygems: Setting up Gems"
install_gems

echo "--- :hammer: Build Gemspec"
gem build fastlane-plugin-wpmreleasetoolkit.gemspec

echo "--- :sleuth_or_spy: Validate Gem Install"
gem install --user-install fastlane-plugin-wpmreleasetoolkit-*.gem

echo "--- :rubygems: Gem Push"
echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" >>".gem-credentials"
chmod 600 ".gem-credentials"
gem push --config-file ".gem-credentials" fastlane-plugin-wpmreleasetoolkit-*.gem
77 changes: 77 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Nodes with values to reuse in the pipeline.
common_params:
plugins: &common_plugins
- &bash_cache automattic/bash-cache#v1.3.2: ~
env: &common_env
IMAGE_ID: xcode-12.5.1

steps:
#################
# Build and Test
#################
- label: "🧪 Build and Test"
key: "test"
command: |
echo "--- :beer: Installing Dependencies"
brew bundle --file .buildkite/brewfile
echo "--- :rubygems: Setting up Gems"
install_gems
echo "--- :hammer: Build DrawText"
bundle exec rake compile
echo "--- :git: Setting up git-lfs"
git-lfs install
echo "--- :rspec: Run Rspec"
bundle exec rspec --profile 10 --format progress
env: *common_env
plugins: *common_plugins
agents:
queue: "mac"

#################
# Lint
#################
- label: "🧹 Lint"
command: |
echo "--- :rubygems: Setting up Gems"
install_gems
echo "--- :rubocop: Run Rubocop"
bundle exec rubocop
env: *common_env
plugins: *common_plugins
agents:
queue: "mac"

#################
# Danger
#################
- label: "⛔️ Danger"
command: |
echo "--- :rubygems: Setting up Gems"
install_gems
echo "--- :rubocop: Run Danger"
bundle exec danger
env: *common_env
plugins: *common_plugins
agents:
queue: "mac"

#################
# Push to RubyGems
#################
- label: ":rubygems: Publish to RubyGems"
key: "gem-push"
if: build.tag != null
# Note: We intentionally call a separate `.sh` script here (as opposed to having all the
# commands written inline) to avoid leaking a key used in the process in clear in the
# BUILDKITE_COMMAND environment variable.
command: .buildkite/gem-push.sh
env: *common_env
plugins: *common_plugins
agents:
queue: "mac"
2 changes: 1 addition & 1 deletion .bundle/config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
BUNDLE_PATH: "vendor/bundle"
BUNDLE_SPECIFIC_PLATFORM: "false"
BUNDLE_WITH: "test"
3 changes: 0 additions & 3 deletions .circleci/.brewfile

This file was deleted.

2 changes: 0 additions & 2 deletions .circleci/cache-version

This file was deleted.

100 changes: 0 additions & 100 deletions .circleci/config.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _None_

### Internal Changes

_None_
- Replace CircleCI and GitHub Actions with Buildkite

## 2.0.0

Expand Down
9 changes: 3 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ gemspec
gem 'danger', '~> 8.0'
gem 'danger-rubocop', '~> 0.6'

group :test do
gem 'codecov', require: false
gem 'rspec'
gem 'webmock', require: false, group: :test
gem 'yard'
end
gem 'codecov', require: false
gem 'webmock', require: false
gem 'yard'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
6 changes: 4 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,9 @@ DEPENDENCIES
fastlane-plugin-wpmreleasetoolkit!
pry (~> 0.12.2)
rmagick (~> 4.1)
rspec
rspec (~> 3.8)
rspec-expectations (~> 3.8)
rspec-mocks (~> 3.8)
rspec_junit_formatter (~> 0.4.1)
rubocop (~> 1.0)
rubocop-require_tools (~> 0.1.2)
Expand All @@ -426,4 +428,4 @@ DEPENDENCIES
yard

BUNDLED WITH
2.2.25
2.2.27
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require 'simplecov'
require 'codecov'
require 'webmock/rspec'

# SimpleCov.minimum_coverage 95
SimpleCov.start
Expand Down

0 comments on commit 4655900

Please sign in to comment.