From f1df8c33ff81dd14686a544a3863da060bcebee7 Mon Sep 17 00:00:00 2001 From: "a.bouhuolia" Date: Tue, 21 Sep 2021 14:56:04 +0200 Subject: [PATCH] feat: add circleci config. --- client/.circleci/config.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 client/.circleci/config.yml diff --git a/client/.circleci/config.yml b/client/.circleci/config.yml new file mode 100644 index 000000000..aebc2333b --- /dev/null +++ b/client/.circleci/config.yml @@ -0,0 +1,42 @@ +# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml' +version: 2.1 + +jobs: + build: + working_directory: ~/app/client + docker: + - image: docker:17.05.0-ce-git + + steps: + - checkout: + path: ~/app + - setup_remote_docker: + version: 19.03.13 + - restore_cache: + keys: + - v1-{{ .Branch }} + paths: + - /caches/app.tar + - run: + name: Load Docker image layer cache + command: | + set +o pipefail + docker load -i /caches/app.tar | true + - run: + name: Build application Docker image + command: | + docker build -t abouhuolia/bigcapital-client:latest . + - run: + name: Save Docker image layer cache + command: | + mkdir -p /caches + docker save -o /caches/app.tar abouhuolia/bigcapital-client + - save_cache: + key: v1-{{ .Branch }}-{{ epoch }} + paths: + - /caches/app.tar + - run: + name: Publish Docker Image to Docker Hub + command: | + docker login -u abouhuolia -p 1532015325_ASdfqwer + docker push abouhuolia/bigcapital-client:latest \ No newline at end of file