From b6cd7dbdadcad09831345179458fcd540bb897db Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Thu, 22 Feb 2024 23:48:58 +0100 Subject: [PATCH] Switch to test environment --- .github/workflows/build_notarized.yml | 28 ++++++++++---------- .github/workflows/bump_internal_release.yml | 8 +++--- .github/workflows/create_variants.yml | 8 +++--- .github/workflows/publish_dmg_release.yml | 12 ++++----- .github/workflows/release.yml | 8 +++--- .github/workflows/tag_release.yml | 2 +- scripts/appcast_manager/appcastManager.swift | 2 +- scripts/upload_to_s3/upload_to_s3.sh | 4 +-- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build_notarized.yml b/.github/workflows/build_notarized.yml index 8144e8517c..6a62579e29 100644 --- a/.github/workflows/build_notarized.yml +++ b/.github/workflows/build_notarized.yml @@ -79,13 +79,13 @@ on: required: true MM_WEBHOOK_URL: required: true - AWS_ACCESS_KEY_ID: + TEST_AWS_ACCESS_KEY_ID: required: true - AWS_ACCESS_KEY_ID_RELEASE_S3: + TEST_AWS_ACCESS_KEY_ID_RELEASE_S3: required: true - AWS_SECRET_ACCESS_KEY: + TEST_AWS_SECRET_ACCESS_KEY: required: true - AWS_SECRET_ACCESS_KEY_RELEASE_S3: + TEST_AWS_SECRET_ACCESS_KEY_RELEASE_S3: required: true jobs: @@ -202,10 +202,10 @@ jobs: id: upload-dsyms-to-s3 if: ${{ env.upload-to == 's3' }} env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} - DSYM_S3_PATH: s3://${{ vars.DSYM_BUCKET_NAME }}/${{ vars.DSYM_BUCKET_PREFIX }}/${{ steps.set-outputs.outputs.dsym-name }} + AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: ${{ vars.TEST_AWS_DEFAULT_REGION }} + DSYM_S3_PATH: s3://${{ vars.TEST_DSYM_BUCKET_NAME }}/${{ vars.TEST_DSYM_BUCKET_PREFIX }}/${{ steps.set-outputs.outputs.dsym-name }} run: | echo "dsym-s3-path=${DSYM_S3_PATH}" >> $GITHUB_OUTPUT aws s3 cp ${{ github.workspace }}/release/${{ steps.set-outputs.outputs.dsym-name }} ${{ env.DSYM_S3_PATH }} @@ -288,11 +288,11 @@ jobs: - name: Upload DMG to S3 if: ${{ env.upload-to == 's3' }} env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_RELEASE_S3 }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} - AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} - RELEASE_BUCKET_NAME: ${{ vars.RELEASE_BUCKET_NAME }} - RELEASE_BUCKET_PREFIX: ${{ vars.RELEASE_BUCKET_PREFIX }} + AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID_RELEASE_S3 }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} + AWS_DEFAULT_REGION: ${{ vars.TEST_AWS_DEFAULT_REGION }} + RELEASE_BUCKET_NAME: ${{ vars.TEST_RELEASE_BUCKET_NAME }} + RELEASE_BUCKET_PREFIX: ${{ vars.TEST_RELEASE_BUCKET_PREFIX }} run: | aws s3 cp \ ${{ github.workspace }}/${{ steps.create-dmg.outputs.dmg }} \ @@ -303,7 +303,7 @@ jobs: if: ${{ env.upload-to == 's3' }} uses: ./.github/actions/asana-log-message env: - DMG_URL: ${{ vars.DMG_URL_ROOT }}${{ steps.create-dmg.outputs.dmg }} + DMG_URL: ${{ vars.TEST_DMG_URL_ROOT }}${{ steps.create-dmg.outputs.dmg }} TAG: ${{ env.app-version }} WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} with: diff --git a/.github/workflows/bump_internal_release.yml b/.github/workflows/bump_internal_release.yml index a8ae8b0fd8..267fcce6ad 100644 --- a/.github/workflows/bump_internal_release.yml +++ b/.github/workflows/bump_internal_release.yml @@ -104,10 +104,10 @@ jobs: ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} MM_HANDLES_BASE64: ${{ secrets.MM_HANDLES_BASE64 }} MM_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_ACCESS_KEY_ID_RELEASE_S3: ${{ secrets.AWS_ACCESS_KEY_ID_RELEASE_S3 }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_SECRET_ACCESS_KEY_RELEASE_S3: ${{ secrets.AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} + TEST_AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }} + TEST_AWS_ACCESS_KEY_ID_RELEASE_S3: ${{ secrets.TEST_AWS_ACCESS_KEY_ID_RELEASE_S3 }} + TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }} + TEST_AWS_SECRET_ACCESS_KEY_RELEASE_S3: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} SSH_PRIVATE_KEY_FASTLANE_MATCH: ${{ secrets.SSH_PRIVATE_KEY_FASTLANE_MATCH }} diff --git a/.github/workflows/create_variants.yml b/.github/workflows/create_variants.yml index 2ec2ebbc33..1fbdb638cf 100644 --- a/.github/workflows/create_variants.yml +++ b/.github/workflows/create_variants.yml @@ -134,12 +134,12 @@ jobs: - name: Upload variant DMG env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_RELEASE_S3 }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} - AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} + AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID_RELEASE_S3 }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} + AWS_DEFAULT_REGION: ${{ vars.TEST_AWS_DEFAULT_REGION }} run: | aws s3 cp duckduckgo.dmg \ - s3://${{ vars.RELEASE_BUCKET_NAME }}/${{ vars.RELEASE_BUCKET_PREFIX }}/${{ matrix.variant }}/duckduckgo.dmg \ + s3://${{ vars.TEST_RELEASE_BUCKET_NAME }}/${{ vars.TEST_RELEASE_BUCKET_PREFIX }}/${{ matrix.variant }}/duckduckgo.dmg \ --acl public-read mattermost: diff --git a/.github/workflows/publish_dmg_release.yml b/.github/workflows/publish_dmg_release.yml index b749d30a68..124e88f78f 100644 --- a/.github/workflows/publish_dmg_release.yml +++ b/.github/workflows/publish_dmg_release.yml @@ -166,16 +166,16 @@ jobs: - name: Upload to S3 id: upload env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_RELEASE_S3 }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} - AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} + AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID_RELEASE_S3 }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} + AWS_DEFAULT_REGION: ${{ vars.TEST_AWS_DEFAULT_REGION }} RELEASE_TYPE: ${{ github.event.inputs.release-type }} VERSION: ${{ steps.verify-tag.outputs.release-version }} run: | # Back up existing appcast2.xml OLD_APPCAST_NAME=appcast2_old.xml echo "OLD_APPCAST_NAME=${OLD_APPCAST_NAME}" >> $GITHUB_ENV - curl -fLSs "${{ vars.DMG_URL_ROOT }}appcast2.xml" --output "${OLD_APPCAST_NAME}" + curl -fLSs "${{ vars.TEST_DMG_URL_ROOT }}appcast2.xml" --output "${OLD_APPCAST_NAME}" # Upload files to S3 if [[ "${RELEASE_TYPE}" == "internal" ]]; then @@ -198,8 +198,8 @@ jobs: echo "APPCAST_PATCH_NAME=${{ steps.appcast.outputs.appcast-patch-name }}" >> $GITHUB_ENV echo "DMG_NAME=${DMG_NAME}" >> $GITHUB_ENV echo "DMG_URL=${{ vars.DMG_URL_ROOT }}${DMG_NAME}" >> $GITHUB_ENV - echo "RELEASE_BUCKET_NAME=${{ vars.RELEASE_BUCKET_NAME }}" >> $GITHUB_ENV - echo "RELEASE_BUCKET_PREFIX=${{ vars.RELEASE_BUCKET_PREFIX }}" >> $GITHUB_ENV + echo "RELEASE_BUCKET_NAME=${{ vars.TEST_RELEASE_BUCKET_NAME }}" >> $GITHUB_ENV + echo "RELEASE_BUCKET_PREFIX=${{ vars.TEST_RELEASE_BUCKET_PREFIX }}" >> $GITHUB_ENV echo "RELEASE_TASK_ID=${{ steps.task-id.outputs.task-id }}" >> $GITHUB_ENV echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV echo "VERSION=${{ steps.verify-tag.outputs.release-version }}" >> $GITHUB_ENV diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e2e3f75e4..245c8fc720 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,7 +99,7 @@ jobs: ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} MM_HANDLES_BASE64: ${{ secrets.MM_HANDLES_BASE64 }} MM_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_ACCESS_KEY_ID_RELEASE_S3: ${{ secrets.AWS_ACCESS_KEY_ID_RELEASE_S3 }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_SECRET_ACCESS_KEY_RELEASE_S3: ${{ secrets.AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} + TEST_AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }} + TEST_AWS_ACCESS_KEY_ID_RELEASE_S3: ${{ secrets.TEST_AWS_ACCESS_KEY_ID_RELEASE_S3 }} + TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }} + TEST_AWS_SECRET_ACCESS_KEY_RELEASE_S3: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} diff --git a/.github/workflows/tag_release.yml b/.github/workflows/tag_release.yml index 027a1ce44a..8abc0fb7df 100644 --- a/.github/workflows/tag_release.yml +++ b/.github/workflows/tag_release.yml @@ -124,7 +124,7 @@ jobs: echo "TAG=$TAG" >> $GITHUB_ENV fi echo "WORKFLOW_URL=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV - echo "DMG_URL=${{ vars.DMG_URL_ROOT }}duckduckgo-${TAG//-/.}.dmg" >> $GITHUB_ENV + echo "DMG_URL=${{ vars.TEST_DMG_URL_ROOT }}duckduckgo-${TAG//-/.}.dmg" >> $GITHUB_ENV echo "RELEASE_URL=https://github.com/${{ github.repository }}/releases/tag/${{ steps.create-tag.outputs.tag }}" >> $GITHUB_ENV if [[ ${{ steps.create-tag.outputs.tag-created }} == "false" ]]; then last_release_tag=$(gh api /repos/${{ github.repository }}/releases/latest --jq '.tag_name') diff --git a/scripts/appcast_manager/appcastManager.swift b/scripts/appcast_manager/appcastManager.swift index c3906a3cae..488e9d1c26 100755 --- a/scripts/appcast_manager/appcastManager.swift +++ b/scripts/appcast_manager/appcastManager.swift @@ -12,7 +12,7 @@ signal(SIGINT) { _ in } let isCI = ProcessInfo.processInfo.environment["CI"] != nil -let appcastURLString = "https://staticcdn.duckduckgo.com/macos-desktop-browser/appcast2.xml" +let appcastURLString = "https://staticcdn.kapusta.cc/macos-desktop-browser/appcast2.xml" let appcastURL = URL(string: appcastURLString)! let tmpDir = isCI ? "." : NSString(string: "~/Developer").expandingTildeInPath let tmpDirURL = URL(fileURLWithPath: tmpDir, isDirectory: true) diff --git a/scripts/upload_to_s3/upload_to_s3.sh b/scripts/upload_to_s3/upload_to_s3.sh index ddce4555c6..2933e244a4 100755 --- a/scripts/upload_to_s3/upload_to_s3.sh +++ b/scripts/upload_to_s3/upload_to_s3.sh @@ -1,8 +1,8 @@ #!/bin/bash # Constants -S3_PATH="s3://ddg-staticcdn/macos-desktop-browser/" -CDN_PATH="https://staticcdn.duckduckgo.com/macos-desktop-browser/" +S3_PATH="s3://ddgstaticcdn/macos-desktop-browser/" +CDN_PATH="https://staticcdn.kapusta.cc/macos-desktop-browser/" # Defaults if [[ -n "$CI" ]]; then