Skip to content

Commit a37feb9

Browse files
authored
Merge pull request #63 from Automattic/add/buildkite
Add Buildkite
2 parents 13a1944 + ee05da6 commit a37feb9

File tree

11 files changed

+406
-84
lines changed

11 files changed

+406
-84
lines changed

.buildkite/pipeline.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Nodes with values to reuse in the pipeline.
2+
common_params:
3+
plugins: &common_plugins
4+
- &bash_cache automattic/bash-cache#v1.3.2: ~
5+
# Common environment values to use with the `env` key.
6+
env: &common_env
7+
IMAGE_ID: xcode-12.5.1
8+
9+
# This is the default pipeline – it will build and test the app
10+
steps:
11+
#################
12+
# Build and Test
13+
#################
14+
- label: "🧪 Build and Test"
15+
key: "test"
16+
command: "build_and_test_pod"
17+
env: *common_env
18+
plugins: *common_plugins
19+
20+
#################
21+
# Validate Podspec
22+
#################
23+
- label: "🔬 Validating Podspec"
24+
key: "validate"
25+
command: "validate_podspec"
26+
env: *common_env
27+
plugins: *common_plugins
28+
29+
#################
30+
# Lint
31+
#################
32+
- label: "🧹 Lint"
33+
key: "lint"
34+
command: "lint_pod"
35+
env: *common_env
36+
plugins: *common_plugins
37+
38+
#################
39+
# Publish the Podspec (if we're building a tag)
40+
#################
41+
- label: "⬆️ Publish Podspec"
42+
key: "publish"
43+
command: .buildkite/publish-pod.sh
44+
env: *common_env
45+
plugins: *common_plugins
46+
depends_on:
47+
- "test"
48+
- "validate"
49+
- "lint"
50+
if: build.tag != null
51+
agents:
52+
queue: "mac"

.buildkite/publish-pod.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash -eu
2+
3+
PODSPEC_PATH="Gridicons.podspec"
4+
SLACK_WEBHOOK=$PODS_SLACK_WEBHOOK
5+
6+
echo "--- :rubygems: Setting up Gems"
7+
install_gems
8+
9+
echo "--- :cocoapods: Publishing Pod to CocoaPods CDN"
10+
publish_pod $PODSPEC_PATH
11+
12+
echo "--- :slack: Notifying Slack"
13+
slack_notify_pod_published $PODSPEC_PATH $SLACK_WEBHOOK

.circleci/config.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,3 @@ workflows:
2121
xcode-version: "11.2.1"
2222
podspec-path: Gridicons.podspec
2323
bundle-install: true
24-
- ios/publish-podspec:
25-
name: Publish to Trunk
26-
xcode-version: "11.2.1"
27-
podspec-path: Gridicons.podspec
28-
bundle-install: true
29-
post-to-slack: true
30-
filters:
31-
tags:
32-
only: /.*/
33-
branches:
34-
ignore: /.*/

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Xcode
44

55
## Build generated
6+
.build
67
build/
78
DerivedData/
89

@@ -31,4 +32,7 @@ vendor/
3132
timeline.xctimeline
3233
playground.xcworkspace
3334

34-
# Bundler
35+
# Fastlane
36+
fastlane/report.xml
37+
fastlane/test_output
38+
fastlane/README.md

.rubocop.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Opt in to new cops by default
2+
AllCops:
3+
NewCops: enable
4+
5+
# Allow the Podspec filename to match the project
6+
Naming/FileName:
7+
Exclude:
8+
- 'Gridicons.podspec'
9+
10+
# Override the maximum block length (some pods have long definitions)
11+
Metrics/BlockLength:
12+
Max: 256
13+
14+
# Override the maximum line length
15+
Layout/LineLength:
16+
Max: 160
17+
18+
require: rubocop-rake

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.5.5
1+
2.6.4

Gemfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
source 'https://rubygems.org' do
2-
gem 'rake', '~> 13'
3-
gem 'cocoapods', '~> 1.8'
4-
end
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
gem 'cocoapods', '~> 1.10'
6+
gem 'cocoapods-check', '~> 1.1'
7+
gem 'fastlane', '~> 2.189'
8+
gem 'rake', '~> 13'
9+
gem 'rubocop', '~> 1.18'
10+
gem 'rubocop-rake', '~> 0.6.0'

0 commit comments

Comments
 (0)