diff --git a/.buildkite/commands/configure-for-release.sh b/.buildkite/commands/configure-for-release.sh new file mode 100755 index 000000000..61fc4ee74 --- /dev/null +++ b/.buildkite/commands/configure-for-release.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then + echo "This script must be 'source'd (instead of being called directly as an executable) to work properly" + exit 1 +fi + +# Note: Set the flags separately (instead of via the shebang), because that script will be `source`'d and not run directly +set -e +set -u + +# The Git command line client is not configured in Buildkite. +# At the moment, steps that need Git access can configure it on demand using this script. +# Later on, we should be able to configure it on the agent instead. +git config --global user.email "mobile+wpmobilebot@automattic.com" +git config --global user.name "Automattic Release Bot" + +echo '--- :robot_face: Use bot for git operations' +source use-bot-for-git diff --git a/.buildkite/commands/configure-git-for-release-management.sh b/.buildkite/commands/configure-git-for-release-management.sh deleted file mode 100755 index 6aeae2b3b..000000000 --- a/.buildkite/commands/configure-git-for-release-management.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -eu - -# The Git command line client is not configured in Buildkite. -# At the moment, steps that need Git access can configure it on deman using this script. -# Later on, we should be able to configure it on the agent instead. -add_host_to_ssh_known_hosts github.com -git config --global user.email "mobile+wpmobilebot@automattic.com" -git config --global user.name "Automattic Release Bot" diff --git a/.buildkite/release-pipelines/complete-code-freeze.yml b/.buildkite/release-pipelines/complete-code-freeze.yml index 4a5990cf1..18be74c0c 100644 --- a/.buildkite/release-pipelines/complete-code-freeze.yml +++ b/.buildkite/release-pipelines/complete-code-freeze.yml @@ -16,7 +16,7 @@ steps: plugins: [$CI_TOOLKIT_PLUGIN] command: | echo '--- :git: Configure Git for Release Management' - .buildkite/commands/configure-git-for-release-management.sh + source .buildkite/commands/configure-for-release.sh echo '--- :git: Checkout release branch' .buildkite/commands/checkout-release-branch.sh diff --git a/.buildkite/release-pipelines/new-beta-release.yml b/.buildkite/release-pipelines/new-beta-release.yml index b4c37a32b..49c98df79 100644 --- a/.buildkite/release-pipelines/new-beta-release.yml +++ b/.buildkite/release-pipelines/new-beta-release.yml @@ -1,8 +1,7 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json --- -agents: - queue: mac +# Variables used in this pipeline are defined in `shared-pipeline-vars`, which is `source`'d before calling `buildkite-agent pipeline upload` # The new beta workflow needs to run on macOS because it uses SwiftGen under the hood. # @@ -11,12 +10,15 @@ agents: env: IMAGE_ID: $IMAGE_ID +agents: + queue: mac + steps: - label: New Beta Release plugins: [$CI_TOOLKIT_PLUGIN] command: | echo '--- :git: Configure Git for Release Management' - .buildkite/commands/configure-git-for-release-management.sh + source .buildkite/commands/configure-for-release.sh echo '--- :git: Checkout Release Branch' .buildkite/commands/checkout-release-branch.sh diff --git a/.buildkite/release-pipelines/start-code-freeze.yml b/.buildkite/release-pipelines/start-code-freeze.yml index 49fabdaf4..baa9e6231 100644 --- a/.buildkite/release-pipelines/start-code-freeze.yml +++ b/.buildkite/release-pipelines/start-code-freeze.yml @@ -3,15 +3,19 @@ # Variables used in this pipeline are defined in `shared-pipeline-vars`, which is `source`'d before calling `buildkite-agent pipeline upload` +env: + IMAGE_ID: $IMAGE_ID + +agents: + queue: mac + steps: - label: Start Code Freeze plugins: - $CI_TOOLKIT_PLUGIN - agents: - queue: tumblr-metal command: | - echo '--- :robot_face: Use bot for Git operations' - source use-bot-for-git wpmobilebot + echo '--- :git: Configure Git for Release Management' + source .buildkite/commands/configure-for-release.sh echo '--- :ruby: Setup Ruby Tools' install_gems diff --git a/.xcode-version b/.xcode-version index 232a7fc1a..5cc8594da 100644 --- a/.xcode-version +++ b/.xcode-version @@ -1 +1 @@ -15.4 +16.1-rc.1