Last active
March 19, 2025 20:39
-
-
Save marcus-sa/c95d5f24ad7c4ee9f3396c05de2b4894 to your computer and use it in GitHub Desktop.
catalyze api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Cloudflare, | |
CloudflarePages, | |
CloudflareWorkers, | |
} from '@catalyze/cloudflare'; | |
import { DeploymentStage, Pipeline, catalyze } from '@catalyze/core'; | |
import { BuildingStage } from '@catalyze/core/elements/stages/building-stage.js'; | |
const backend = new CloudflareWorkers('backend', {}); | |
const frontend = new CloudflarePages('frontend', {}); | |
const deployCustomers = new Pipeline('deploy', { | |
stages: [ | |
new BuildingStage('build').use(stage => { | |
stage.addStepGroup([backend.build(), frontend.build()]); | |
}), | |
new DeploymentStage('deploy').use(stage => { | |
stage | |
.addStepGroup([backend.deploy(), frontend.deploy()]) | |
.rollbackOnFailure({ self: true }); | |
}), | |
], | |
}); | |
catalyze({ | |
pipelines: [deployCustomers], | |
catalysts: [new Cloudflare({})], | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Cloudflare, | |
CloudflarePages, | |
CloudflareWorkers, | |
} from '@catalyze/cloudflare'; | |
import { DeploymentStage, Pipeline, catalyze } from '@catalyze/core'; | |
import { BuildingStage } from '@catalyze/core/elements/stages/building-stage.js'; | |
const backend = new CloudflareWorkers('backend', {}); | |
const frontend = new CloudflarePages('frontend', {}); | |
const deployCustomers = new Pipeline('deploy').use(pipeline => { | |
pipeline.addStage( | |
new BuildingStage('build').use(stage => { | |
stage.addStepGroup([backend.build(), frontend.build()]); | |
}), | |
); | |
pipeline.addStage( | |
new DeploymentStage('deploy').use(stage => { | |
stage | |
.addStepGroup([backend.deploy(), frontend.deploy()]) | |
.rollbackOnFailure({ self: true }); | |
}), | |
); | |
}); | |
catalyze({ | |
pipelines: [deployCustomers], | |
catalysts: [new Cloudflare({})], | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Cloudflare, | |
CloudflarePages, | |
CloudflareWorkers, | |
} from '@catalyze/cloudflare'; | |
import { DeploymentStage, Pipeline, catalyze } from '@catalyze/core'; | |
import { BuildingStage } from '@catalyze/core/elements/stages/building-stage.js'; | |
const backend = new CloudflareWorkers('backend', {}); | |
const frontend = new CloudflarePages('frontend', {}); | |
const deployCustomers = new Pipeline('deploy').use(pipeline => { | |
pipeline.addStage( | |
new BuildingStage('build').use(stage => { | |
stage.addStepGroup([backend.build(), frontend.build()]); | |
}), | |
); | |
pipeline.stage.deployment('deploy').use(stage => { | |
stage | |
.addStepGroup([backend.deploy(), frontend.deploy()]) | |
.rollbackOnFailure({ self: true }); | |
}); | |
}); | |
catalyze({ | |
pipelines: [deployCustomers], | |
catalysts: [new Cloudflare({})], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment