A ready-to-use CI/CD Pipeline for your Node.js projects.
Run the following command:
fluentci run nodejs_pipelineOr, if you want to use it as a template:
fluentci init -t nodejsThis will create a .fluentci folder in your project.
Now you can run the pipeline with:
fluentci run .Or simply:
fluentciUse as a Dagger module:
dagger install github.com/fluent-ci-templates/nodejs-pipeline@mainCall a function from the module:
dagger -m github.com/fluent-ci-templates/nodejs-pipeline@main call \
test --src .
dagger -m github.com/fluent-ci-templates/nodejs-pipeline@main call \
build --src .| Variable | Description | Default |
|---|---|---|
| NODE_VERSION | Node version to use | 18.16.1 |
| PACKAGE_MANAGER | Package manager to use (npm, yarn, pnpm) | npm |
| Job | Description |
|---|---|
| build | Build the project |
| install | Install dependencies |
| test | Run the tests |
| run | Run a custom task |
test(
src: Directory | string | undefined = ".",
packageManager?: string,
nodeVersion?: string
): Promise<string>
build(
src: Directory | string | undefined = ".",
packageManager?: string,
nodeVersion?: string
): Promise<Directory | string>
run(
src: Directory | string | undefined = ".",
task: string,
packageManager?: string,
nodeVersion?: string
): Promise<string>
install(
src: Directory | string | undefined = ".",
packageManager?: string,
nodeVersion?: string
): Promise<Container | string>
dev(
src: Directory | string | undefined = ".",
packageManager?: string,
nodeVersion?: string
): Promise<Container | string>You can also use this pipeline programmatically:
import { test, build } from "jsr:@fluentci/nodejs";
await test();
await build();