Skip to content

Deploy Content Preview Server #1421

Deploy Content Preview Server

Deploy Content Preview Server #1421

name: Deploy Content Preview Server
on:
workflow_run:
workflows:
- Daily Production Release
types:
- completed
jobs:
deploy-preview-server:
name: Deploy Preview Servers (PROD, STAGING, DEV)
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: [self-hosted, asg]
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-gov-west-1
- name: Get Jenkins CMS bot user token from Parameter Store
uses: department-of-veterans-affairs/action-inject-ssm-secrets@d8e6de3bde4dd728c9d732baef58b3c854b8c4bb # latest
with:
# TODO: Temporary path to token because the svc-gha-frontendteam-user has access to this path, fix before merge.
ssm_parameter: /dsva-vagov/content-build/VA_CMS_BOT_JENKINS_TOKEN
env_variable_name: VA_CMS_BOT_JENKINS_API_TOKEN
- name: Trigger Preview server deployment job in Jenkins
id: trigger-preview-request
uses: fjogeleit/http-request-action@e8dd067b83c3ab0774c76bf065b1c4f11c7e45ba # v1.14.0
with:
url: 'http://jenkins.vfs.va.gov/job/deploys/job/content-preview-auto-deploy/build'
method: 'POST'
username: va-cms-bot
password: ${{ env.VA_CMS_BOT_JENKINS_API_TOKEN }}