From 3f883a7740fccdfe4b23929142f82f05e7df2923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20GAUTREAU?= Date: Mon, 2 Nov 2020 09:18:50 +0100 Subject: [PATCH 1/6] :bug: : fix cache error --- .circleci/config.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index df64e89..5107c15 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 jobs: - build: + yarn-build: docker: - image: cimg/node:14.10.1 # the primary container, where your job's commands are run auth: @@ -8,5 +8,10 @@ jobs: password: $DOCKERHUB_PASSWORD # context / project UI env-var reference steps: - checkout # check out the code in the project directory - - yarn global add node-gyp && yarn install - - npm-v1-dependencies-{{ checksum "yarn.lock" }} + - run: yarn global add node-gyp && yarn install + - npm_cache_key: npm-v1-dependencies-{{ checksum "yarn.lock" }} + workflows: + version: 2 + yarn-build: + jobs: + - yarn-build \ No newline at end of file From 0ace6a741880fed89bb75e00e666da1412c92d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20GAUTREAU?= Date: Mon, 2 Nov 2020 09:26:20 +0100 Subject: [PATCH 2/6] :bug: : fix cache error --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5107c15..7f659f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 jobs: - yarn-build: + build: docker: - image: cimg/node:14.10.1 # the primary container, where your job's commands are run auth: @@ -11,7 +11,6 @@ jobs: - run: yarn global add node-gyp && yarn install - npm_cache_key: npm-v1-dependencies-{{ checksum "yarn.lock" }} workflows: - version: 2 yarn-build: jobs: - - yarn-build \ No newline at end of file + - build \ No newline at end of file From 12a0194f2dde2b4a453fb0db2ec3848bc59a758e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20GAUTREAU?= Date: Mon, 2 Nov 2020 09:27:58 +0100 Subject: [PATCH 3/6] :bug: : fix key error --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7f659f3..eb1986f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,6 @@ jobs: - run: yarn global add node-gyp && yarn install - npm_cache_key: npm-v1-dependencies-{{ checksum "yarn.lock" }} workflows: - yarn-build: + build: jobs: - build \ No newline at end of file From 1cc22b40a4f1f552c8375b9db8ece4e1dcd28a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20GAUTREAU?= Date: Mon, 2 Nov 2020 09:29:33 +0100 Subject: [PATCH 4/6] delete workflows --- .circleci/config.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eb1986f..4e986c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,8 +9,4 @@ jobs: steps: - checkout # check out the code in the project directory - run: yarn global add node-gyp && yarn install - - npm_cache_key: npm-v1-dependencies-{{ checksum "yarn.lock" }} - workflows: - build: - jobs: - - build \ No newline at end of file + - npm_cache_key: npm-v1-dependencies-{{ checksum "yarn.lock" }} \ No newline at end of file From dbf3f1ebf6af756125f7abf1f0fdb38eb0c7770d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20GAUTREAU?= Date: Mon, 2 Nov 2020 09:35:52 +0100 Subject: [PATCH 5/6] try restore cache --- .circleci/config.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e986c0..863746f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,5 +8,10 @@ jobs: password: $DOCKERHUB_PASSWORD # context / project UI env-var reference steps: - checkout # check out the code in the project directory + - restore_cache: + keys: + - npm-v1-dependencies-{{ checksum "yarn.lock" }} - run: yarn global add node-gyp && yarn install - - npm_cache_key: npm-v1-dependencies-{{ checksum "yarn.lock" }} \ No newline at end of file + - save_cache: + key: npm-v1-dependencies-{{ checksum "yarn.lock" }} + \ No newline at end of file From fc4cc03cdf050c29e47ffb094d38e19aa920bd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20GAUTREAU?= Date: Mon, 2 Nov 2020 10:05:50 +0100 Subject: [PATCH 6/6] restore cache --- .circleci/config.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 863746f..14a0220 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,17 +1,27 @@ version: 2.1 +workflows: + workflow1: + jobs: + - hello + - yarn1 + jobs: - build: + hello: docker: - - image: cimg/node:14.10.1 # the primary container, where your job's commands are run - auth: - username: mydockerhub-user - password: $DOCKERHUB_PASSWORD # context / project UI env-var reference + - image: cimg/node:14 # the primary container, where your job's commands are run + steps: + - checkout + - run: echo "Hello World" + yarn1: + docker: + - image: cimg/node:14 # the primary container, where your job's commands are run steps: - checkout # check out the code in the project directory - restore_cache: - keys: - - npm-v1-dependencies-{{ checksum "yarn.lock" }} + key: npm-v1-dependencies-{{ checksum "yarn.lock" }} + - run: yarn global add node-gyp && yarn install + - save_cache: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} - \ No newline at end of file + paths: ./node_modules \ No newline at end of file