Skip to content

Commit

Permalink
Merge branch 'main' into lauren/fix-cred-logging-alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
bhagatparwinder authored Dec 23, 2024
2 parents f5de064 + a489295 commit 4e74f69
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
make test
- name: Archive code coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: ./test_results/latest/testcoverage.out
Expand All @@ -41,12 +41,9 @@ jobs:
name: Sonarqube Quality Gate
needs: build
runs-on: self-hosted
env:
# Workaround until https://jira.cms.gov/browse/PLT-338 is implemented.
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: "true"
steps:
- name: Download code coverage
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: code-coverage-report
- name: Set env vars from AWS params
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile.package
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.12-alpine3.20
FROM golang:alpine3.20

ENV CGO_ENABLED=0

Expand Down
6 changes: 3 additions & 3 deletions Dockerfiles/Dockerfile.ssas
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.12-alpine3.20 AS documentation
FROM golang:alpine3.20 AS documentation
RUN apk update upgrade
RUN apk add git build-base gcc binutils-gold
WORKDIR /go/src/github.com/CMSgov/bcda-ssas-app
Expand All @@ -13,7 +13,7 @@ RUN dir=$(mktemp -d) && \
WORKDIR /go/src/github.com/CMSgov/bcda-ssas-app/ssas/service/main
RUN swagger generate spec -i ../../swaggerui/tags.yml -o ../../swaggerui/swagger.json -m

FROM golang:1.21.12-alpine3.20 AS builder
FROM golang:alpine3.20 AS builder
ARG VERSION
RUN apk update upgrade
RUN apk add git
Expand All @@ -23,7 +23,7 @@ WORKDIR /go/src/github.com/CMSgov/bcda-ssas-app/ssas
COPY --from=documentation /go/src/github.com/CMSgov/bcda-ssas-app/ssas/swaggerui ./swaggerui
RUN go build -ldflags "-X github.com/CMSgov/bcda-ssas-app/ssas/constants.Version=$VERSION" -o ssas ./service/main

FROM golang:1.21.12-alpine3.20
FROM golang:alpine3.20
RUN apk update upgrade
RUN apk --no-cache add ca-certificates aws-cli curl
WORKDIR /go/src/github.com/CMSgov/bcda-ssas-app
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.12-alpine3.20
FROM golang:alpine3.20

RUN apk update upgrade

Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,16 @@ dbdocs: start-db load-fixtures
docker run --rm -v $PWD:/work -w /work --network bcda-ssas-app_default ghcr.io/k1low/tbls doc --rm-dist "postgres://postgres:toor@db:5432/bcda?sslmode=disable" dbdocs/bcda

.PHONY: docker-build docker-bootstrap load-fixtures test package release smoke-test postman unit-test lint migrations-test start-db dbdocs

# Build and publish images to ECR
build-ssas:
$(eval ACCOUNT_ID =$(shell aws sts get-caller-identity --output text --query Account))
$(eval CURRENT_COMMIT=$(shell git log -n 1 --pretty=format:'%h'))
$(eval DOCKER_REGISTRY_URL=${ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/bcda-ssas)
docker build -t ${DOCKER_REGISTRY_URL}:latest -t '${DOCKER_REGISTRY_URL}:${CURRENT_COMMIT}' -f Dockerfiles/Dockerfile.ssas .

publish-ssas:
$(eval ACCOUNT_ID =$(shell aws sts get-caller-identity --output text --query Account))
$(eval DOCKER_REGISTRY_URL=${ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/bcda-ssas)
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin '${DOCKER_REGISTRY_URL}'
docker image push ${DOCKER_REGISTRY_URL} -a

0 comments on commit 4e74f69

Please sign in to comment.