diff options
| -rwxr-xr-x | .ci/ci.cjs | 27 | ||||
| -rw-r--r-- | .ci/ci.ts | 44 | ||||
| -rw-r--r-- | .ci/package-lock.json | 2 | ||||
| -rw-r--r-- | model/package.json | 2 |
4 files changed, 54 insertions, 21 deletions
@@ -4978,7 +4978,8 @@ var JobTypes = [ "build_docker_image.js", "ansible_playbook.js", "checkout_ci.js", - "npm_publish.js" + "npm_publish.js", + "coolify_webhook.js" ]; var isJobType = (j) => typeof j === "string" && JobTypes.includes(j); var isJob = (j) => !!((0, import_pengueno.isObject)(j) && "arguments" in j && (0, import_pengueno.isObject)(j.arguments) && "type" in j && isJobType(j.type) && j); @@ -5098,6 +5099,30 @@ var getPipeline = () => { if (!isRelease) { return gitHookPipeline.build(); } + const publishModel = { + type: "npm_publish.js", + arguments: { + source: "ci/model", + registry: "registry.npmjs.org" + } + }; + const deployWorker = { + type: "coolify_webhook.js", + arguments: { + webhookUrl: "https://plane.liz.coffee/api/v1/deploy?uuid=lg8400808cwo480wo4g44swg&force=false" + } + }; + const deployServer = { + type: "coolify_webhook.js", + arguments: { + webhookUrl: "https://plane.liz.coffee/api/v1/deploy?uuid=gwsc0g8co84cwowggo8w4k0c&force=false" + } + }; + gitHookPipeline.addStage({ parallelJobs: [ + publishModel, + deployServer, + deployWorker + ] }); return gitHookPipeline.build(); }; var main = () => { @@ -4,7 +4,9 @@ import { AnsiblePlaybookJob, BuildDockerImageJob, DefaultGitHookPipelineBuilder, + NpmPublishJob, FetchCodeJob, + CoolifyWebhookJob, Job, } from '@emprespresso/ci_model'; import { join } from 'path'; @@ -70,24 +72,30 @@ const getPipeline = () => { return gitHookPipeline.build(); } -// const fetchAnsibleCode: FetchCodeJob = { -// type: 'fetch_code', -// arguments: { -// remoteUrl: `${REMOTE}/infra`, -// checkout: 'main', -// path: 'infra', -// }, -// }; -// const thenDeploy: AnsiblePlaybookJob = { -// type: 'ansible_playbook.js', -// arguments: { -// path: 'infra', -// playbooks: 'playbooks/ci.yml', -// }, -// }; -// [fetchAnsibleCode, thenDeploy].forEach((deploymentStage) => -// gitHookPipeline.addStage({ parallelJobs: [deploymentStage] }), -// ); + const publishModel: NpmPublishJob = { + type: 'npm_publish.js', + arguments: { + source: 'ci/model', + registry: 'registry.npmjs.org', + }, + }; + const deployWorker: CoolifyWebhookJob = { + type: 'coolify_webhook.js', + arguments: { + webhookUrl: 'https://plane.liz.coffee/api/v1/deploy?uuid=lg8400808cwo480wo4g44swg&force=false', + }, + }; + const deployServer: CoolifyWebhookJob = { + type: 'coolify_webhook.js', + arguments: { + webhookUrl: 'https://plane.liz.coffee/api/v1/deploy?uuid=gwsc0g8co84cwowggo8w4k0c&force=false' + }, + }; + gitHookPipeline.addStage({ parallelJobs: [ + publishModel, + deployServer, + deployWorker, + ] }); return gitHookPipeline.build(); }; diff --git a/.ci/package-lock.json b/.ci/package-lock.json index 5521157..f07781d 100644 --- a/.ci/package-lock.json +++ b/.ci/package-lock.json @@ -13,7 +13,7 @@ }, "../model": { "name": "@emprespresso/ci_model", - "version": "0.1.0", + "version": "0.2.0", "dependencies": { "@emprespresso/pengueno": "^0.0.13" } diff --git a/model/package.json b/model/package.json index e507bfd..7ff6215 100644 --- a/model/package.json +++ b/model/package.json @@ -1,6 +1,6 @@ { "name": "@emprespresso/ci_model", - "version": "0.1.0", + "version": "0.2.0", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", |
