Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra] Removing 'release.yml' special casing in 'scripts/release_testing_setup.sh' #13447

Merged
merged 4 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,29 @@ jobs:
runs-on: macos-14
env:
bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# The SDK repo will be cloned to this dir and podspecs from
# 'podspec_repo_branch' of this repo will be validated and pushed to the
# testing repo.
local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
local_repo: specsreleasing
podspec_repo_branch: main
outputs:
matrix: ${{ steps.generate_matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate matrix
id: generate_matrix
run: |
cd "${GITHUB_WORKSPACE}/ReleaseTooling"
swift run manifest --sdk-repo-url "${GITHUB_WORKSPACE}" --output-file-path ./output.json --for-gha-matrix-generation
echo "::set-output name=matrix::{\"include\":$( cat output.json )}"
- name: Update SpecsReleasing repo setup
run: |
podspec_repo_branch="${podspec_repo_branch}" \
scripts/release_testing_setup.sh release_testing
- name: Get token
run: |
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/release-testing-token.txt.gpg \
bot-access.txt "$bot_token_secret"
- name: Update SpecsReleasing repo setup
run: |
botaccess=`cat bot-access.txt`
BOT_TOKEN="${botaccess}" test_version="${nightly_version}" \
sdk_version_config="${GITHUB_WORKSPACE}/scripts/create_spec_repo/RC_firebase_sdk.textproto" \
local_sdk_repo_dir="${local_sdk_repo_dir}" \
podspec_repo_branch="${podspec_repo_branch}" \
scripts/release_testing_setup.sh release_testing
- name: Clean spec repo
run: |
botaccess=`cat bot-access.txt`
Expand All @@ -70,8 +64,9 @@ jobs:
with:
name: firebase-ios-sdk
path: |
${{ env.local_sdk_repo_dir }}/*.podspec
${{ env.local_sdk_repo_dir }}/*.podspec.json
*.podspec
*.podspec.json

buildup_SpecsReleasing_repo_FirebaseCore:
needs: specs_checking
# Don't run on private repo unless it is a PR.
Expand Down
16 changes: 3 additions & 13 deletions scripts/release_testing_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# This script will `git clone` the SDK repo to local and look for the latest
# release branch
# Note: This script uses the currently checked out repo.
set -xe

TESTINGMODE=${1-}
Expand All @@ -22,17 +21,8 @@ if [ -f "${HOME}/.cocoapods/repos" ]; then
find "${HOME}/.cocoapods/repos" -type d -maxdepth 1 -exec sh -c 'pod repo remove $(basename {})' \;
fi

if [ "$TESTINGMODE" = "release_testing" ]; then
mkdir -p "${local_sdk_repo_dir}"
echo "git clone from github.com/firebase/firebase-ios-sdk.git to ${local_sdk_repo_dir}"
set +x
# Using token here to update tags later.
git clone -q https://"${BOT_TOKEN}"@github.com/firebase/firebase-ios-sdk.git "${local_sdk_repo_dir}"
set -x
cd "${local_sdk_repo_dir}"
elif [ "$TESTINGMODE" = "prerelease_testing" ]; then
git fetch --tags --quiet origin main
fi
git fetch --tags --quiet origin main
git checkout main

# The chunk below is to determine the latest version by searching
# Get the latest released tag Cocoapods-X.Y.Z for release and prerelease testing, beta version will be excluded.
Expand Down
Loading