Skip to content

Commit

Permalink
Merge pull request #103 from broadinstitute/ph-PD-2434-fix-failing-tr…
Browse files Browse the repository at this point in the history
…ivy-tests

PD-2434 Fix failing test for arrays-picard-private docker image
  • Loading branch information
kevinpalis authored Feb 9, 2024
2 parents 21e260b + 51d9c01 commit 9b0ca36
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/build-arrays-picard-private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ env:
# Region-specific Google Docker repository where GOOGLE_PROJECT/REPOSITORY_NAME can be found
DOCKER_REGISTRY: us.gcr.io
GCR_PATH: broad-gotc-prod/arrays-picard-private
ACR_PATH: arrays-picard-private
TAG: ${{ github.event.inputs.image_tag || github.head_ref || github.ref_name }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# The job that builds our container
build:
# The type of runner that the job will run on
build-for-gcr:
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -57,4 +57,28 @@ jobs:
password: ${{ secrets.GCR_CI_KEY }}
# Push the image to the Google Docker registry
- name: Push image
run: "docker push ${DOCKER_REGISTRY}/${GCR_PATH}:${TAG}"
run: "docker push ${DOCKER_REGISTRY}/${GCR_PATH}:${TAG}"

build-for-acr:
runs-on: ubuntu-latest
defaults:
run:
working-directory: 3rd-party-tools/arrays-picard-private
steps:
# checkout the repo
- name: 'Checkout GitHub Action'
uses: actions/checkout@v3

- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Build and push image'
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/${ACR_PATH}:${TAG}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/${ACR_PATH}:${TAG}
11 changes: 3 additions & 8 deletions 3rd-party-tools/arrays-picard-private/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Adding a platform tag to ensure that images built on ARM-based machines doesn't break pipelines
FROM --platform="linux/amd64" adoptopenjdk/openjdk8:debian-slim
FROM --platform="linux/amd64" adoptopenjdk/openjdk8:alpine-slim

ARG PICARD_PRIVATE_VERSION=c24d8e2dfd6de9c663416278040a9f91b6a5e3eb

Expand All @@ -17,9 +17,7 @@ WORKDIR /usr/gitc

# Install dependencies
RUN set -eux; \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y \
apk add --no-cache \
bash \
curl \
findutils \
Expand All @@ -42,10 +40,7 @@ RUN set -eux; \
; \
# Install tini
wget https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini -O /sbin/tini; \
chmod +x /sbin/tini \
; \
# Clean up cached files
apt-get clean && rm -rf /var/lib/apt/lists/*
chmod +x /sbin/tini;

# Set tini as default entry point
ENTRYPOINT ["/sbin/tini", "--"]

0 comments on commit 9b0ca36

Please sign in to comment.