-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (33 loc) · 1.49 KB
/
deploy-content-preview-server.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 }}