From ee05da66d7b9277c35fabdf1f33b0013a77ffcba Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Tue, 10 Aug 2021 17:31:59 -0600 Subject: [PATCH] Add Buildkite Fix Podspec Path --- .buildkite/pipeline.yml | 52 +++++++++++++++++++++++++++++++++++++++ .buildkite/publish-pod.sh | 13 ++++++++++ .circleci/config.yml | 11 --------- .gitignore | 6 ++++- fastlane/Fastfile | 17 +++++++++++++ 5 files changed, 87 insertions(+), 12 deletions(-) create mode 100644 .buildkite/pipeline.yml create mode 100644 .buildkite/publish-pod.sh create mode 100644 fastlane/Fastfile diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 0000000..f3a7495 --- /dev/null +++ b/.buildkite/pipeline.yml @@ -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" diff --git a/.buildkite/publish-pod.sh b/.buildkite/publish-pod.sh new file mode 100644 index 0000000..e0722fc --- /dev/null +++ b/.buildkite/publish-pod.sh @@ -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 diff --git a/.circleci/config.yml b/.circleci/config.yml index 25f6c31..9d3de3a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: /.*/ diff --git a/.gitignore b/.gitignore index f7439df..ef3680a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # Xcode ## Build generated +.build build/ DerivedData/ @@ -31,4 +32,7 @@ vendor/ timeline.xctimeline playground.xcworkspace -# Bundler +# Fastlane +fastlane/report.xml +fastlane/test_output +fastlane/README.md diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 0000000..4800ddc --- /dev/null +++ b/fastlane/Fastfile @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +default_platform(:ios) + +platform :ios do + desc 'Builds the project and runs tests' + lane :test do + run_tests( + scheme: 'Gridicons', + devices: ['iPhone 11'], + deployment_target_version: '14.5', + prelaunch_simulator: true, + buildlog_path: File.join(__dir__, '.build', 'logs'), + derived_data_path: File.join(__dir__, '.build', 'derived-data') + ) + end +end