Skip to content

Commit

Permalink
Correct some missing tags, send GHA metrics for all Content Release W…
Browse files Browse the repository at this point in the history
…orkflows (#824)
  • Loading branch information
timcosgrove authored Nov 26, 2024
1 parent 2ce5dbb commit 32841e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/content-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -251,7 +253,7 @@ jobs:
</sitemap>
</sitemapindex>
EOF
- name: Configure AWS Credentials
uses: aws-actions/[email protected]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/gha-metrics-datadog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
workflow_run:
workflows:
- 'Content Release'
- 'Content release: Dev'
- 'Content release: Staging'
- 'Content release: Prod'
types:
- completed
jobs:
Expand Down

0 comments on commit 32841e0

Please sign in to comment.