From c2ead9c805a8c1ec05e2e6540215564896eb6b17 Mon Sep 17 00:00:00 2001 From: merlijn Date: Sun, 22 Dec 2024 11:02:51 +0100 Subject: [PATCH] remove circleci build file --- .circleci/config.yml | 179 ------------------------------------------- 1 file changed, 179 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2ea4f94c..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,179 +0,0 @@ -version: 2.1 - -executors: - custom-docker-executor: - machine: - image: ubuntu-2004:202111-02 # recommended linux image - includes Ubuntu 16.04, docker 18.09.3, docker-compose 1.23.1 - docker_layer_caching: true - -orbs: - my-gcp: - orbs: - docker: circleci/docker@1.5 - gcp-cli: circleci/gcp-cli@2.1 - - commands: - build-and-publish: - parameters: - image: - description: A name for your docker image - type: string - tag: - description: Comma-separated list of docker image tags - type: string - default: "latest" - artifact-registry-name: - type: string - description: The name of the artifact registry - google-project-id: - type: env_var_name - default: GOOGLE_PROJECT_ID - description: Environment variable name for the Google project ID to connect with - google-compute-region: - type: env_var_name - default: GOOGLE_COMPUTE_REGION - description: The Google compute region to connect with via the gcloud CLI - gcloud-service-key: - type: env_var_name - default: GCLOUD_SERVICE_KEY - steps: - - attach_workspace: - at: . - - docker/build: - step-name: Build Docker image for GCR - registry: "$<>-docker.pkg.dev/$<>/<>" - image: <> - tag: <> - - gcp-cli/install - - gcp-cli/initialize: - google-project-id: <> - google-compute-region: <> - gcloud-service-key: <> - - run: - name: Publish image - command: | - # Set sudo to work whether logged in as root user or non-root user - if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi - - # configure Docker to use gcloud as a credential helper - mkdir -p "$HOME/.docker" - gcloud auth configure-docker --quiet --project $<> "$<>-docker.pkg.dev" - - # if applicable, provide user access to the docker config file - if [[ -d "$HOME/.docker" ]]; then - $SUDO chown "$USER:$USER" "$HOME/.docker" -R - fi - if [[ -d "$HOME/.config" ]]; then - $SUDO chown "$USER:$USER" "$HOME/.config" -R - fi - IFS="," read -ra DOCKER_TAGS \<<< "<< parameters.tag >>" - for tag in "${DOCKER_TAGS[@]}"; do - docker push $<>-docker.pkg.dev/$<>/<>/<>:${tag} - done - -jobs: - build_server: - - working_directory: ~/repo/server - - docker: - - image: circleci/openjdk:21-jdk - - environment: - JVM_OPTS: -Xmx3200m - TERM: dumb - - steps: - - - checkout: - path: ~/repo - - - run: pwd; ls -la - - - restore_cache: - name: Restore cache - keys: - - v2-sbt-deps-{{ checksum "build.sbt" }} - - v2-sbt-deps- - - - run: - name: Test and create jar - command: sbt "project web-server" ";test;assembly" - - - save_cache: - name: Save cache - paths: - - ~/.m2 - - ~/.ivy2 - key: v2-sbt-deps-{{ checksum "build.sbt" }} - - - persist_to_workspace: - root: . - paths: - - web-server/target/scala-3.3.0/amony.jar - - build_web_client: - - working_directory: ~/repo/web-client - - docker: - - image: cimg/node:18.20.5 - - environment: - CI: false - - steps: - - - checkout: - path: ~/repo - - - restore_cache: - keys: - - v3-npm-deps-{{ checksum "package-lock.json" }} - - v3-npm-deps- - - - run: pwd; ls -la - - - run: - name: Node install - command: npm install --save - - - save_cache: - paths: - - node_modules - key: v3-npm-deps-{{ checksum "package-lock.json" }} - - run: - name: Node build - command: npm run build - - - persist_to_workspace: - root: . - paths: - - build - - build_docker_image: - executor: custom-docker-executor - - working_directory: ~/repo - - steps: - - checkout - - attach_workspace: - at: . - - run: mkdir -p server/web-server/target/scala-3.3.0 - - run: mv web-server/target/scala-3.3.0/amony.jar server/web-server/target/scala-3.3.0 - - run: mv build web-client - - my-gcp/build-and-publish: - image: "amony/app" - artifact-registry-name: "docker-images" - tag: $CIRCLE_BRANCH - -workflows: - build_and_test: - jobs: - - build_server - - build_web_client - - build_docker_image: - requires: - - build_server - - build_web_client \ No newline at end of file