diff --git a/.github/workflows/content-release.yml b/.github/workflows/content-release.yml index 66ac3842e..abc68a939 100644 --- a/.github/workflows/content-release.yml +++ b/.github/workflows/content-release.yml @@ -31,6 +31,8 @@ concurrency: env: SLACK_CHANNEL: C06DSBT7CBW #status-next-build + DEPLOY_ENV: ${{ inputs.build_type || 'prod' }} + BUILD_TRIGGER: ${{ github.event_name }} jobs: # This is necessary to get credentials to use the private ECR image defined in the build job container. @@ -206,17 +208,17 @@ jobs: fi - name: Build sitemap - run: | + run: | cd main && yarn build:sitemap cd out if [ -f sitemap.xml ]; then echo "File found!" - cp sitemap.xml sitemap-nb.xml + cp sitemap.xml sitemap-nb.xml else touch sitemap-nb.xml fi shell: bash - + - name: setup bucket descriptor id: bucket-descriptor run: | @@ -234,7 +236,7 @@ jobs: echo OLD_SITEMAP_LOCATION="https://www.va.gov/sitemap-cb.xml" >> $GITHUB_OUTPUT fi shell: bash - + - name: Generate new sitemap run: | cd main @@ -251,7 +253,7 @@ jobs: EOF - + - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4.0.2 @@ -430,7 +432,6 @@ jobs: - name: Set vars for CMS-triggered runs if: ${{ github.event_name == 'repository_dispatch' }} run: | - echo "DEPLOY_ENV=${{ inputs.build_type || 'prod' }}" >> $GITHUB_ENV echo "BUILD_TRIGGER=cms" >> $GITHUB_ENV # Calculate all of our metrics that we send to data dog @@ -459,7 +460,7 @@ jobs: jq '.series[4].points[0] = [${{env.NOW}}, ${{env.BUILT_PAGES}}]' | \ jq '.series[].tags[0] = "env:${{env.DEPLOY_ENV}}"' | \ jq '.series[].tags[1] = "build_number:${{github.run_number}}"' | \ - jq '.series[].tags[2] = "status:${{needs.deploy.result}}"' | \ + jq '.series[].tags[2] = "status:${{needs.build.result}}"' | \ jq '.series[].tags[3] = "trigger:${{env.BUILD_TRIGGER}}"' > metrics.json - name: Configure AWS credentials diff --git a/.github/workflows/gha-metrics-datadog.yml b/.github/workflows/gha-metrics-datadog.yml index 3ae87d056..c0854d4a4 100644 --- a/.github/workflows/gha-metrics-datadog.yml +++ b/.github/workflows/gha-metrics-datadog.yml @@ -3,6 +3,9 @@ on: workflow_run: workflows: - 'Content Release' + - 'Content release: Dev' + - 'Content release: Staging' + - 'Content release: Prod' types: - completed jobs: