Skip to content

???

??? #35

Workflow file for this run

name: Docker Build
on:
push:
# branches:
# - main
# pull_request:
workflow_call:
inputs:
branch:
description: "Branch name for build"
required: true
type: string
permissions:
id-token: write
contents: read
#env:
# VAULT_PW: ${{ secrets.VAULT_PW }}
# REPORT_COVERAGE: true
jobs:
docker_build:
runs-on: self-hosted
container:
image: ubuntu:20.04
steps:
- name: Install system packages
run: |
apt-get update
apt-get install -y docker
# apt-get install -y aws-cli
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/delegatedadmin/developer/dpc-${{ inputs.env }}-github-actions
- name: Set environment variables from AWS
uses: cmsgov/ab2d-bcda-dpc-platform/actions/aws-params-env-action@main
env:
AWS_REGION: ${{ vars.AWS_REGION }}
with:
params: |
NEW_RELIC_API_KEY=/dpc/${{ inputs.env }}/newrelic/new_relic_user_key
- name: Checkout code
uses: actions/checkout@v4
with:
# path: ./dpc-app
# ref: ${{ github.event.pull_request.head.sha || github.event.inputs.branch }}
ref: ${{ github.ref_name }}
- name: "Set up JDK 11"
uses: actions/setup-java@v1
with:
java-version: "11"
- name: Docker manually
run: docker --version && docker compose -f ./docker-compose.base.yml build base
- name: Build app
run: make ci-app
- name: Build portal # this is run in parallel with the app build on jenkins, might break out to separate job
run: make ci-portals-v1
- name: Save artifacts
run: "echo 'Saving artifacts'"
- name: ECR Login
run: "log into ECR here and then push up images"
# use ECR to save the artifacts