From 4a359fb7a656220e5e591f158140e5eada5c9082 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Mon, 2 Nov 2020 11:48:58 +0100 Subject: [PATCH 01/25] Update config.yml --- .circleci/config.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d0d8f75..6fe1c8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,9 @@ workflows: - tests: requires: - build + - database: + require: + - build jobs: build: docker: @@ -43,6 +46,29 @@ jobs: - restore_cache: key: yarn-packages-v3{{ checksum "yarn.lock" }} - run: yarn lint && yarn format:check + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules + + database: + - image: circleci/postgres:9.6-alpine + auth: + username: mydockerhub-user + password: $DOCKERHUB_PASSWORD # context / project UI env-var reference + environment: + POSTGRES_USER: psqluer + POSTGRES_DB: psdb + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + steps: + - checkout + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn test:e2e - save_cache: key: yarn-packages-v3{{ checksum "yarn.lock" }} paths: From 33277cec2af69cac446a130a87bd503cec5c3756 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Mon, 2 Nov 2020 12:24:47 +0100 Subject: [PATCH 02/25] Update config.yml --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6fe1c8e..1f159a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,9 +53,6 @@ jobs: database: - image: circleci/postgres:9.6-alpine - auth: - username: mydockerhub-user - password: $DOCKERHUB_PASSWORD # context / project UI env-var reference environment: POSTGRES_USER: psqluer POSTGRES_DB: psdb From b19d70fd937f62f8e99b267d16bc4385d08d48f2 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Mon, 2 Nov 2020 12:27:45 +0100 Subject: [PATCH 03/25] Update config.yml --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1f159a4..341935d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,7 +53,12 @@ jobs: database: - image: circleci/postgres:9.6-alpine - environment: + steps: + - checkout + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn test:e2e + environment: POSTGRES_USER: psqluer POSTGRES_DB: psdb DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb @@ -61,11 +66,6 @@ jobs: API_PORT: 3000 API_HOST: localhost API_PROTOCOL: http - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn test:e2e - save_cache: key: yarn-packages-v3{{ checksum "yarn.lock" }} paths: From 45b1bc6e08abb99bbecab46621cdd548c4106ffc Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Mon, 2 Nov 2020 12:29:28 +0100 Subject: [PATCH 04/25] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 341935d..6d52457 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,7 +53,7 @@ jobs: database: - image: circleci/postgres:9.6-alpine - steps: + steps: - checkout - restore_cache: key: yarn-packages-v3{{ checksum "yarn.lock" }} From 148f8b9018a45fa694cc1d472257131caa7142e9 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Mon, 2 Nov 2020 12:30:42 +0100 Subject: [PATCH 05/25] Update config.yml --- .circleci/config.yml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d52457..8987fc7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,21 +52,22 @@ jobs: - ./node_modules database: - - image: circleci/postgres:9.6-alpine - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn test:e2e - environment: - POSTGRES_USER: psqluer - POSTGRES_DB: psdb - DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb - JWT_SECRET: some string yo want - API_PORT: 3000 - API_HOST: localhost - API_PROTOCOL: http - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: - - ./node_modules \ No newline at end of file + docker: + - image: circleci/postgres:9.6-alpine + steps: + - checkout + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn test:e2e + environment: + POSTGRES_USER: psqluer + POSTGRES_DB: psdb + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules \ No newline at end of file From d6e64189025ec4ba02b541fa98a102d4c0284302 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Mon, 2 Nov 2020 12:32:02 +0100 Subject: [PATCH 06/25] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8987fc7..effa667 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,7 +53,7 @@ jobs: database: docker: - - image: circleci/postgres:9.6-alpine + - image: cimg/node:14.10.1 steps: - checkout - restore_cache: From 2311014afafc9debf8c1259b731a3e12296b3252 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Mon, 2 Nov 2020 12:38:04 +0100 Subject: [PATCH 07/25] Update config.yml --- .circleci/config.yml | 60 ++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index effa667..a948702 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,6 +26,26 @@ jobs: key: yarn-packages-v3{{ checksum "yarn.lock" }} paths: - ./node_modules + + - image: circleci/postgres:9.6-alpine + environment: + POSTGRES_USER: psqluer + POSTGRES_DB: psdb + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + steps: + - checkout + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn test:e2e + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules + tests: docker: - image: cimg/node:14.10.1 @@ -52,22 +72,24 @@ jobs: - ./node_modules database: - docker: - - image: cimg/node:14.10.1 - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn test:e2e - environment: - POSTGRES_USER: psqluer - POSTGRES_DB: psdb - DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb - JWT_SECRET: some string yo want - API_PORT: 3000 - API_HOST: localhost - API_PROTOCOL: http - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: - - ./node_modules \ No newline at end of file + - image: circleci/postgres:9.6-alpine + auth: + username: mydockerhub-user + password: $DOCKERHUB_PASSWORD # context / project UI env-var reference + environment: + POSTGRES_USER: psqluer + POSTGRES_DB: psdb + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + steps: + - checkout + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn test:e2e + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules \ No newline at end of file From 4ba38f737eb09c7599cfeadb194a1e61de1e8277 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Mon, 2 Nov 2020 12:40:35 +0100 Subject: [PATCH 08/25] Update config.yml --- .circleci/config.yml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a948702..6fe1c8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,26 +26,6 @@ jobs: key: yarn-packages-v3{{ checksum "yarn.lock" }} paths: - ./node_modules - - - image: circleci/postgres:9.6-alpine - environment: - POSTGRES_USER: psqluer - POSTGRES_DB: psdb - DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb - JWT_SECRET: some string yo want - API_PORT: 3000 - API_HOST: localhost - API_PROTOCOL: http - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn test:e2e - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: - - ./node_modules - tests: docker: - image: cimg/node:14.10.1 From 216154400888113886648347f28181408de301f7 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 13:36:51 +0100 Subject: [PATCH 09/25] Update config.yml --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6fe1c8e..53c9c6b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,8 @@ jobs: - ./node_modules database: - - image: circleci/postgres:9.6-alpine + docker: + - image: circleci/postgres:9.6-alpine auth: username: mydockerhub-user password: $DOCKERHUB_PASSWORD # context / project UI env-var reference From 8ef1230772d982d4582834010b5c31b295c60adc Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 13:38:10 +0100 Subject: [PATCH 10/25] Update config.yml --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 53c9c6b..aa7f60a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,9 +52,9 @@ jobs: - ./node_modules database: - docker: - - image: circleci/postgres:9.6-alpine - auth: + docker: + - image: circleci/postgres:9.6-alpine + auth: username: mydockerhub-user password: $DOCKERHUB_PASSWORD # context / project UI env-var reference environment: From 91de5200f4e116d7b8db9c7a474f0fd44e47119d Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 13:42:31 +0100 Subject: [PATCH 11/25] Update config.yml --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aa7f60a..3ba3380 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,9 +52,8 @@ jobs: - ./node_modules database: - docker: - - image: circleci/postgres:9.6-alpine - auth: + docker: + - image: circleci/prostgres:9.6.2-alpine username: mydockerhub-user password: $DOCKERHUB_PASSWORD # context / project UI env-var reference environment: From d2da298fa799692087c700d702250f3d69a3039d Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 13:43:42 +0100 Subject: [PATCH 12/25] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3ba3380..d6460f7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,7 +55,7 @@ jobs: docker: - image: circleci/prostgres:9.6.2-alpine username: mydockerhub-user - password: $DOCKERHUB_PASSWORD # context / project UI env-var reference + password: $DOCKERHUB_PASSWORD # context / project UI env-var reference sqds environment: POSTGRES_USER: psqluer POSTGRES_DB: psdb From d2d1cf2cc773310d91baac30ed1553da55df202c Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 13:50:24 +0100 Subject: [PATCH 13/25] Update config.yml --- .circleci/config.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d6460f7..42e7653 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,16 +54,17 @@ jobs: database: docker: - image: circleci/prostgres:9.6.2-alpine - username: mydockerhub-user - password: $DOCKERHUB_PASSWORD # context / project UI env-var reference sqds - environment: - POSTGRES_USER: psqluer - POSTGRES_DB: psdb - DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb - JWT_SECRET: some string yo want - API_PORT: 3000 - API_HOST: localhost - API_PROTOCOL: http + username: mydokerhub-user + password: $DOCKERHUB_PASSWORD + environment: + POSTGRES_USER: psqluer + POSTGRES_DB: psdb + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + steps: - checkout - restore_cache: From b8b310a17ad09b2dcbbf03dfd172b24f73a1ebd2 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 13:51:13 +0100 Subject: [PATCH 14/25] Update config.yml --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 42e7653..06d6009 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,8 +54,6 @@ jobs: database: docker: - image: circleci/prostgres:9.6.2-alpine - username: mydokerhub-user - password: $DOCKERHUB_PASSWORD environment: POSTGRES_USER: psqluer POSTGRES_DB: psdb From 456e5185968c323fc6091df6fe0018f06d4e2673 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 13:53:47 +0100 Subject: [PATCH 15/25] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 06d6009..97f0b32 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ workflows: requires: - build - database: - require: + requires: - build jobs: build: From 914906acc12ea8cdb0e53edfad2fd5e3fd895c14 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 14:04:54 +0100 Subject: [PATCH 16/25] Update config.yml --- .circleci/config.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 97f0b32..cb61467 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ workflows: jobs: build: docker: - - image: cimg/node:14.10.1 + - image: cimg/node:12.18 steps: - checkout - restore_cache: @@ -28,7 +28,7 @@ jobs: - ./node_modules tests: docker: - - image: cimg/node:14.10.1 + - image: cimg/node:12.18 steps: - checkout - restore_cache: @@ -40,7 +40,7 @@ jobs: - ./node_modules lint: docker: - - image: cimg/node:14.10.1 + - image: cimg/node:12.18 steps: - checkout - restore_cache: @@ -53,15 +53,19 @@ jobs: database: docker: + -image: cimg/node:12.18 + environment: + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + - image: circleci/prostgres:9.6.2-alpine - environment: - POSTGRES_USER: psqluer - POSTGRES_DB: psdb - DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb - JWT_SECRET: some string yo want - API_PORT: 3000 - API_HOST: localhost - API_PROTOCOL: http + environment: + POSTGRES_DB: psdb + POSTGRES_USER: psqluer + steps: - checkout From 954029b9268eb03032a3f179f932c3f45172f9fd Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 14:12:34 +0100 Subject: [PATCH 17/25] Update config.yml --- .circleci/config.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cb61467..1f1f915 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,20 +53,19 @@ jobs: database: docker: - -image: cimg/node:12.18 - environment: + - image: cimg/node:12.18 + environment: DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb JWT_SECRET: some string yo want API_PORT: 3000 API_HOST: localhost API_PROTOCOL: http - - - image: circleci/prostgres:9.6.2-alpine - environment: - POSTGRES_DB: psdb - POSTGRES_USER: psqluer - + - image: circleci/postgres:9.6.2-alpine + environment: + POSTGRES_USER: psqluer + POSTGRES_DB: psdb + steps: - checkout - restore_cache: From 83a93de93aba8c8368507935ebdce1328a9be07d Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 14:24:13 +0100 Subject: [PATCH 18/25] Update config.yml --- .circleci/config.yml | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1f1f915..6d0ce85 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,9 +10,7 @@ workflows: - tests: requires: - build - - database: - requires: - - build + jobs: build: docker: @@ -51,27 +49,4 @@ jobs: paths: - ./node_modules - database: - docker: - - image: cimg/node:12.18 - environment: - DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb - JWT_SECRET: some string yo want - API_PORT: 3000 - API_HOST: localhost - API_PROTOCOL: http - - - image: circleci/postgres:9.6.2-alpine - environment: - POSTGRES_USER: psqluer - POSTGRES_DB: psdb - - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn test:e2e - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: - - ./node_modules \ No newline at end of file + \ No newline at end of file From f51e8e1136d536b0336a482640c14467347303db Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Wed, 4 Nov 2020 14:32:53 +0100 Subject: [PATCH 19/25] Update config.yml --- .circleci/config.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d0ce85..9e01ef3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,9 @@ workflows: - tests: requires: - build + - db: + requires: + - build jobs: build: @@ -49,4 +52,25 @@ jobs: paths: - ./node_modules - \ No newline at end of file + db: + docker: + - image: cimg/node:12.18 + - image: circleci/postgres:9.6-alpine + environment: + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + POSTGRES_USER: psqluer + POSTGRES_DB: psdb + + steps: + - checkout + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn test:e2e + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules \ No newline at end of file From 7b712e20221857e014e27706831855cb71239ca0 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Thu, 5 Nov 2020 12:59:45 +0100 Subject: [PATCH 20/25] Validation par yamllint --- .circleci/config.yml | 143 ++++++++++++++++++++++--------------------- 1 file changed, 74 insertions(+), 69 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e01ef3..927dcb7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,76 +1,81 @@ - -version: 2.1 -workflows: - build_and_test: - jobs: - - build - - lint: - requires: - - build - - tests: - requires: - - build - - db: - requires: - - build - -jobs: - build: - docker: - - image: cimg/node:12.18 - steps: +--- +jobs: + build: + docker: + - + image: "cimg/node:12.18" + steps: - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn global add node-gyp && yarn install - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: + - + restore_cache: + key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" + - + run: "yarn global add node-gyp && yarn install" + - + save_cache: + key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" + paths: - ./node_modules - tests: - docker: - - image: cimg/node:12.18 + lint: + db: + API_HOST: localhost + API_PORT: 3000 + API_PROTOCOL: http + DATABASE_URL: "postgres://psqluer:psqlpassword@localhost:5432/psdb" + JWT_SECRET: "some string yo want" + POSTGRES_DB: psdb + POSTGRES_USER: psqluer + docker: + - + image: "cimg/node:12.18" + - + image: "circleci/postgres:9.6-alpine" + environment: ~ + docker: + - + image: "cimg/node:12.18" steps: - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn test:ci - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: + - + restore_cache: + key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" + - + run: "yarn test:e2e" + - + save_cache: + key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" + paths: - ./node_modules - lint: - docker: - - image: cimg/node:12.18 - steps: + tests: + docker: + - + image: "cimg/node:12.18" + steps: - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn lint && yarn format:check - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: + - + restore_cache: + key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" + - + run: "yarn test:ci" + - + save_cache: + key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" + paths: - ./node_modules - - db: - docker: - - image: cimg/node:12.18 - - image: circleci/postgres:9.6-alpine - environment: - DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb - JWT_SECRET: some string yo want - API_PORT: 3000 - API_HOST: localhost - API_PROTOCOL: http - POSTGRES_USER: psqluer - POSTGRES_DB: psdb - - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn test:e2e - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: - - ./node_modules \ No newline at end of file +version: 2.1 +workflows: + build_and_test: + jobs: + - build + - + lint: + requires: + - build + - + tests: + requires: + - build + - + db: + requires: + - build From 7a5a383fda56c0e754f94f7bc7da0b8f722b4280 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Thu, 5 Nov 2020 13:18:37 +0100 Subject: [PATCH 21/25] =?UTF-8?q?r=C3=A9indentaions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://onlineyamltools.com/prettify-yaml --- .circleci/config.yml | 144 +++++++++++++++++++++---------------------- 1 file changed, 69 insertions(+), 75 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 927dcb7..552c61e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,81 +1,75 @@ ---- -jobs: - build: - docker: - - - image: "cimg/node:12.18" - steps: +version: 2.1 +workflows: + build_and_test: + jobs: + - build + - lint: + requires: + - build + - tests: + requires: + - build + - database: + require: + - build +jobs: + build: + docker: + - image: cimg/node:14.10.1 + steps: - checkout - - - restore_cache: - key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" - - - run: "yarn global add node-gyp && yarn install" - - - save_cache: - key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" - paths: + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn global add node-gyp && yarn install + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: - ./node_modules - lint: - db: - API_HOST: localhost - API_PORT: 3000 - API_PROTOCOL: http - DATABASE_URL: "postgres://psqluer:psqlpassword@localhost:5432/psdb" - JWT_SECRET: "some string yo want" - POSTGRES_DB: psdb - POSTGRES_USER: psqluer - docker: - - - image: "cimg/node:12.18" - - - image: "circleci/postgres:9.6-alpine" - environment: ~ - docker: - - - image: "cimg/node:12.18" + tests: + docker: + - image: cimg/node:14.10.1 steps: - checkout - - - restore_cache: - key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" - - - run: "yarn test:e2e" - - - save_cache: - key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" - paths: + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn test:ci + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: - ./node_modules - tests: - docker: - - - image: "cimg/node:12.18" - steps: + lint: + docker: + - image: cimg/node:14.10.1 + steps: - checkout - - - restore_cache: - key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" - - - run: "yarn test:ci" - - - save_cache: - key: "yarn-packages-v3{{ checksum \"yarn.lock\" }}" - paths: - - ./node_modules -version: 2.1 -workflows: - build_and_test: - jobs: - - build - - - lint: - requires: - - build - - - tests: - requires: - - build - - - db: - requires: - - build + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn lint && yarn format:check + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules + + database: + - image: circleci/postgres:9.6-alpine + - image: circleci/golang:1.8-jessie + auth: + username: mydockerhub-user + password: $DOCKERHUB_PASSWORD # context / project UI env-var reference + environment: + POSTGRES_USER: psqluer + POSTGRES_DB: psdb + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + steps: + - checkout + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn test:e2e + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules \ No newline at end of file From e4013f56a209868c10ea66b6e493e0f88f71ffe4 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Thu, 5 Nov 2020 13:25:39 +0100 Subject: [PATCH 22/25] Tst indentaion d'un autre file --- .circleci/config.yml | 169 +++++++++++++++++++++++++++---------------- 1 file changed, 106 insertions(+), 63 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 552c61e..d9244f2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,70 +6,113 @@ workflows: - lint: requires: - build - - tests: + - test: requires: - build - - database: - require: + - e2e: + requires: - build + - build_docker: + requires: + - e2e + - lint + - test + filters: + branches: + only: + - main + - publish_image: + context: + - DOCKER + requires: + - build_docker + filters: + branches: + only: + - main jobs: - build: - docker: - - image: cimg/node:14.10.1 - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn global add node-gyp && yarn install - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: - - ./node_modules - tests: - docker: - - image: cimg/node:14.10.1 - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn test:ci - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: - - ./node_modules - lint: - docker: - - image: cimg/node:14.10.1 - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn lint && yarn format:check - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: - - ./node_modules - - database: - - image: circleci/postgres:9.6-alpine - - image: circleci/golang:1.8-jessie - auth: - username: mydockerhub-user - password: $DOCKERHUB_PASSWORD # context / project UI env-var reference - environment: - POSTGRES_USER: psqluer - POSTGRES_DB: psdb - DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb - JWT_SECRET: some string yo want - API_PORT: 3000 - API_HOST: localhost - API_PROTOCOL: http - steps: - - checkout - - restore_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: yarn test:e2e - - save_cache: - key: yarn-packages-v3{{ checksum "yarn.lock" }} - paths: - - ./node_modules \ No newline at end of file + build: + docker: + - image: cimg/node:12.18 + steps: + - checkout + - restore_cache: + key: yarn-packages-v2{{ checksum "yarn.lock" }} + - run: yarn global add node-gyp && yarn install + - save_cache: + key: yarn-packages-v2{{ checksum "yarn.lock" }} + paths: + - ./node_modules + lint: + docker: + - image: cimg/node:12.18 + steps: + - checkout + - restore_cache: + key: yarn-packages-v2{{ checksum "yarn.lock" }} + - run : yarn lint && yarn format:check + test: + docker: + - image: cimg/node:12.18 + steps: + - checkout + - restore_cache: + key: yarn-packages-v2{{ checksum "yarn.lock" }} + - run : yarn test:ci + e2e: + docker: + - image: cimg/node:12.18 + environment: + DATABASE_URL: "postgres://e2e:test@localhost:5432/psdb" + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + JWT_SECRET: yeet + - image: circleci/postgres:9.6.2-alpine + environment: + POSTGRES_USER: e2e + POSTGRES_DB: psdb + POSTGRES_PASSWORD: test + + steps: + - checkout + - restore_cache: + key: yarn-packages-v2{{ checksum "yarn.lock" }} + - run: + name: Waiting for POSTGRES + command: dockerize -wait tcp://localhost:5432 -timeout 1m + - run: + name: Launching e2e test + command: yarn test:e2e + build_docker: + environment: + IMAGE_NAME: sgttabouret/my-awesome-ci-expr + docker: + - image: circleci/buildpack-deps:stretch + steps: + - checkout + - setup_remote_docker + - run: docker image build --tag $IMAGE_NAME:app . + - run: docker save -o image.tar $IMAGE_NAME + - persist_to_workspace: + root: . + paths: + - ./image.tar + publish_image: + environment: + IMAGE_NAME: sgttabouret/my-awesome-ci-expr + docker: + - image: circleci/buildpack-deps:stretch + steps: + - attach_workspace: + at: /tmp/workspace + - setup_remote_docker + - run: docker load -i /tmp/workspace/image.tar + - run: + name: Login and Publish to Docker Hub + command: | + echo "$DOCKERHUB_PASS" | docker login --username sgttabouret --password-stdin + docker tag $IMAGE_NAME:app $IMAGE_NAME:$CIRCLE_BUILD_NUM + docker tag $IMAGE_NAME:app $IMAGE_NAME:latest + docker push $IMAGE_NAME:latest + docker push $IMAGE_NAME:$CIRCLE_BUILD_NUM \ No newline at end of file From e0ff669bb74f30b56a79e9b464049e45a54924b5 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Thu, 5 Nov 2020 13:27:10 +0100 Subject: [PATCH 23/25] key v3 --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d9244f2..7bfdc73 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,10 +37,10 @@ jobs: steps: - checkout - restore_cache: - key: yarn-packages-v2{{ checksum "yarn.lock" }} + key: yarn-packages-v3{{ checksum "yarn.lock" }} - run: yarn global add node-gyp && yarn install - save_cache: - key: yarn-packages-v2{{ checksum "yarn.lock" }} + key: yarn-packages-v3{{ checksum "yarn.lock" }} paths: - ./node_modules lint: @@ -49,7 +49,7 @@ jobs: steps: - checkout - restore_cache: - key: yarn-packages-v2{{ checksum "yarn.lock" }} + key: yarn-packages-v3{{ checksum "yarn.lock" }} - run : yarn lint && yarn format:check test: docker: @@ -57,7 +57,7 @@ jobs: steps: - checkout - restore_cache: - key: yarn-packages-v2{{ checksum "yarn.lock" }} + key: yarn-packages-v3{{ checksum "yarn.lock" }} - run : yarn test:ci e2e: docker: @@ -77,7 +77,7 @@ jobs: steps: - checkout - restore_cache: - key: yarn-packages-v2{{ checksum "yarn.lock" }} + key: yarn-packages-v3{{ checksum "yarn.lock" }} - run: name: Waiting for POSTGRES command: dockerize -wait tcp://localhost:5432 -timeout 1m From 78bb600c3d2fc491c1347e65e694d967583ce87c Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Thu, 5 Nov 2020 13:45:24 +0100 Subject: [PATCH 24/25] db --- .circleci/config.yml | 82 ++++++++++++-------------------------------- 1 file changed, 21 insertions(+), 61 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7bfdc73..ff940f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,30 +6,13 @@ workflows: - lint: requires: - build - - test: + - tests: requires: - build - - e2e: + - db: requires: - build - - build_docker: - requires: - - e2e - - lint - - test - filters: - branches: - only: - - main - - publish_image: - context: - - DOCKER - requires: - - build_docker - filters: - branches: - only: - - main + jobs: build: docker: @@ -43,34 +26,43 @@ jobs: key: yarn-packages-v3{{ checksum "yarn.lock" }} paths: - ./node_modules - lint: + tests: docker: - image: cimg/node:12.18 steps: - checkout - restore_cache: key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run : yarn lint && yarn format:check - test: + - run : yarn test:ci + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules + lint: docker: - image: cimg/node:12.18 steps: - checkout - restore_cache: key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run : yarn test:ci - e2e: + - run : yarn lint && yarn format:check + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules + + db: docker: - image: cimg/node:12.18 environment: - DATABASE_URL: "postgres://e2e:test@localhost:5432/psdb" + DATABASE_URL: "postgres://psqluer:test@localhost:5432/psdb" API_PORT: 3000 API_HOST: localhost API_PROTOCOL: http - JWT_SECRET: yeet + JWT_SECRET: some string yo want - image: circleci/postgres:9.6.2-alpine environment: - POSTGRES_USER: e2e + POSTGRES_USER: psqluer POSTGRES_DB: psdb POSTGRES_PASSWORD: test @@ -83,36 +75,4 @@ jobs: command: dockerize -wait tcp://localhost:5432 -timeout 1m - run: name: Launching e2e test - command: yarn test:e2e - build_docker: - environment: - IMAGE_NAME: sgttabouret/my-awesome-ci-expr - docker: - - image: circleci/buildpack-deps:stretch - steps: - - checkout - - setup_remote_docker - - run: docker image build --tag $IMAGE_NAME:app . - - run: docker save -o image.tar $IMAGE_NAME - - persist_to_workspace: - root: . - paths: - - ./image.tar - publish_image: - environment: - IMAGE_NAME: sgttabouret/my-awesome-ci-expr - docker: - - image: circleci/buildpack-deps:stretch - steps: - - attach_workspace: - at: /tmp/workspace - - setup_remote_docker - - run: docker load -i /tmp/workspace/image.tar - - run: - name: Login and Publish to Docker Hub - command: | - echo "$DOCKERHUB_PASS" | docker login --username sgttabouret --password-stdin - docker tag $IMAGE_NAME:app $IMAGE_NAME:$CIRCLE_BUILD_NUM - docker tag $IMAGE_NAME:app $IMAGE_NAME:latest - docker push $IMAGE_NAME:latest - docker push $IMAGE_NAME:$CIRCLE_BUILD_NUM \ No newline at end of file + command: yarn test:e2e \ No newline at end of file From 98ada5b6e8305060d6b1f0ce3e4b3a728a2ad9b8 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Thu, 5 Nov 2020 13:49:26 +0100 Subject: [PATCH 25/25] suppression dans db --- .circleci/config.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ff940f6..fff7c76 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,16 +63,14 @@ jobs: - image: circleci/postgres:9.6.2-alpine environment: POSTGRES_USER: psqluer - POSTGRES_DB: psdb - POSTGRES_PASSWORD: test - + POSTGRES_DB: psdb steps: - checkout - restore_cache: key: yarn-packages-v3{{ checksum "yarn.lock" }} - - run: - name: Waiting for POSTGRES - command: dockerize -wait tcp://localhost:5432 -timeout 1m - run: - name: Launching e2e test - command: yarn test:e2e \ No newline at end of file + command: yarn test:e2e + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules \ No newline at end of file