From f61c60a6e119a085c993153b63aaf8cfbd18cebd Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 5 Sep 2024 16:34:37 -0400 Subject: [PATCH 1/7] feat(ci): add .drone.yml pipeline --- examples/with-graphql-mongoose/.drone.yml | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 examples/with-graphql-mongoose/.drone.yml diff --git a/examples/with-graphql-mongoose/.drone.yml b/examples/with-graphql-mongoose/.drone.yml new file mode 100644 index 00000000..499246a6 --- /dev/null +++ b/examples/with-graphql-mongoose/.drone.yml @@ -0,0 +1,43 @@ +kind: pipeline +name: CI - Build + +steps: + - name: CI - Build + image: node:20-alpine + environment: + TURBO_TOKEN: + from_secret: TURBO_TOKEN + TURBO_TEAM: + from_secret: TURBO_TEAM + commands: + - npm ci --legacy-peer-deps + - npm run build + when: + branch: + - development + - staging + - main + + # - name: If failure notification + # image: lesanpi/lark-plugin:send-message-v1 + # environment: + # APP_ID: + # from_secret: LARK_APP_ID + # APP_SECRET: + # from_secret: LARK_APP_SECRET + # RECEIVE_ID: + # from_secret: LARK_CHAT_ID + # RECEIVE_ID_TYPE: 'chat_id' + # CONTENT: '{\"text\": \"❌🔧 Build failure for MEIT \\\n review at [Drone](https://drone.avilatek.com/Avila-Tek/meit) \"}' + # MSG_TYPE: text + # when: + # status: + # - failure + # branch: + # - development + # - staging + # - main + +trigger: + event: + - pull_request From 4b649c2e12a5d496524aa230dec2a76a935491f6 Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 5 Sep 2024 16:35:59 -0400 Subject: [PATCH 2/7] feat(ci): add .drone.yml pipeline --- examples/with-graphql-prisma/.drone.yml | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 examples/with-graphql-prisma/.drone.yml diff --git a/examples/with-graphql-prisma/.drone.yml b/examples/with-graphql-prisma/.drone.yml new file mode 100644 index 00000000..499246a6 --- /dev/null +++ b/examples/with-graphql-prisma/.drone.yml @@ -0,0 +1,43 @@ +kind: pipeline +name: CI - Build + +steps: + - name: CI - Build + image: node:20-alpine + environment: + TURBO_TOKEN: + from_secret: TURBO_TOKEN + TURBO_TEAM: + from_secret: TURBO_TEAM + commands: + - npm ci --legacy-peer-deps + - npm run build + when: + branch: + - development + - staging + - main + + # - name: If failure notification + # image: lesanpi/lark-plugin:send-message-v1 + # environment: + # APP_ID: + # from_secret: LARK_APP_ID + # APP_SECRET: + # from_secret: LARK_APP_SECRET + # RECEIVE_ID: + # from_secret: LARK_CHAT_ID + # RECEIVE_ID_TYPE: 'chat_id' + # CONTENT: '{\"text\": \"❌🔧 Build failure for MEIT \\\n review at [Drone](https://drone.avilatek.com/Avila-Tek/meit) \"}' + # MSG_TYPE: text + # when: + # status: + # - failure + # branch: + # - development + # - staging + # - main + +trigger: + event: + - pull_request From 31f5048150a4a407fb419aba6af9578d6ab5f28e Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 5 Sep 2024 16:39:03 -0400 Subject: [PATCH 3/7] feat(ci): add .drone.yml pipeline --- .drone.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..499246a6 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,43 @@ +kind: pipeline +name: CI - Build + +steps: + - name: CI - Build + image: node:20-alpine + environment: + TURBO_TOKEN: + from_secret: TURBO_TOKEN + TURBO_TEAM: + from_secret: TURBO_TEAM + commands: + - npm ci --legacy-peer-deps + - npm run build + when: + branch: + - development + - staging + - main + + # - name: If failure notification + # image: lesanpi/lark-plugin:send-message-v1 + # environment: + # APP_ID: + # from_secret: LARK_APP_ID + # APP_SECRET: + # from_secret: LARK_APP_SECRET + # RECEIVE_ID: + # from_secret: LARK_CHAT_ID + # RECEIVE_ID_TYPE: 'chat_id' + # CONTENT: '{\"text\": \"❌🔧 Build failure for MEIT \\\n review at [Drone](https://drone.avilatek.com/Avila-Tek/meit) \"}' + # MSG_TYPE: text + # when: + # status: + # - failure + # branch: + # - development + # - staging + # - main + +trigger: + event: + - pull_request From b3b258970dccf0556b0ae2c59d307c03004665b9 Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 5 Sep 2024 16:41:02 -0400 Subject: [PATCH 4/7] feat(ci): add .drone.yml pipeline --- .drone.yml | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 499246a6..00000000 --- a/.drone.yml +++ /dev/null @@ -1,43 +0,0 @@ -kind: pipeline -name: CI - Build - -steps: - - name: CI - Build - image: node:20-alpine - environment: - TURBO_TOKEN: - from_secret: TURBO_TOKEN - TURBO_TEAM: - from_secret: TURBO_TEAM - commands: - - npm ci --legacy-peer-deps - - npm run build - when: - branch: - - development - - staging - - main - - # - name: If failure notification - # image: lesanpi/lark-plugin:send-message-v1 - # environment: - # APP_ID: - # from_secret: LARK_APP_ID - # APP_SECRET: - # from_secret: LARK_APP_SECRET - # RECEIVE_ID: - # from_secret: LARK_CHAT_ID - # RECEIVE_ID_TYPE: 'chat_id' - # CONTENT: '{\"text\": \"❌🔧 Build failure for MEIT \\\n review at [Drone](https://drone.avilatek.com/Avila-Tek/meit) \"}' - # MSG_TYPE: text - # when: - # status: - # - failure - # branch: - # - development - # - staging - # - main - -trigger: - event: - - pull_request From a55ff3cecc5e7cdc18059fd6cc7b9577b6f57635 Mon Sep 17 00:00:00 2001 From: Luis Date: Wed, 11 Sep 2024 16:13:41 -0400 Subject: [PATCH 5/7] feat: .drone.yml for all examples --- examples/with-graphql-mongoose/.drone.yml | 22 +--------------------- examples/with-graphql-prisma/.drone.yml | 23 +---------------------- examples/with-restful-mongoose/.drone.yml | 22 ++++++++++++++++++++++ examples/with-restful-prisma/.drone.yml | 22 ++++++++++++++++++++++ 4 files changed, 46 insertions(+), 43 deletions(-) create mode 100644 examples/with-restful-mongoose/.drone.yml create mode 100644 examples/with-restful-prisma/.drone.yml diff --git a/examples/with-graphql-mongoose/.drone.yml b/examples/with-graphql-mongoose/.drone.yml index 499246a6..59b0eafa 100644 --- a/examples/with-graphql-mongoose/.drone.yml +++ b/examples/with-graphql-mongoose/.drone.yml @@ -3,7 +3,7 @@ name: CI - Build steps: - name: CI - Build - image: node:20-alpine + image: node:22-alpine environment: TURBO_TOKEN: from_secret: TURBO_TOKEN @@ -18,26 +18,6 @@ steps: - staging - main - # - name: If failure notification - # image: lesanpi/lark-plugin:send-message-v1 - # environment: - # APP_ID: - # from_secret: LARK_APP_ID - # APP_SECRET: - # from_secret: LARK_APP_SECRET - # RECEIVE_ID: - # from_secret: LARK_CHAT_ID - # RECEIVE_ID_TYPE: 'chat_id' - # CONTENT: '{\"text\": \"❌🔧 Build failure for MEIT \\\n review at [Drone](https://drone.avilatek.com/Avila-Tek/meit) \"}' - # MSG_TYPE: text - # when: - # status: - # - failure - # branch: - # - development - # - staging - # - main - trigger: event: - pull_request diff --git a/examples/with-graphql-prisma/.drone.yml b/examples/with-graphql-prisma/.drone.yml index 499246a6..ab3980ec 100644 --- a/examples/with-graphql-prisma/.drone.yml +++ b/examples/with-graphql-prisma/.drone.yml @@ -3,7 +3,7 @@ name: CI - Build steps: - name: CI - Build - image: node:20-alpine + image: node:22-alpine environment: TURBO_TOKEN: from_secret: TURBO_TOKEN @@ -17,27 +17,6 @@ steps: - development - staging - main - - # - name: If failure notification - # image: lesanpi/lark-plugin:send-message-v1 - # environment: - # APP_ID: - # from_secret: LARK_APP_ID - # APP_SECRET: - # from_secret: LARK_APP_SECRET - # RECEIVE_ID: - # from_secret: LARK_CHAT_ID - # RECEIVE_ID_TYPE: 'chat_id' - # CONTENT: '{\"text\": \"❌🔧 Build failure for MEIT \\\n review at [Drone](https://drone.avilatek.com/Avila-Tek/meit) \"}' - # MSG_TYPE: text - # when: - # status: - # - failure - # branch: - # - development - # - staging - # - main - trigger: event: - pull_request diff --git a/examples/with-restful-mongoose/.drone.yml b/examples/with-restful-mongoose/.drone.yml new file mode 100644 index 00000000..ab3980ec --- /dev/null +++ b/examples/with-restful-mongoose/.drone.yml @@ -0,0 +1,22 @@ +kind: pipeline +name: CI - Build + +steps: + - name: CI - Build + image: node:22-alpine + environment: + TURBO_TOKEN: + from_secret: TURBO_TOKEN + TURBO_TEAM: + from_secret: TURBO_TEAM + commands: + - npm ci --legacy-peer-deps + - npm run build + when: + branch: + - development + - staging + - main +trigger: + event: + - pull_request diff --git a/examples/with-restful-prisma/.drone.yml b/examples/with-restful-prisma/.drone.yml new file mode 100644 index 00000000..ab3980ec --- /dev/null +++ b/examples/with-restful-prisma/.drone.yml @@ -0,0 +1,22 @@ +kind: pipeline +name: CI - Build + +steps: + - name: CI - Build + image: node:22-alpine + environment: + TURBO_TOKEN: + from_secret: TURBO_TOKEN + TURBO_TEAM: + from_secret: TURBO_TEAM + commands: + - npm ci --legacy-peer-deps + - npm run build + when: + branch: + - development + - staging + - main +trigger: + event: + - pull_request From 526759ea22d89c0f4ec6b930fa23ce355f3f242d Mon Sep 17 00:00:00 2001 From: Luis Date: Tue, 17 Sep 2024 16:36:38 -0400 Subject: [PATCH 6/7] feat(ci): lint, test and multiple node versions --- examples/with-graphql-mongoose/.drone.yml | 28 +++++++++++++++++------ examples/with-graphql-prisma/.drone.yml | 27 +++++++++++++++++----- examples/with-restful-mongoose/.drone.yml | 27 +++++++++++++++++----- examples/with-restful-prisma/.drone.yml | 27 +++++++++++++++++----- 4 files changed, 84 insertions(+), 25 deletions(-) diff --git a/examples/with-graphql-mongoose/.drone.yml b/examples/with-graphql-mongoose/.drone.yml index 59b0eafa..beece043 100644 --- a/examples/with-graphql-mongoose/.drone.yml +++ b/examples/with-graphql-mongoose/.drone.yml @@ -1,23 +1,37 @@ kind: pipeline name: CI - Build +environment: + TURBO_TOKEN: + from_secret: TURBO_TOKEN + TURBO_TEAM: + from_secret: TURBO_TEAM + steps: - - name: CI - Build + - name: CI - Build [node:22] image: node:22-alpine - environment: - TURBO_TOKEN: - from_secret: TURBO_TOKEN - TURBO_TEAM: - from_secret: TURBO_TEAM commands: - npm ci --legacy-peer-deps + - npm run lint - npm run build + - npm run test + when: + branch: + - development + - staging + - main + - name: CI - Build [node:18] + image: node:18-alpine + commands: + - npm ci --legacy-peer-deps + - npm run lint + - npm run build + - npm run test when: branch: - development - staging - main - trigger: event: - pull_request diff --git a/examples/with-graphql-prisma/.drone.yml b/examples/with-graphql-prisma/.drone.yml index ab3980ec..beece043 100644 --- a/examples/with-graphql-prisma/.drone.yml +++ b/examples/with-graphql-prisma/.drone.yml @@ -1,17 +1,32 @@ kind: pipeline name: CI - Build +environment: + TURBO_TOKEN: + from_secret: TURBO_TOKEN + TURBO_TEAM: + from_secret: TURBO_TEAM + steps: - - name: CI - Build + - name: CI - Build [node:22] image: node:22-alpine - environment: - TURBO_TOKEN: - from_secret: TURBO_TOKEN - TURBO_TEAM: - from_secret: TURBO_TEAM commands: - npm ci --legacy-peer-deps + - npm run lint + - npm run build + - npm run test + when: + branch: + - development + - staging + - main + - name: CI - Build [node:18] + image: node:18-alpine + commands: + - npm ci --legacy-peer-deps + - npm run lint - npm run build + - npm run test when: branch: - development diff --git a/examples/with-restful-mongoose/.drone.yml b/examples/with-restful-mongoose/.drone.yml index ab3980ec..beece043 100644 --- a/examples/with-restful-mongoose/.drone.yml +++ b/examples/with-restful-mongoose/.drone.yml @@ -1,17 +1,32 @@ kind: pipeline name: CI - Build +environment: + TURBO_TOKEN: + from_secret: TURBO_TOKEN + TURBO_TEAM: + from_secret: TURBO_TEAM + steps: - - name: CI - Build + - name: CI - Build [node:22] image: node:22-alpine - environment: - TURBO_TOKEN: - from_secret: TURBO_TOKEN - TURBO_TEAM: - from_secret: TURBO_TEAM commands: - npm ci --legacy-peer-deps + - npm run lint + - npm run build + - npm run test + when: + branch: + - development + - staging + - main + - name: CI - Build [node:18] + image: node:18-alpine + commands: + - npm ci --legacy-peer-deps + - npm run lint - npm run build + - npm run test when: branch: - development diff --git a/examples/with-restful-prisma/.drone.yml b/examples/with-restful-prisma/.drone.yml index ab3980ec..beece043 100644 --- a/examples/with-restful-prisma/.drone.yml +++ b/examples/with-restful-prisma/.drone.yml @@ -1,17 +1,32 @@ kind: pipeline name: CI - Build +environment: + TURBO_TOKEN: + from_secret: TURBO_TOKEN + TURBO_TEAM: + from_secret: TURBO_TEAM + steps: - - name: CI - Build + - name: CI - Build [node:22] image: node:22-alpine - environment: - TURBO_TOKEN: - from_secret: TURBO_TOKEN - TURBO_TEAM: - from_secret: TURBO_TEAM commands: - npm ci --legacy-peer-deps + - npm run lint + - npm run build + - npm run test + when: + branch: + - development + - staging + - main + - name: CI - Build [node:18] + image: node:18-alpine + commands: + - npm ci --legacy-peer-deps + - npm run lint - npm run build + - npm run test when: branch: - development From ce98535e225a9dbebbd9afa2289803a95de33670 Mon Sep 17 00:00:00 2001 From: Luis Date: Tue, 17 Sep 2024 17:17:55 -0400 Subject: [PATCH 7/7] refactor: use ci with node20 --- examples/with-graphql-mongoose/.drone.yml | 4 ++-- examples/with-graphql-prisma/.drone.yml | 4 ++-- examples/with-restful-mongoose/.drone.yml | 4 ++-- examples/with-restful-prisma/.drone.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/with-graphql-mongoose/.drone.yml b/examples/with-graphql-mongoose/.drone.yml index beece043..f289ac1c 100644 --- a/examples/with-graphql-mongoose/.drone.yml +++ b/examples/with-graphql-mongoose/.drone.yml @@ -20,8 +20,8 @@ steps: - development - staging - main - - name: CI - Build [node:18] - image: node:18-alpine + - name: CI - Build [node:20] + image: node:20-alpine commands: - npm ci --legacy-peer-deps - npm run lint diff --git a/examples/with-graphql-prisma/.drone.yml b/examples/with-graphql-prisma/.drone.yml index beece043..f289ac1c 100644 --- a/examples/with-graphql-prisma/.drone.yml +++ b/examples/with-graphql-prisma/.drone.yml @@ -20,8 +20,8 @@ steps: - development - staging - main - - name: CI - Build [node:18] - image: node:18-alpine + - name: CI - Build [node:20] + image: node:20-alpine commands: - npm ci --legacy-peer-deps - npm run lint diff --git a/examples/with-restful-mongoose/.drone.yml b/examples/with-restful-mongoose/.drone.yml index beece043..f289ac1c 100644 --- a/examples/with-restful-mongoose/.drone.yml +++ b/examples/with-restful-mongoose/.drone.yml @@ -20,8 +20,8 @@ steps: - development - staging - main - - name: CI - Build [node:18] - image: node:18-alpine + - name: CI - Build [node:20] + image: node:20-alpine commands: - npm ci --legacy-peer-deps - npm run lint diff --git a/examples/with-restful-prisma/.drone.yml b/examples/with-restful-prisma/.drone.yml index beece043..f289ac1c 100644 --- a/examples/with-restful-prisma/.drone.yml +++ b/examples/with-restful-prisma/.drone.yml @@ -20,8 +20,8 @@ steps: - development - staging - main - - name: CI - Build [node:18] - image: node:18-alpine + - name: CI - Build [node:20] + image: node:20-alpine commands: - npm ci --legacy-peer-deps - npm run lint