From 1c2b30411fc2d1ce09cbd97aed16141c48742271 Mon Sep 17 00:00:00 2001 From: Nelson Vides Date: Tue, 13 Jul 2021 13:44:04 +0200 Subject: [PATCH] Build docker container with docker executor --- .circleci/config.yml | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ba569714fc..441c8b66ef7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,6 +76,13 @@ commands: - save_cache: key: prod-build-cache-{{ .Branch }}-{{ .Revision }}--{{ checksum "otp_version" }} paths: ~/app/_build/prod/rel/mongooseim + restore_prod_build: + steps: + - run: + name: Prepare for cache + command: echo $ERLANG_VERSION > otp_version + - restore_cache: + key: prod-build-cache-{{ .Branch }}-{{ .Revision }}--{{ checksum "otp_version" }} persist_workspace: steps: - run: git gc @@ -313,28 +320,18 @@ jobs: - upload_results_to_aws - publish_github_comment + # ######################### + # jobs in docker containers docker_image: parallelism: 1 - machine: - image: ubuntu-2004:202010-01 - working_directory: ~/app + executor: << parameters.executor >> parameters: - otp_package: - type: string - description: Version of the Erlang package installed - environment: + executor: + type: executor steps: - checkout - - run: - name: Prepare for cache - command: | - echo <> > otp_version - - restore_cache: - keys: - - build-cache-{{ .Branch }}-{{ .Revision }}--{{ checksum "otp_version" }} - - restore_cache: - keys: - - deps-cache--{{ checksum "rebar.lock" }}--{{ checksum "big_tests/rebar.lock" }}--{{ checksum "otp_version" }} + - setup_remote_docker + - restore_prod_build - run: name: Execute Docker image build and upload command: tools/circle-build-and-push-docker.sh @@ -384,7 +381,6 @@ jobs: pip3 install mike mike deploy $DOCS_TAG --remote git@github.com:esl/MongooseDocs.git --branch gh-pages --push --rebase - # jobs in docker containers build_in_docker: executor: << parameters.executor >> parameters: @@ -654,8 +650,8 @@ workflows: # ============= DOCKER IMAGE BUILD & UPLOAD ============= - docker_image: name: docker_build_and_ship + executor: otp_23 context: mongooseim-org - otp_package: 23.0.3-1 requires: - ldap_mnesia_23 - pgsql_mnesia