Experiment with buildspec.yml file #56
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Friendly-Umbrella | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: | |
- codebuild-cfpb-cfgov-testing-gha-${{ github.run_id }}-${{ github.run_attempt }} | |
steps: | |
- name: Checkout Friendly-Umbrella | |
uses: actions/checkout@v2 | |
- name: Retrieve Security Scan Secrets | |
uses: aws-actions/aws-secretsmanager-get-secrets@v2 | |
with: | |
secret-ids: ${{ secrets.RDS_CREDS_SECRET }} | |
parse-json-secrets: true | |
- name: Initialize environment | |
run: codebuild-init | |
- name: Build Docker image | |
run: docker build -t $REGISTRY_IMAGE_NAME . | |
- name: Scan image for vulnerabilities | |
run: scan-image $REGISTRY_IMAGE_NAME $EMAIL_TO | |
- name: Push scanned image to ECR | |
run: docker push $REGISTRY_IMAGE_NAME | |
- name: Install Helm Chart on EKS | |
run: > | |
helm upgrade --install friendly-umbrella ./helm | |
-n ${{ secrets.NAMESPACE }} -f ./helm/values.yaml | |
--set initContainers[0].image.repository=${{ secrets.ECR_REPO }} | |
--set initContainers[0].image.tag=$GITHUB_SHA | |
--set containers[0].image.repository=${{ secrets.ECR_REPO }} | |
--set containers[0].image.tag=$GITHUB_SHA | |
--set mapping.host=${{ secrets.HOST }} | |
--set serviceAccount.name=${{ secrets.K8S_SERVICE_ACCOUNT }} | |
--set config.AWS_STORAGE_BUCKET_NAME=${{ secrets.BUCKET_NAME }} | |
--set config.DATABASE_URL=$DATABASE_URL |