Skip to content

Update prod and beta env #17

Update prod and beta env

Update prod and beta env #17

Workflow file for this run

name: Prod Deployment Workflow
on:
issue_comment:
types: [created]
jobs:
beta-deployment:
if: >-
github.event.issue.pull_request &&
contains(github.event.comment.body, 'Approve Prod Deployment')
name: Get approval for deployment
permissions:
id-token: write
contents: read
issues: read
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Assume IAM Role
uses: aws-actions/[email protected]
with:
role-to-assume: ${{ secrets.DEPLOY_STACKS_ROLE }}
aws-region: us-east-1
- name: Setup Node.js and AWS CDK
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Deploy
run: |
COMMAND_OUTPUT= $(npm run cdk diff -- OpenSearch-CI-Config-Dev -c useSsl=false -c serverAccessType=prefixList -c restrictServerAccessTo=${{secrets.PREFIX_LIST}})
echo "$COMMAND_OUTPUT" | grep -q "Number of stacks with differences: 0"
if [ $? -eq 0 ]; then
echo "No stack changes involved"
else
npm install
npm run build
npm install -g [email protected]
npm run cdk deploy -- OpenSearch-CI-Config-Prod -c useSsl=false -c serverAccessType=prefixList -c restrictServerAccessTo=${{secrets.PREFIX_LIST}}
npm run cdk deploy -- OpenSearch-CI-Prod -c useSsl=false -c authType=github -c dataRetention=true -c macAgent=true -c useProdAgents=true -c enableViews=true -c ignoreResourcesFailures=false -c serverAccessType=prefixList -c restrictServerAccessTo=${{secrets.PREFIX_LIST}}
fi