-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build docker container with docker executor
- Loading branch information
1 parent
95fe522
commit 1c2b304
Showing
1 changed file
with
15 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <<parameters.otp_package>> > 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 [email protected]: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 | ||
|