From 5c49aada6fed0e6069d63e8b0e90829db72174a7 Mon Sep 17 00:00:00 2001 From: Tanishq Rupaal Date: Sat, 18 May 2024 15:37:01 -0500 Subject: [PATCH] add cci for ARM and pause GHA --- .circleci/config.yml | 31 +++++++++++++++++++ ...build-arm.yml => paused-sec-build-arm.yml} | 0 security_docker_arm/Dockerfile | 2 +- security_docker_arm/local-builder-script.sh | 7 ++--- 4 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 .circleci/config.yml rename .github/{workflows/sec-build-arm.yml => paused-sec-build-arm.yml} (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..9c793f5 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,31 @@ +version: 2.1 +jobs: + build-arm-image: + machine: + image: ubuntu-2204:current + # docker_layer_caching: true + resource_class: arm.large + steps: + - checkout + # - setup_remote_docker + # - restore_cache: + # keys: + # - v1-{{ .Branch }} + # paths: + # - /caches/app.tar + - run: + name: Docker Login + command: | + echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin + - run: + name: Execute Build Script + command: | + cd security_docker_arm + bash local-builder-script.sh + # - run: + # name: Push Image + # command: | + # TAG=0.1.$CIRCLE_BUILD_NUM + # docker build -t $DOCKERHUB_USERNAME/circleci-docker-example:$TAG . + + # docker push $DOCKERHUB_USERNAME/circleci-docker-example:$TAG diff --git a/.github/workflows/sec-build-arm.yml b/.github/paused-sec-build-arm.yml similarity index 100% rename from .github/workflows/sec-build-arm.yml rename to .github/paused-sec-build-arm.yml diff --git a/security_docker_arm/Dockerfile b/security_docker_arm/Dockerfile index dc4e6ee..1e2bd68 100644 --- a/security_docker_arm/Dockerfile +++ b/security_docker_arm/Dockerfile @@ -1,4 +1,4 @@ -FROM tanq16/intermediate_builder:arm as intermediate_builder +FROM intermediate_builder as intermediate_builder FROM ubuntu:jammy # ============================================================================================================ diff --git a/security_docker_arm/local-builder-script.sh b/security_docker_arm/local-builder-script.sh index 68dca5a..9b219a8 100644 --- a/security_docker_arm/local-builder-script.sh +++ b/security_docker_arm/local-builder-script.sh @@ -1,5 +1,4 @@ -DOCKER_BUILDKIT=1 docker buildx build -o type=docker --platform=linux/arm64 -f builder.Dockerfile -t tanq16/intermediate_builder:arm . -docker push tanq16/intermediate_builder:arm -docker system prune -f -DOCKER_BUILDKIT=1 docker buildx build -o type=docker --platform=linux/arm64 -t tanq16/sec_docker:main_apple . +DOCKER_BUILDKIT=1 docker build -f builder.Dockerfile -t intermediate_builder . +docker builder prune -f +DOCKER_BUILDKIT=1 docker build -t tanq16/sec_docker:main_apple . docker push tanq16/sec_docker:main_apple