From 5fa9325358174cf0adcc71d24bff8fe2f4f36084 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 11 Aug 2021 15:38:42 -0600 Subject: [PATCH 01/19] Add Buildkite configuration --- .buildkite/.brewfile | 3 +++ .buildkite/pipeline.yml | 30 ++++++++++++++++++++++++++++++ .bundle/config | 1 + 3 files changed, 34 insertions(+) create mode 100644 .buildkite/.brewfile create mode 100644 .buildkite/pipeline.yml diff --git a/.buildkite/.brewfile b/.buildkite/.brewfile new file mode 100644 index 000000000..2b7d4c494 --- /dev/null +++ b/.buildkite/.brewfile @@ -0,0 +1,3 @@ +brew "pkg-config" +brew "libxml2" +brew "imagemagick@6" \ No newline at end of file diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 000000000..fefbd66c4 --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,30 @@ +# 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 + +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 "--- :rspec: Run Rspec" + bundle exec rspec --profile 10 \ + --format RspecJunitFormatter \ + --out test_results/rspec.xml \ + --format progress + env: *common_env + plugins: *common_plugins + agents: + queue: "mac" \ No newline at end of file diff --git a/.bundle/config b/.bundle/config index 5fc4c9f0e..6a495b222 100644 --- a/.bundle/config +++ b/.bundle/config @@ -1,3 +1,4 @@ --- +BUNDLE_PATH: "vendor/bundle" BUNDLE_SPECIFIC_PLATFORM: "false" BUNDLE_WITH: "test" From 196b7ca7fb1bea6087410541ce60a57952bac4f0 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Tue, 7 Sep 2021 21:15:02 -0600 Subject: [PATCH 02/19] Fix tests Use just the top-level rspec definition --- .buildkite/.brewfile | 3 --- .buildkite/brewfile | 4 ++++ .buildkite/pipeline.yml | 13 ++++++++----- .bundle/config | 1 - Gemfile | 9 +++------ Gemfile.lock | 6 ++++-- spec/spec_helper.rb | 1 + 7 files changed, 20 insertions(+), 17 deletions(-) delete mode 100644 .buildkite/.brewfile create mode 100644 .buildkite/brewfile diff --git a/.buildkite/.brewfile b/.buildkite/.brewfile deleted file mode 100644 index 2b7d4c494..000000000 --- a/.buildkite/.brewfile +++ /dev/null @@ -1,3 +0,0 @@ -brew "pkg-config" -brew "libxml2" -brew "imagemagick@6" \ No newline at end of file diff --git a/.buildkite/brewfile b/.buildkite/brewfile new file mode 100644 index 000000000..b81c12211 --- /dev/null +++ b/.buildkite/brewfile @@ -0,0 +1,4 @@ +brew "pkg-config" +brew "libxml2" +brew "imagemagick@6" +brew "git-lfs" \ No newline at end of file diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index fefbd66c4..106ed809c 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -14,16 +14,19 @@ steps: key: "test" command: | echo "--- :beer: Installing Dependencies" - brew bundle --file .buildkite/.brewfile + 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 RspecJunitFormatter \ - --out test_results/rspec.xml \ - --format progress + bundle exec rspec --profile 10 --format progress env: *common_env plugins: *common_plugins agents: diff --git a/.bundle/config b/.bundle/config index 6a495b222..724931e27 100644 --- a/.bundle/config +++ b/.bundle/config @@ -1,4 +1,3 @@ --- BUNDLE_PATH: "vendor/bundle" BUNDLE_SPECIFIC_PLATFORM: "false" -BUNDLE_WITH: "test" diff --git a/Gemfile b/Gemfile index 3e5adfe1a..1e50b65a5 100644 --- a/Gemfile +++ b/Gemfile @@ -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, group: :test +gem 'yard' plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock index c932c79b3..1b6321e6a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -414,7 +414,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) @@ -424,4 +426,4 @@ DEPENDENCIES yard BUNDLED WITH - 2.2.25 + 2.2.27 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a30e654b0..9fc311a64 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,6 +2,7 @@ require 'simplecov' require 'codecov' +require 'webmock/rspec' # SimpleCov.minimum_coverage 95 SimpleCov.start From 3ed083ed0f1ba3c90f2955a1af16edc32feda3d1 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Tue, 7 Sep 2021 21:25:34 -0600 Subject: [PATCH 03/19] Add Rubocop and address offenses --- .buildkite/pipeline.yml | 16 +++++++++++++++- .../android/android_download_file_by_version.rb | 2 +- .../actions/common/check_translation_progress.rb | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 106ed809c..1b1bf6554 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -30,4 +30,18 @@ steps: env: *common_env plugins: *common_plugins agents: - queue: "mac" \ No newline at end of file + 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" diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb index 301f427eb..967e42247 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb @@ -27,7 +27,7 @@ def self.description def self.details 'This action extracts the version of the library which is imported by the client app' \ - 'and downloads the request file from the relevant GitHub release' + 'and downloads the request file from the relevant GitHub release' end def self.available_options diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb index 07f260ee8..3e90a0c1d 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb @@ -98,7 +98,7 @@ def self.description def self.details 'This actions checks the current status of the translations on GlotPress ' \ - 'and raises an error if it\'s below the provided threshold' + 'and raises an error if it\'s below the provided threshold' end def self.available_options From 9093ea7e90e517ac7ca781f05d1c1808bd28bace Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Tue, 7 Sep 2021 21:47:51 -0600 Subject: [PATCH 04/19] Add release note --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e0384bd4..6e3c6e818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ _None_ ### Internal Changes -_None_ +Adopts Buildkite ## 1.4.0 From 1a04edf9b1f99b33ad50a62ec23baacbc14162b3 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 8 Sep 2021 12:42:24 -0600 Subject: [PATCH 05/19] Update CHANGELOG.md Co-authored-by: Olivier Halligon --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e3c6e818..6faad7515 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ _None_ ### Internal Changes -Adopts Buildkite +- Adopt Buildkite ## 1.4.0 From 504084bf4c814b693e10a0727251885f71c74207 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 8 Sep 2021 12:42:30 -0600 Subject: [PATCH 06/19] Update .buildkite/pipeline.yml Co-authored-by: Olivier Halligon --- .buildkite/pipeline.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 1b1bf6554..d69badaa1 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -2,7 +2,6 @@ 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 From 252291e7615ee5e49dcd6a3d44be42f97ae797ee Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 8 Sep 2021 12:42:34 -0600 Subject: [PATCH 07/19] Update Gemfile Co-authored-by: Olivier Halligon --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 1e50b65a5..8bc3507e5 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ gem 'danger', '~> 8.0' gem 'danger-rubocop', '~> 0.6' gem 'codecov', require: false -gem 'webmock', require: false, group: :test +gem 'webmock', require: false gem 'yard' plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') From 82a672b9742daf55f28db248f9d0560df4aac5eb Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 8 Sep 2021 12:59:58 -0600 Subject: [PATCH 08/19] Remove CircleCI --- .circleci/.brewfile | 3 -- .circleci/cache-version | 2 - .circleci/config.yml | 100 ---------------------------------------- 3 files changed, 105 deletions(-) delete mode 100644 .circleci/.brewfile delete mode 100644 .circleci/cache-version delete mode 100644 .circleci/config.yml diff --git a/.circleci/.brewfile b/.circleci/.brewfile deleted file mode 100644 index 5b7ff29d0..000000000 --- a/.circleci/.brewfile +++ /dev/null @@ -1,3 +0,0 @@ -pkg-config -libxml2 -imagemagick@6 \ No newline at end of file diff --git a/.circleci/cache-version b/.circleci/cache-version deleted file mode 100644 index fc10ecf80..000000000 --- a/.circleci/cache-version +++ /dev/null @@ -1,2 +0,0 @@ -# To invalidate the cache, generate a new UUID using `uuidgen` on the command line then paste it here -24D38297-3B05-4032-96E8-4D606515BAC1 \ No newline at end of file diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index d6d2f932c..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,100 +0,0 @@ -version: 2.1 - -orbs: - ios: wordpress-mobile/ios@1.0 - -# Common steps reused on various jobs -commands: - setup_tools: - description: "Install Homebrew and Ruby dependencies" - parameters: - skip_brew_install: - type: boolean - default: false - steps: - - restore_cache: - name: Restore Homebrew + Ruby Dependencies - keys: - - &cache_key brew-dependencies-{{ checksum ".circleci/cache-version" }}-{{ checksum ".circleci/.brewfile" }}-{{ checksum "Gemfile.lock" }} - - unless: - condition: <> - steps: - - run: - name: Install Homebrew dependencies, if neeeded - command: | - # Because the CircleCI image uses shallow clones, we need to unshallow them first. See https://bit.ly/3vx6EAL - git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow - git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow - brew update && xargs brew install --verbose < .circleci/.brewfile - - run: - name: Install Ruby dependencies, if neeeded - command: bundle check --path vendor/bundle || bundle install - - save_cache: - name: Cache Homebrew + Ruby Dependencies - key: *cache_key - paths: - - vendor/ - - /usr/local/Cellar - -jobs: - test: - executor: - name: ios/default - xcode-version: "11.2.1" - environment: - HOMEBREW_NO_AUTO_UPDATE: 1 - PKG_CONFIG_PATH: "/usr/local/opt/imagemagick@6/lib/pkgconfig" - steps: - - checkout - - setup_tools - - run: # Compile drawText - name: Compile drawText - command: bundle exec rake compile - - run: - name: Run rspec and upload coverage report - command: | - bundle exec rspec --profile 10 \ - --format RspecJunitFormatter \ - --out test_results/rspec.xml \ - --format progress \ - $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings) - # Save test results for timing analysis - - store_test_results: - path: test_results - - # Coverage reports are sent to Codecov as part of running `rspec`, not as a CircleCI step. - # We may wish to change this for consistency. - - gem-push: - executor: - name: ios/default - xcode-version: "11.2.1" # We need an Xcode-enabled CI image to build drawText during gem build - steps: - - checkout - - setup_tools: - skip_brew_install: true - - run: - name: Build gem - command: gem build fastlane-plugin-wpmreleasetoolkit.gemspec - - run: - name: Check the gem is installable - command: gem install --user-install fastlane-plugin-wpmreleasetoolkit-*.gem - - run: - name: Push to RubyGems - command: | - echo ":rubygems_api_key: ${GEM_HOST_API_KEY}" >>"$HOME/.gem/credentials" - chmod 600 "$HOME/.gem/credentials" - gem push fastlane-plugin-wpmreleasetoolkit-*.gem - -workflows: - test: - jobs: - - test - release: - jobs: - - gem-push: - filters: - tags: - only: /.*/ - branches: - ignore: /.*/ From 6a0e52b3884e49a72f6a3e01c0cabcb2721b0b91 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 8 Sep 2021 13:00:17 -0600 Subject: [PATCH 09/19] Remove GitHub Actions Danger --- .github/workflows/ci.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 1d9e3d7d9..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Danger -on: - pull_request: - types: [opened, reopened, synchronize] - -jobs: - danger: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 150 - - # This action reads the Ruby version from .ruby-version - - uses: ruby/setup-ruby@v1 - - - uses: actions/cache@v2 - with: - path: vendor/bundle - key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-gems- - - - name: Install Gems - run: | - bundle config path vendor/bundle - BUNDLE_WITHOUT=test bundle install --jobs 4 --retry 3 - - - name: Run Danger - run: bundle exec danger - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3f0d80c073c50340671be20a5eb7d7c295b1f15d Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 8 Sep 2021 13:00:25 -0600 Subject: [PATCH 10/19] Add Danger to Buildkite --- .buildkite/pipeline.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d69badaa1..3f4cd06d3 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -44,3 +44,14 @@ steps: plugins: *common_plugins agents: queue: "mac" + + ################# + # Danger + ################# + - label: "⛔️ Danger" + command: | + echo "--- :rubygems: Setting up Gems" + install_gems + + echo "--- :rubocop: Run Danger" + bundle exec danger From 233ac31a3f9e33d76e8b9394924f1e3ba137c38d Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 8 Sep 2021 13:03:58 -0600 Subject: [PATCH 11/19] Fix danger --- .buildkite/pipeline.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 3f4cd06d3..6eca90a2b 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -55,3 +55,7 @@ steps: echo "--- :rubocop: Run Danger" bundle exec danger + env: *common_env + plugins: *common_plugins + agents: + queue: "mac" From 8b45ff70218f3e947d649756cebd9e8f957a35bc Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Wed, 20 Oct 2021 16:48:30 +0200 Subject: [PATCH 12/19] Add gem-push step to Buildkite config cc @jkmassel --- .buildkite/pipeline.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6eca90a2b..21efde848 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -30,6 +30,7 @@ steps: plugins: *common_plugins agents: queue: "mac" + ################# # Lint ################# @@ -59,3 +60,31 @@ steps: plugins: *common_plugins agents: queue: "mac" + + ################# + # Push to RubyGems + ################# + - label: ":rubygems: Publish to RubyGems" + key: "gem-push" + if: build.tag != null + command: | + 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}" >>"$HOME/.gem/credentials" + chmod 600 "$HOME/.gem/credentials" + gem push fastlane-plugin-wpmreleasetoolkit-*.gem + env: *common_env + plugins: *common_plugins + agents: + queue: "mac" From 62de49c341389f960cf7ed36b976671a49f47f92 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Wed, 20 Oct 2021 18:45:09 +0200 Subject: [PATCH 13/19] Fix missing .gem dir to setup credentials file --- .buildkite/pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 21efde848..40d8fc28b 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -81,6 +81,7 @@ steps: gem install --user-install fastlane-plugin-wpmreleasetoolkit-*.gem echo "--- :rubygems: Gem Push" + mkdir -p "$HOME/.gem" echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" >>"$HOME/.gem/credentials" chmod 600 "$HOME/.gem/credentials" gem push fastlane-plugin-wpmreleasetoolkit-*.gem From c6731f249257dbe12b215fb96f1d265384415363 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Wed, 20 Oct 2021 19:56:38 +0200 Subject: [PATCH 14/19] Move gem-push to sh file + use custom config file As we apparently don't have the permissions to write in $HOME to use the default $HOME/.gem/credentials file --- .buildkite/gem-push.sh | 18 ++++++++++++++++++ .buildkite/pipeline.yml | 19 +------------------ 2 files changed, 19 insertions(+), 18 deletions(-) create mode 100755 .buildkite/gem-push.sh diff --git a/.buildkite/gem-push.sh b/.buildkite/gem-push.sh new file mode 100755 index 000000000..1dda0f84c --- /dev/null +++ b/.buildkite/gem-push.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +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 diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 40d8fc28b..cb9e93ecc 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -67,24 +67,7 @@ steps: - label: ":rubygems: Publish to RubyGems" key: "gem-push" if: build.tag != null - command: | - 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" - mkdir -p "$HOME/.gem" - echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" >>"$HOME/.gem/credentials" - chmod 600 "$HOME/.gem/credentials" - gem push fastlane-plugin-wpmreleasetoolkit-*.gem + command: .buildkite/gem-push.sh env: *common_env plugins: *common_plugins agents: From 4f86bece4ca3387fb0e256c09d465ee0d8c3960c Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Wed, 20 Oct 2021 19:57:42 +0200 Subject: [PATCH 15/19] =?UTF-8?q?=F0=9F=9A=A7=20TO=20REVERT:=20Temporarily?= =?UTF-8?q?=20enable=20gem=20push=20on=20every=20commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test that credentials work, even if the push will fail because 2.0.0 is already published. --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index cb9e93ecc..4f3de811a 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -66,7 +66,7 @@ steps: ################# - label: ":rubygems: Publish to RubyGems" key: "gem-push" - if: build.tag != null + # if: build.tag != null command: .buildkite/gem-push.sh env: *common_env plugins: *common_plugins From ac143b1965a5e4906cb9ed516b27309e934c8f04 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Wed, 20 Oct 2021 20:06:32 +0200 Subject: [PATCH 16/19] =?UTF-8?q?Revert=20"=F0=9F=9A=A7=20TO=20REVERT:=20T?= =?UTF-8?q?emporarily=20enable=20gem=20push=20on=20every=20commit"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 4f86bece4ca3387fb0e256c09d465ee0d8c3960c. --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 4f3de811a..cb9e93ecc 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -66,7 +66,7 @@ steps: ################# - label: ":rubygems: Publish to RubyGems" key: "gem-push" - # if: build.tag != null + if: build.tag != null command: .buildkite/gem-push.sh env: *common_env plugins: *common_plugins From 18e6f6e8be5f9e305a1626d5106a87ac1bc913c4 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Fri, 22 Oct 2021 11:36:56 +0200 Subject: [PATCH 17/19] Update .buildkite/pipeline.yml Co-authored-by: Gio Lodi --- .buildkite/pipeline.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index cb9e93ecc..42b75e3c4 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -67,6 +67,9 @@ steps: - 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 From 6a1631416397a952bd46d410207993193552f717 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Fri, 22 Oct 2021 11:54:12 +0200 Subject: [PATCH 18/19] Update .buildkite/gem-push.sh Co-authored-by: Gio Lodi --- .buildkite/gem-push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/gem-push.sh b/.buildkite/gem-push.sh index 1dda0f84c..44999de32 100755 --- a/.buildkite/gem-push.sh +++ b/.buildkite/gem-push.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash -eu echo "--- :beer: Installing Dependencies" brew bundle --file .buildkite/brewfile From 9c66e5a20fa34c120ee8fb95c35b95c2a7d1cd73 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Fri, 22 Oct 2021 13:57:51 +0200 Subject: [PATCH 19/19] Better wording for CHANGELOG entry Co-authored-by: Gio Lodi --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6faad7515..e1b4568b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ _None_ ### Internal Changes -- Adopt Buildkite +- Replace CircleCI and GitHub Actions with Buildkite ## 1.4.0