From 809d4cd2ba1ab0490cb8eac7529992077c7eaecc Mon Sep 17 00:00:00 2001 From: phendriksen100 <103142505+phendriksen100@users.noreply.github.com> Date: Mon, 29 Jan 2024 15:58:15 -0500 Subject: [PATCH 1/5] ph update docker image so it uses alpine --- 3rd-party-tools/arrays-picard-private/Dockerfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/3rd-party-tools/arrays-picard-private/Dockerfile b/3rd-party-tools/arrays-picard-private/Dockerfile index fe9b6c44..3f096377 100644 --- a/3rd-party-tools/arrays-picard-private/Dockerfile +++ b/3rd-party-tools/arrays-picard-private/Dockerfile @@ -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 @@ -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 \ @@ -43,9 +41,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/* + ; # Set tini as default entry point ENTRYPOINT ["/sbin/tini", "--"] From 2f511147b66ceb12549e15f949f959a15b6448bc Mon Sep 17 00:00:00 2001 From: phendriksen100 <103142505+phendriksen100@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:30:39 -0500 Subject: [PATCH 2/5] fix ending format --- 3rd-party-tools/arrays-picard-private/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/3rd-party-tools/arrays-picard-private/Dockerfile b/3rd-party-tools/arrays-picard-private/Dockerfile index 3f096377..d5f17b18 100644 --- a/3rd-party-tools/arrays-picard-private/Dockerfile +++ b/3rd-party-tools/arrays-picard-private/Dockerfile @@ -40,8 +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 \ - ; + chmod +x /sbin/tini; # Set tini as default entry point ENTRYPOINT ["/sbin/tini", "--"] From 7141cb425f80a2d627beb85c7e8a6c291b5bec05 Mon Sep 17 00:00:00 2001 From: Kevin Palis Date: Fri, 9 Feb 2024 10:52:49 -0500 Subject: [PATCH 3/5] Adding build steps that are now required by our automated checks --- .../workflows/build-arrays-picard-private.yml | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-arrays-picard-private.yml b/.github/workflows/build-arrays-picard-private.yml index 240dd82d..9acff3b2 100644 --- a/.github/workflows/build-arrays-picard-private.yml +++ b/.github/workflows/build-arrays-picard-private.yml @@ -25,8 +25,7 @@ env: # 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: @@ -57,4 +56,29 @@ 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}" \ No newline at end of file + 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} \ No newline at end of file From a9dc4f07bfe04a079a7934e15092e90de90cd516 Mon Sep 17 00:00:00 2001 From: Kevin Palis Date: Fri, 9 Feb 2024 11:05:54 -0500 Subject: [PATCH 4/5] Checking why tag is failing --- .github/workflows/build-arrays-picard-private.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-arrays-picard-private.yml b/.github/workflows/build-arrays-picard-private.yml index 9acff3b2..b6d561ff 100644 --- a/.github/workflows/build-arrays-picard-private.yml +++ b/.github/workflows/build-arrays-picard-private.yml @@ -72,7 +72,12 @@ jobs: uses: azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }} - + - name: Check working directory and parameters' + run: | + echo "Current directory: " + pwd + ls -lht + echo "Pushing to: " ${ACR_PATH}:${TAG} - name: 'Build and push image' uses: azure/docker-login@v1 with: From 51d9c012319fb3aacf4aa83076ec5960ffac484d Mon Sep 17 00:00:00 2001 From: Kevin Palis Date: Fri, 9 Feb 2024 11:12:44 -0500 Subject: [PATCH 5/5] Missed an env variable which is what was causing the failure --- .github/workflows/build-arrays-picard-private.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build-arrays-picard-private.yml b/.github/workflows/build-arrays-picard-private.yml index b6d561ff..00ff49f9 100644 --- a/.github/workflows/build-arrays-picard-private.yml +++ b/.github/workflows/build-arrays-picard-private.yml @@ -20,6 +20,7 @@ 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 @@ -72,12 +73,6 @@ jobs: uses: azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }} - - name: Check working directory and parameters' - run: | - echo "Current directory: " - pwd - ls -lht - echo "Pushing to: " ${ACR_PATH}:${TAG} - name: 'Build and push image' uses: azure/docker-login@v1 with: