Skip to content

Commit

Permalink
Merge pull request #63 from Automattic/add/buildkite
Browse files Browse the repository at this point in the history
Add Buildkite
  • Loading branch information
jkmassel authored Aug 11, 2021
2 parents 13a1944 + ee05da6 commit a37feb9
Show file tree
Hide file tree
Showing 11 changed files with 406 additions and 84 deletions.
52 changes: 52 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Nodes with values to reuse in the pipeline.
common_params:
plugins: &common_plugins
- &bash_cache automattic/bash-cache#v1.3.2: ~
# Common environment values to use with the `env` key.
env: &common_env
IMAGE_ID: xcode-12.5.1

# This is the default pipeline – it will build and test the app
steps:
#################
# Build and Test
#################
- label: "🧪 Build and Test"
key: "test"
command: "build_and_test_pod"
env: *common_env
plugins: *common_plugins

#################
# Validate Podspec
#################
- label: "🔬 Validating Podspec"
key: "validate"
command: "validate_podspec"
env: *common_env
plugins: *common_plugins

#################
# Lint
#################
- label: "🧹 Lint"
key: "lint"
command: "lint_pod"
env: *common_env
plugins: *common_plugins

#################
# Publish the Podspec (if we're building a tag)
#################
- label: "⬆️ Publish Podspec"
key: "publish"
command: .buildkite/publish-pod.sh
env: *common_env
plugins: *common_plugins
depends_on:
- "test"
- "validate"
- "lint"
if: build.tag != null
agents:
queue: "mac"
13 changes: 13 additions & 0 deletions .buildkite/publish-pod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash -eu

PODSPEC_PATH="Gridicons.podspec"
SLACK_WEBHOOK=$PODS_SLACK_WEBHOOK

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

echo "--- :cocoapods: Publishing Pod to CocoaPods CDN"
publish_pod $PODSPEC_PATH

echo "--- :slack: Notifying Slack"
slack_notify_pod_published $PODSPEC_PATH $SLACK_WEBHOOK
11 changes: 0 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,3 @@ workflows:
xcode-version: "11.2.1"
podspec-path: Gridicons.podspec
bundle-install: true
- ios/publish-podspec:
name: Publish to Trunk
xcode-version: "11.2.1"
podspec-path: Gridicons.podspec
bundle-install: true
post-to-slack: true
filters:
tags:
only: /.*/
branches:
ignore: /.*/
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Xcode

## Build generated
.build
build/
DerivedData/

Expand Down Expand Up @@ -31,4 +32,7 @@ vendor/
timeline.xctimeline
playground.xcworkspace

# Bundler
# Fastlane
fastlane/report.xml
fastlane/test_output
fastlane/README.md
18 changes: 18 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Opt in to new cops by default
AllCops:
NewCops: enable

# Allow the Podspec filename to match the project
Naming/FileName:
Exclude:
- 'Gridicons.podspec'

# Override the maximum block length (some pods have long definitions)
Metrics/BlockLength:
Max: 256

# Override the maximum line length
Layout/LineLength:
Max: 160

require: rubocop-rake
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.5
2.6.4
14 changes: 10 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
source 'https://rubygems.org' do
gem 'rake', '~> 13'
gem 'cocoapods', '~> 1.8'
end
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'cocoapods', '~> 1.10'
gem 'cocoapods-check', '~> 1.1'
gem 'fastlane', '~> 2.189'
gem 'rake', '~> 13'
gem 'rubocop', '~> 1.18'
gem 'rubocop-rake', '~> 0.6.0'
Loading

0 comments on commit a37feb9

Please sign in to comment.