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] Migrate release.yml to use Firebase/SpecsReleasing repo #13213

Merged
merged 5 commits into from
Jul 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
52 changes: 26 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# '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: specstesting
local_repo: specsreleasing
podspec_repo_branch: main
outputs:
matrix: ${{ steps.generate_matrix.outputs.matrix }}
Expand All @@ -43,7 +43,7 @@ jobs:
run: |
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/release-testing-token.txt.gpg \
bot-access.txt "$bot_token_secret"
- name: Update SpecsTesting repo setup
- name: Update SpecsReleasing repo setup
run: |
botaccess=`cat bot-access.txt`
BOT_TOKEN="${botaccess}" test_version="${nightly_version}" \
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Clean spec repo
run: |
botaccess=`cat bot-access.txt`
git clone --quiet https://"$botaccess"@github.com/FirebasePrivate/SpecsTesting.git "${local_repo}"
git clone --quiet https://"$botaccess"@github.com/Firebase/SpecsReleasing.git "${local_repo}"
cd "${local_repo}"
# Remove all unhidden dirs, i.e. all podspec dir from the spec repo.
rm -Rf -- */
Expand All @@ -72,14 +72,14 @@ jobs:
path: |
${{ env.local_sdk_repo_dir }}/*.podspec
${{ env.local_sdk_repo_dir }}/*.podspec.json
buildup_SpecsTesting_repo_FirebaseCore:
buildup_SpecsReleasing_repo_FirebaseCore:
needs: specs_checking
# Don't run on private repo unless it is a PR.
if: github.repository == 'Firebase/firebase-ios-sdk'
runs-on: macos-14
env:
bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
local_repo: specstesting
local_repo: specsreleasing
local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
targeted_pod: FirebaseCore
steps:
Expand All @@ -92,25 +92,25 @@ jobs:
run: |
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/release-testing-token.txt.gpg \
bot-access.txt "$bot_token_secret"
- name: Update SpecsTesting repo
- name: Update SpecsReleasing repo
run: |
botaccess=`cat bot-access.txt`
cd scripts/create_spec_repo/
swift build
pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/FirebasePrivate/SpecsTesting.git
pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsReleasing.git
BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \
--sdk-repo "${local_sdk_repo_dir}" \
--local-spec-repo-name "${local_repo}" \
--pod-sources 'https://${BOT_TOKEN}@github.com/FirebasePrivate/SpecsTesting' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \
--pod-sources 'https://github.com/Firebase/SpecsReleasing' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \
--include-pods "${targeted_pod}" --keep-repo
- name: Clean Artifacts
if: ${{ always() }}
run: |
pod repo remove "${local_repo}"
rm -rf bot-access.txt
buildup_SpecsTesting_repo:
needs: [buildup_SpecsTesting_repo_FirebaseCore, specs_checking]
buildup_SpecsReleasing_repo:
needs: [buildup_SpecsReleasing_repo_FirebaseCore, specs_checking]
# Don't run on private repo unless it is a PR.
if: github.repository == 'Firebase/firebase-ios-sdk'
runs-on: macos-14
Expand All @@ -119,7 +119,7 @@ jobs:
matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}}
env:
bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
local_repo: specstesting
local_repo: specsreleasing
local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
targeted_pod: ${{ matrix.podspec }}
steps:
Expand All @@ -132,19 +132,19 @@ jobs:
run: |
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/release-testing-token.txt.gpg \
bot-access.txt "$bot_token_secret"
- name: Update SpecsTesting repo
- name: Update SpecsReleasing repo
run: |
[[ ${{ matrix.allowwarnings }} == true ]] && ALLOWWARNINGS=true
botaccess=`cat bot-access.txt`
cd scripts/create_spec_repo/
swift build
pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/FirebasePrivate/SpecsTesting.git
pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsReleasing.git
# ${ALLOWWARNINGS:+--allow-warnings} will add --allow-warnings to the
# command if ${ALLOWWARNINGS} is not null.
BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \
--sdk-repo "${local_sdk_repo_dir}" \
--local-spec-repo-name "${local_repo}" \
--pod-sources 'https://${BOT_TOKEN}@github.com/FirebasePrivate/SpecsTesting' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \
--pod-sources 'https://github.com/Firebase/SpecsReleasing' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \
--include-pods "${targeted_pod}" \
--keep-repo ${ALLOWWARNINGS:+--allow-warnings}
- name: Clean Artifacts
Expand All @@ -156,7 +156,7 @@ jobs:
abtesting_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
auth_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
crashlytics_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:
database_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -315,7 +315,7 @@ jobs:
dynamiclinks_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -358,7 +358,7 @@ jobs:
firestore_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -395,7 +395,7 @@ jobs:
# functions_quickstart:
# # Don't run on private repo unless it is a PR.
# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
# needs: buildup_SpecsTesting_repo
# needs: buildup_SpecsReleasing_repo
# env:
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -437,7 +437,7 @@ jobs:
inappmessaging_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -476,7 +476,7 @@ jobs:
messaging_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -515,7 +515,7 @@ jobs:
remoteconfig_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -548,7 +548,7 @@ jobs:
storage_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down Expand Up @@ -586,7 +586,7 @@ jobs:
performance_quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: buildup_SpecsTesting_repo
needs: buildup_SpecsReleasing_repo
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ struct SpecRepoBuilder: ParsableCommand {
var excludePods: [String] = []

@Option(help: "GitHub Account Name.")
var githubAccount: String = "FirebasePrivate"
var githubAccount: String = "Firebase"

@Option(help: "GitHub Repo Name.")
var sdkRepoName: String = "SpecsTesting"
Expand Down
Binary file modified scripts/gha-encrypted/release-testing-token.txt.gpg
Binary file not shown.
4 changes: 0 additions & 4 deletions scripts/remove_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,4 @@ if [[ ! -z "$LEGACY" ]]; then
DIR="${SDK}/Legacy${SDK}Quickstart"
fi

# By default, remove potential secrets used in specs repo URLs.
sed -i "" "s/https:\/\/.*@github.com\/FirebasePrivate\/SpecsTesting.git/https:\/\/github.com\/FirebasePrivate\/SpecsTesting.git/g" quickstart-ios/"${DIR}"/Podfile quickstart-ios/"${DIR}"/Podfile.lock
sed -i "" "s/https:\/\/.*@github.com\/FirebasePrivate\/SpecsReleasing.git/https:\/\/github.com\/FirebasePrivate\/SpecsReleasing.git/g" quickstart-ios/"${DIR}"/Podfile quickstart-ios/"${DIR}"/Podfile.lock

ncooke3 marked this conversation as resolved.
Show resolved Hide resolved
rm -f quickstart-ios/"${DIR}"/GoogleService-Info.plist
2 changes: 1 addition & 1 deletion scripts/setup_quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if check_secrets || [[ ${SAMPLE} == "installations" ]]; then
$scripts_dir/localize_podfile.swift "$WORKSPACE_DIR"/Podfile "$RELEASE_TESTING"
if [ "$RELEASE_TESTING" == "nightly_release_testing" ]; then
set +x
sed -i "" '1i\'$'\n'"source 'https://${BOT_TOKEN}@github.com/FirebasePrivate/SpecsTesting.git'"$'\n' "$PODFILE"
sed -i "" '1i\'$'\n'"source 'https://github.com/Firebase/SpecsReleasing.git'"$'\n' "$PODFILE"
set -x
echo "Source of Podfile for nightly release testing is updated."
fi
Expand Down
Loading