From 6734d7e1bc67be97a1014a8a46a5bedc6d499afa Mon Sep 17 00:00:00 2001 From: nfpappas-oddball <165396779+nfpappas-oddball@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:38:32 -0400 Subject: [PATCH] Change envs to work with the revproxy (#563) Co-authored-by: nfpappas-oddball --- .github/workflows/content-release.yml | 11 ++++++++--- envs/.env.dev | 18 ++++++++++++++++++ envs/.env.prod | 3 +-- envs/.env.staging | 1 - 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 envs/.env.dev diff --git a/.github/workflows/content-release.yml b/.github/workflows/content-release.yml index 264dee4e9..e002962a8 100644 --- a/.github/workflows/content-release.yml +++ b/.github/workflows/content-release.yml @@ -132,7 +132,9 @@ jobs: # Certs added for the self hosted runner env: NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt - APP_ENV: prod + APP_ENV: ${{ inputs.build_type }} + + ports: - 80 volumes: @@ -147,8 +149,10 @@ jobs: uses: actions/checkout@v4 with: repository: department-of-veterans-affairs/next-build - ref: ${{ needs.validate-build-status.outputs.TAG }} + #ref: ${{ needs.validate-build-status.outputs.TAG }} + ref: ${{ github.head_ref || github.ref_name }} path: main + sparse-checkout-cone-mode: false - name: Checkout vets-website uses: actions/checkout@v4 @@ -193,7 +197,8 @@ jobs: retry_on: error timeout_minutes: 30 command: echo YARN_OUTPUT=$(cd main && yarn export --DRUPAL_CLIENT_ID ${{ secrets.PROD_DRUPAL_CLIENT_ID }} --DRUPAL_CLIENT_SECRET ${{ secrets.PROD_DRUPAL_CLIENT_SECRET }} --no-USE_REDIS) >> $GITHUB_OUTPUT - + #command: cd main && yarn export --NEXT_PUBLIC_DRUPAL_BASE_URL https://content-build-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov --NEXT_IMAGE_DOMAIN https://content-build-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov --SITE_URL https://www.va.gov --DRUPAL_CLIENT_ID ${{ secrets.PROD_DRUPAL_CLIENT_ID }} --DRUPAL_CLIENT_SECRET ${{ secrets.PROD_DRUPAL_CLIENT_SECRET }} --no-USE_REDIS + - name: Build sitemap run: cd main && yarn build:sitemap diff --git a/envs/.env.dev b/envs/.env.dev new file mode 100644 index 000000000..144f267cc --- /dev/null +++ b/envs/.env.dev @@ -0,0 +1,18 @@ +# This is the standard lower environment for Content API. +NEXT_PUBLIC_DRUPAL_BASE_URL=https://content-build-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov +NEXT_IMAGE_DOMAIN=https://content-build-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov + +# Prod bucket for vets-website assets +# NEXT_PUBLIC_ASSETS_URL=https://prod-va-gov-assets.s3-us-gov-west-1.amazonaws.com/generated/ +NEXT_PUBLIC_ASSETS_URL=/generated/ +SITE_URL=https://www.va.gov + +# for Drupal preview +DRUPAL_PREVIEW_SECRET=secret +# store these securely in the build pipeline env +#DRUPAL_CLIENT_ID=Retrieve this from AWS SSM /cms/consumers/next-build/client_id +#DRUPAL_CLIENT_SECRET=Retrieve this from AWS SSM /cms/consumers/next-build/client_secret + +# Google Analytics +# These print directly to the page so do not need to store in SSM. +NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID=GTM-WFJWBD diff --git a/envs/.env.prod b/envs/.env.prod index 5f77272a3..863625658 100644 --- a/envs/.env.prod +++ b/envs/.env.prod @@ -4,8 +4,7 @@ NEXT_IMAGE_DOMAIN=https://prod.cms.va.gov # Prod bucket for vets-website assets # NEXT_PUBLIC_ASSETS_URL=https://prod-va-gov-assets.s3-us-gov-west-1.amazonaws.com/generated/ -NEXT_PUBLIC_ASSETS_URL=/next-content.www.va.gov/generated/ - +NEXT_PUBLIC_ASSETS_URL=/generated/ SITE_URL=https://www.va.gov # for Drupal preview diff --git a/envs/.env.staging b/envs/.env.staging index 9cda7a5a4..60a8495ae 100644 --- a/envs/.env.staging +++ b/envs/.env.staging @@ -3,7 +3,6 @@ NEXT_PUBLIC_DRUPAL_BASE_URL=https://staging.cms.va.gov/ NEXT_IMAGE_DOMAIN=https://staging.cms.va.gov/ NEXT_PUBLIC_ASSETS_URL=/generated/ - # for Drupal preview DRUPAL_PREVIEW_SECRET=secret # store these securely in the build pipeline env