Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsirysndr/fluent-gitlab-ci
Generate GitLab CI configuration file (.gitlab-ci.yml) from a simple declarative syntax in typescript 🛠️ 💻 ✨
https://github.com/tsirysndr/fluent-gitlab-ci
deno deno-module devops gitlab-ci pipeline
Last synced: 3 months ago
JSON representation
Generate GitLab CI configuration file (.gitlab-ci.yml) from a simple declarative syntax in typescript 🛠️ 💻 ✨
- Host: GitHub
- URL: https://github.com/tsirysndr/fluent-gitlab-ci
- Owner: tsirysndr
- License: mit
- Created: 2023-06-28T10:40:28.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-29T21:40:09.000Z (12 months ago)
- Last Synced: 2024-11-14T00:07:15.776Z (3 months ago)
- Topics: deno, deno-module, devops, gitlab-ci, pipeline
- Language: TypeScript
- Homepage:
- Size: 145 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Fluent GitLab CI
[![deno module](https://shield.deno.dev/x/fluent_gitlab_ci)](https://deno.land/x/fluent_gitlab_ci)
![deno compatibility](https://shield.deno.dev/deno/^1.34)
[![](https://img.shields.io/codecov/c/gh/tsirysndr/fluent-gitlab-ci)](https://codecov.io/gh/tsirysndr/fluent-gitlab-ci)Fluent GitLab CI is a deno module for generating GitLab CI configuration files easily and fluently.
## 🚀 Usage
```ts
import { GitlabCI, Job } from "https://deno.land/x/fluent_gitlab_ci/mod.ts";const build = new Job().stage("build").script(`
echo "Compiling the code..."
echo "Compile complete."
`);const unitTest = new Job().stage("test").script(`
echo "Running unit tests... This will take about 60 seconds."
sleep 60
echo "Code coverage is 90%"
`);const lint = new Job().stage("test").script(`
echo "Linting code... This will take about 10 seconds."
sleep 10
echo "No lint issues found."
`);const deploy = new Job().stage("deploy").script(`
echo "Deploying application..."
echo "Application successfully deployed."
`);const gitlabci = new GitlabCI()
.stages(["build", "test", "deploy"])
.addJob("build-job", build)
.addJob("unit-test-job", unitTest)
.addJob("lint-test-job", lint)
.addJob("deploy-job", deploy);console.log(gitlabci.toString());
gitlabci.write();
```See [examples](./examples) for more details.