From 3caf6296823da5075476869a015b1bc51a8cb042 Mon Sep 17 00:00:00 2001 From: sedghi Date: Tue, 17 Dec 2024 13:27:42 -0500 Subject: [PATCH] publish arm64 docker --- .circleci/config.yml | 71 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c8c7afabe8..f8fced4379 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -229,6 +229,36 @@ jobs: docker push ohif/app:latest fi + DOCKER_RELEASE_PUBLISH_ARM: + <<: *defaults + resource_class: arm.large + steps: + - attach_workspace: + at: ~/repo + - setup_remote_docker: + docker_layer_caching: false + - run: + name: Build and push ARM64 Docker image from the release branch + command: | + # This file will exist if a new version was published by + # our command in the previous job. + if [[ ! -e version.txt ]]; then + exit 0 + else + # Remove npm config + rm -f ./.npmrc + # Set our version number using vars + export IMAGE_VERSION=$(cat version.txt) + export IMAGE_VERSION_FULL=v$IMAGE_VERSION + echo $IMAGE_VERSION + echo $IMAGE_VERSION_FULL + # Build our ARM64 image, auth, and push + docker build --tag ohif/app:$IMAGE_VERSION_FULL-arm64 --tag ohif/app:latest-arm64 . + echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin + docker push ohif/app:$IMAGE_VERSION_FULL-arm64 + docker push ohif/app:latest-arm64 + fi + DOCKER_BETA_PUBLISH: <<: *defaults resource_class: large @@ -265,6 +295,41 @@ jobs: docker push ohif/app:$IMAGE_VERSION_FULL fi + DOCKER_BETA_PUBLISH_ARM: + <<: *defaults + resource_class: arm.large + steps: + - attach_workspace: + at: ~/repo + - setup_remote_docker: + docker_layer_caching: false + - run: + name: Build and push ARM64 Docker image from the master branch (beta releases) + command: | + echo $(ls -l) + + # This file will exist if a new version was published by + # our command in the previous job. + if [[ ! -e version.txt ]]; then + echo "don't have version txt" + exit 0 + else + echo "Building and pushing ARM64 Docker image from the master branch (beta releases)" + rm -f ./.npmrc + # Set our version number using vars + export IMAGE_VERSION=$(cat version.txt) + export IMAGE_VERSION_FULL=v$IMAGE_VERSION + echo $IMAGE_VERSION + echo $IMAGE_VERSION_FULL + # Build our ARM64 image, auth, and push + echo "starting docker build" + docker build --tag ohif/app:$IMAGE_VERSION_FULL-arm64 . + echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin + + echo "starting docker push" + docker push ohif/app:$IMAGE_VERSION_FULL-arm64 + fi + CYPRESS: <<: *defaults resource_class: large @@ -316,6 +381,9 @@ workflows: - DOCKER_BETA_PUBLISH: requires: - NPM_PUBLISH + - DOCKER_BETA_PUBLISH_ARM: + requires: + - NPM_PUBLISH # viewer.ohif.org DEPLOY_RELEASE: @@ -334,3 +402,6 @@ workflows: - DOCKER_RELEASE_PUBLISH: requires: - NPM_PUBLISH + - DOCKER_RELEASE_PUBLISH_ARM: + requires: + - NPM_PUBLISH