Skip to content

Experiment with buildspec.yml file #56

Experiment with buildspec.yml file

Experiment with buildspec.yml file #56

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