From e7654afdad12f11055659b42994ab4cee6888dbc Mon Sep 17 00:00:00 2001 From: Vladimir Zhelvis Date: Thu, 29 Aug 2024 17:23:09 +0300 Subject: [PATCH] AG-35244 Add mock plans for dnr-rulesets auto deploy Merge in ADGUARD-FILTERS/tsurlfilter from feature/AG-35244-1 to master Squashed commit of the following: commit 3b7fcde0d067e685aeeb440a971f21492618b715 Merge: 299657b3 80b3307e Author: Vladimir Zhelvis Date: Thu Aug 29 17:21:08 2024 +0300 Merge branch 'master' into feature/AG-35244-1 commit 299657b307db99f56a400d367199a3b6d541c2a8 Author: Vladimir Zhelvis Date: Thu Aug 29 16:43:32 2024 +0300 simplify mock plan commit 7adb2b58eb538249fe152d7ebde5ad92a7ad0112 Author: Vladimir Zhelvis Date: Thu Aug 29 16:23:33 2024 +0300 add cron comment commit bab749672cd2d2f1fda1be8ada7c6cfbff615075 Author: Vladimir Zhelvis Date: Thu Aug 29 12:56:28 2024 +0300 revert optional artifact commit a7adfc8745a66028c9b60dd401da6cfb9fca91a4 Author: Vladimir Zhelvis Date: Thu Aug 29 12:54:45 2024 +0300 optional artifact commit 63c5af55775484081771178c96f9a523d4e692c6 Author: Vladimir Zhelvis Date: Thu Aug 29 12:38:12 2024 +0300 fix commit 65e52d503724f75ec87d3305db8b31768a8766c8 Author: Vladimir Zhelvis Date: Thu Aug 29 12:35:30 2024 +0300 fix autobuild plan commit a9db2518de0d4c22eef8fcd9488619ad2f54650a Author: Vladimir Zhelvis Date: Wed Aug 28 19:03:50 2024 +0300 change import order commit 5c6f25fc92cfd740d322bdb04caff14811edb005 Author: Vladimir Zhelvis Date: Wed Aug 28 18:57:17 2024 +0300 add mock plans for dnr-rulesets auto deploy --- bamboo-specs/bamboo.yaml | 9 +++++ bamboo-specs/dnr-rulesets-auto-build.yaml | 20 +++++++++++ .../dnr-rulesets-auto-deploy-permissions.yaml | 16 +++++++++ bamboo-specs/dnr-rulesets-auto-deploy.yaml | 33 +++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 bamboo-specs/dnr-rulesets-auto-build.yaml create mode 100644 bamboo-specs/dnr-rulesets-auto-deploy-permissions.yaml create mode 100644 bamboo-specs/dnr-rulesets-auto-deploy.yaml diff --git a/bamboo-specs/bamboo.yaml b/bamboo-specs/bamboo.yaml index ca577fb61..2ba546b40 100644 --- a/bamboo-specs/bamboo.yaml +++ b/bamboo-specs/bamboo.yaml @@ -118,5 +118,14 @@ --- !include 'dnr-rulesets-permissions.yaml' +--- +!include 'dnr-rulesets-auto-build.yaml' + +--- +!include 'dnr-rulesets-auto-deploy.yaml' + +--- +!include 'dnr-rulesets-auto-deploy-permissions.yaml' + --- !include 'examples-adguard-api-mv3-tests.yaml' \ No newline at end of file diff --git a/bamboo-specs/dnr-rulesets-auto-build.yaml b/bamboo-specs/dnr-rulesets-auto-build.yaml new file mode 100644 index 000000000..3d18d41c1 --- /dev/null +++ b/bamboo-specs/dnr-rulesets-auto-build.yaml @@ -0,0 +1,20 @@ +--- +version: 2 +plan: + project-key: AJL + key: DNRRULESETSAUTOBUILD + name: DNR Rulesets - auto build +stages: + - Build: + - Build + +Build: + tasks: + - script: + - echo 'Task run successfully!' + artifacts: + - name: dnr-rulesets.tgz + location: packages/dnr-rulesets/ + pattern: dnr-rulesets.tgz + shared: true + required: true \ No newline at end of file diff --git a/bamboo-specs/dnr-rulesets-auto-deploy-permissions.yaml b/bamboo-specs/dnr-rulesets-auto-deploy-permissions.yaml new file mode 100644 index 000000000..072e96f64 --- /dev/null +++ b/bamboo-specs/dnr-rulesets-auto-deploy-permissions.yaml @@ -0,0 +1,16 @@ +--- +version: 2 +deployment: + name: DNR Rulesets - auto deploy +deployment-permissions: + - groups: + - extensions-developers + permissions: + - view +environment-permissions: + - npmjs: + - groups: + - extensions-developers + permissions: + - view + - deploy \ No newline at end of file diff --git a/bamboo-specs/dnr-rulesets-auto-deploy.yaml b/bamboo-specs/dnr-rulesets-auto-deploy.yaml new file mode 100644 index 000000000..45f79130d --- /dev/null +++ b/bamboo-specs/dnr-rulesets-auto-deploy.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +deployment: + name: DNR Rulesets - auto deploy + source-plan: AJL-DNRRULESETSAUTOBUILD +release-naming: ${bamboo.inject.version} +environments: + - npmjs + +npmjs: + docker: + image: adguard/node-ssh:18.19--0 + volumes: + ${system.PNPM_DIR}: "${bamboo.cachePnpm}" + triggers: + - build-success + tasks: + - checkout: + force-clean-build: 'true' + - artifact-download: + artifacts: + - name: dnr-rulesets.tgz + - script: + - echo 'Task run successfully!' + requirements: + - adg-docker: 'true' + notifications: + - events: + - deployment-started-and-finished + recipients: + - webhook: + name: Deploy webhook + url: http://prod.jirahub.service.eu.consul/v1/webhook/bamboo