Skip to content

Commit

Permalink
Stub out job for circleci and update containerfile to newer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
r351574nc3 committed Nov 15, 2023
1 parent 78acc6c commit 072ffff
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
version: 2.1

########################################################################################################################
# ORBS #
########################################################################################################################
orbs:
aws-cli: circleci/[email protected]
aws-ecr: circleci/[email protected]


########################################################################################################################
# EXECUTORS #
########################################################################################################################
Expand Down Expand Up @@ -1422,3 +1430,31 @@ workflows:
- build-uberjar-<< matrix.edition >>
cypress-group: "percy-visual-<< matrix.edition >>"
test-files: "./frontend/test/metabase-visual/**/*.cy.spec.js"
build_and_push_image:
jobs:
- aws-ecr/build_and_push_image:
account_id: ${AWS_ACCOUNT_ID}
auth:
- aws-cli/setup:
profile: OIDC-USER
role_arn: arn:aws:iam::123456789012:role/VALID_OIDC_ECR_ROLE
context: CircleCI_OIDC_Token
create_repo: true
dockerfile: myDockerfile
executors: base
extra_build_args: '--compress'
no_output_timeout: 20m
path: pathToMyDockerfile
platform: linux/amd64
profile_name: OIDC-User
public_registry: false
push_image: true
region: ${AWS_DEFAULT_REGION}
repo: myECRRepository
repo_encryption_kms_key: arn:aws:kms::123456789012:key/UUID4_OF_KMS_KEY_ID
repo_encryption_type: KMS
repo_policy_path: repo-policy.json
repo_scan_on_push: true
set_repo_policy: true
skip_when_tags_exist: false
tag: latest,myECRRepoTag
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,20 @@ RUN INTERACTIVE=false MB_EDITION=$MB_EDITION bin/build version drivers uberjar
## Remember that this runner image needs to be the same as bin/docker/Dockerfile with the exception that this one grabs the
## jar from the previous stage rather than the local build

FROM adoptopenjdk/openjdk11:alpine-jre as runner
FROM openjdk:11-ea-jre as runner

ENV FC_LANG en-US LC_CTYPE en_US.UTF-8

# dependencies
RUN apk upgrade && apk add --update-cache --no-cache bash ttf-dejavu fontconfig curl java-cacerts && \
mkdir -p /app/certs && \
#RUN apk upgrade && apk add --update-cache --no-cache bash ttf-dejavu fontconfig curl java-cacerts && \
RUN apt-get update -yarn \
&& apt-get install -y \
bash \
ttf-dejavu \
fontconfig \
curl \
ca-certificates-java \
&& mkdir -p /app/certs && \
curl https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem -o /app/certs/rds-combined-ca-bundle.pem && \
/opt/java/openjdk/bin/keytool -noprompt -import -trustcacerts -alias aws-rds -file /app/certs/rds-combined-ca-bundle.pem -keystore /etc/ssl/certs/java/cacerts -keypass changeit -storepass changeit && \
curl https://cacerts.digicert.com/DigiCertGlobalRootG2.crt.pem -o /app/certs/DigiCertGlobalRootG2.crt.pem && \
Expand Down

0 comments on commit 072ffff

Please sign in to comment.