From 70bcd3a95d6bf469a8fc69c0f6827fce391c070b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Honeiser?= Date: Thu, 24 Oct 2024 13:39:35 +0200 Subject: [PATCH] chore(circleci): CircleCI workflow has been replaced with an internal GHA workflow (#539) --- .circleci/config.yml | 100 ------------------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index a32b5bc..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,100 +0,0 @@ -# These environment variables must be set in CircleCI UI -# -# DOCKERHUB_REPO - docker hub repo, format: / -# DOCKER_USER - login info for docker hub -# DOCKER_PASS -# -version: 2 -jobs: - build: - docker: - - image: docker:stable-git - auth: - username: $DOCKER_USER - password: $DOCKER_PASS - working_directory: /dockerflow - steps: - - checkout - - setup_remote_docker - - - run: - name: Create a version.json - command: | - # create a version.json per https://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md - printf '{"commit":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}\n' \ - "$CIRCLE_SHA1" \ - "$CIRCLE_TAG" \ - "$CIRCLE_PROJECT_USERNAME" \ - "$CIRCLE_PROJECT_REPONAME" \ - "$CIRCLE_BUILD_URL" > version.json - - - run: - name: Login to Dockerhub - command: | - if [ "${DOCKER_USER}" == "" ] || [ "${DOCKER_PASS}" == "" ]; then - echo "Skipping Login to Dockerhub, credentials not available." - else - echo "${DOCKER_PASS}" | docker login -u="${DOCKER_USER}" --password-stdin - fi - - - run: - name: Build Docker image - command: docker build -t app:build . - - # save the built docker container into CircleCI's cache. This is - # required since Workflows do not have the same remote docker instance. - - run: - name: docker save app:build - command: mkdir -p /cache; docker save -o /cache/docker.tar "app:build" - - save_cache: - key: v1-{{ .Environment.CIRCLE_SHA1 }}-{{epoch}} - paths: - - /cache/docker.tar - - deploy: - docker: - - image: docker:18.02.0-ce - auth: - username: $DOCKER_USER - password: $DOCKER_PASS - steps: - - setup_remote_docker - - restore_cache: - key: v1-{{.Environment.CIRCLE_SHA1}} - - run: - name: Restore Docker image cache - command: docker load -i /cache/docker.tar - - - run: - name: Deploy to Dockerhub - command: | - echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin - # deploy main - if [ "${CIRCLE_BRANCH}" == "main" ]; then - docker tag app:build ${DOCKERHUB_REPO}:latest - docker push ${DOCKERHUB_REPO}:latest - elif [ ! -z "${CIRCLE_TAG}" ]; then - # deploy a release tag... - echo "${DOCKERHUB_REPO}:${CIRCLE_TAG}" - docker tag app:build "${DOCKERHUB_REPO}:${CIRCLE_TAG}" - docker images - docker push "${DOCKERHUB_REPO}:${CIRCLE_TAG}" - fi - -workflows: - version: 2 - build-deploy: - jobs: - - build: - filters: - tags: - only: /.*/ - - - deploy: - requires: - - build - filters: - tags: - only: /.*/ - branches: - only: main