From 3e7d7980e4e97d1ef69811422d8d1540feedbfd0 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Mon, 10 Jun 2024 18:11:23 +0200 Subject: [PATCH] DNM: copy de-test-build to xyz-build --- .github/workflows/xyz-build.yml | 38 +++++++++++++++++---------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/xyz-build.yml b/.github/workflows/xyz-build.yml index 88d8b9a40b76..85873ca41403 100644 --- a/.github/workflows/xyz-build.yml +++ b/.github/workflows/xyz-build.yml @@ -1,4 +1,4 @@ -name: XYZ Build +name: Test-DE Build env: DEFAULT_NOTES: "" @@ -30,7 +30,7 @@ permissions: jobs: build: - environment: xyz + environment: test-de runs-on: ubuntu-latest # Only run the scheduled workflows on the main repo. @@ -67,10 +67,12 @@ jobs: - uses: actions/checkout@v4 if: ${{ ! vars.SKIP_BUILD || ! vars.SKIP_FUNCTION }} with: - repository: mdn/translated-content + repository: mdn/translated-content-de + ref: wip path: mdn/translated-content # See matching warning for mdn/content checkout step fetch-depth: 0 + token: ${{ secrets.MDN_MTC_PAT }} - uses: actions/checkout@v4 if: ${{ ! vars.SKIP_BUILD }} @@ -109,14 +111,14 @@ jobs: CONTRIBUTOR_SPOTLIGHT_ROOT: ${{ github.workspace }}/mdn/mdn-contributor-spotlight/contributors BLOG_ROOT: ${{ github.workspace }}/mdn/mdn-studio/content/posts CURRICULUM_ROOT: ${{ github.workspace }}/mdn/curriculum - BASE_URL: "https://developer.allizom.xyz" + BASE_URL: "https://de.test.developer.allizom.org" # The default for this environment variable is geared for writers # (aka. local development). Usually defaults are supposed to be for # secure production but this is an exception and default # is not insecure. - BUILD_LIVE_SAMPLES_BASE_URL: https://live.mdnyalp.dev - BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live.mdnyalp.dev + BUILD_LIVE_SAMPLES_BASE_URL: https://live.play.de.test.mdn.allizom.net + BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live.play.de.test.mdn.allizom.net # Use the stage version of interactive examples. BUILD_INTERACTIVE_EXAMPLES_BASE_URL: https://interactive-examples.mdn.allizom.net @@ -145,7 +147,7 @@ jobs: # No surveys. # Telemetry. - REACT_APP_GLEAN_CHANNEL: xyz + REACT_APP_GLEAN_CHANNEL: test-de REACT_APP_GLEAN_ENABLED: true # Newsletter @@ -155,7 +157,7 @@ jobs: REACT_APP_PLACEMENT_ENABLED: false # Playground - REACT_APP_PLAYGROUND_BASE_HOST: mdnyalp.dev + REACT_APP_PLAYGROUND_BASE_HOST: play.de.test.mdn.allizom.net run: | # Info about which CONTENT_* environment variables were set and to what. @@ -166,11 +168,11 @@ jobs: yarn build:sw yarn build:prepare - yarn tool sync-translated-content + #yarn tool sync-translated-content # Build using one process per locale. # Note: We have 4 cores, but 9 processes is a reasonable number. - for locale in en-us es fr ja ko pt-br ru zh-cn zh-tw; do + for locale in en-us de; do yarn build --locale $locale 2>&1 | sed "s/^/[$locale] /" & pids+=($!) done @@ -199,7 +201,7 @@ jobs: uses: google-github-actions/auth@v2 with: token_format: access_token - service_account: deploy-xyz-yari@${{ secrets.GCP_PROJECT_NAME }}.iam.gserviceaccount.com + service_account: deploy-test-de-content@${{ secrets.GCP_PROJECT_NAME }}.iam.gserviceaccount.com workload_identity_provider: projects/${{ secrets.WIP_PROJECT_ID }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions - name: Setup gcloud @@ -216,7 +218,7 @@ jobs: uses: google-github-actions/auth@v2 with: token_format: access_token - service_account: deploy-xyz-yari@${{ secrets.GCP_PROJECT_NAME }}.iam.gserviceaccount.com + service_account: deploy-test-de-nonprod-mdn-ing@${{ secrets.GCP_PROJECT_NAME }}.iam.gserviceaccount.com workload_identity_provider: projects/${{ secrets.WIP_PROJECT_ID }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions - name: Setup gcloud @@ -238,8 +240,8 @@ jobs: - name: Deploy Function if: ${{ ! vars.SKIP_FUNCTION }} run: |- - for region in europe-west1 us-west1 asia-east1; do - gcloud beta functions deploy mdn-xyz-$region \ + for region in europe-west3; do + gcloud beta functions deploy mdn-nonprod-test-de-$region \ --gen2 \ --runtime=nodejs18 \ --region=$region \ @@ -252,13 +254,13 @@ jobs: --max-instances=100 \ --memory=2GB \ --timeout=120s \ - --set-env-vars="ORIGIN_MAIN=developer.allizom.xyz" \ - --set-env-vars="ORIGIN_LIVE_SAMPLES=live.mdnyalp.dev" \ - --set-env-vars="ORIGIN_PLAY=mdnyalp.dev" \ + --set-env-vars="ORIGIN_MAIN=de.test.developer.allizom.org" \ + --set-env-vars="ORIGIN_LIVE_SAMPLES=live.play.de.test.mdn.allizom.net" \ + --set-env-vars="ORIGIN_PLAY=play.de.test.mdn.allizom.net" \ --set-env-vars="SOURCE_CONTENT=https://storage.googleapis.com/${{ vars.GCP_BUCKET_NAME }}/main/" \ --set-env-vars="SOURCE_API=https://api.developer.allizom.org/" \ --set-env-vars="SENTRY_DSN=${{ secrets.SENTRY_DSN_CLOUD_FUNCTION }}" \ - --set-env-vars="SENTRY_ENVIRONMENT=xyz" \ + --set-env-vars="SENTRY_ENVIRONMENT=test-de" \ --set-env-vars="SENTRY_TRACES_SAMPLE_RATE=${{ vars.SENTRY_TRACES_SAMPLE_RATE }}" \ --set-env-vars="SENTRY_RELEASE=${{ github.sha }}" \ --set-secrets="KEVEL_SITE_ID=projects/${{ secrets.GCP_PROJECT_NAME }}/secrets/stage-kevel-site-id/versions/latest" \