Skip to content
rusthacks.dev
DevOps

GitLab CI Pipeline Generator

Generate a .gitlab-ci.yml with a test job keyed to your lock file's cache, a Docker image build pushed to the GitLab registry and an optional manual deploy over SSH.

Free · No sign-up · Your inputs stay in your browser

Input

Generate a .gitlab-ci.yml pipeline

Output

.gitlab-ci.yml

747 characters

rules: replace only/except. Caches are keyed on the lock file, so a dependency change starts a fresh cache instead of restoring a stale one. Put SSH_PRIVATE_KEY in Settings > CI/CD > Variables as a protected, masked variable, so it is only exposed to protected branches.

Runs in this browser. Nothing you paste is sent to a server.

rules, not only/except

rules: replaced only and except and can combine conditions on the pipeline source, branch and changed files. Running tests on merge request pipelines and the default branch avoids duplicate pipelines for the same commit. See the CI/CD YAML reference.

Secrets

Store SSH_PRIVATE_KEY and registry tokens under Settings, CI/CD, Variables as protected and masked: protected variables are only exposed to pipelines on protected branches and tags, so a merge request from a fork cannot read them.

Share

Frequently asked questions

Why key the cache on the lock file?
A cache keyed on package-lock.json or composer.lock is reused until dependencies change and then rebuilt, instead of restoring a stale set of packages.
Do I need Docker-in-Docker to build images?
With the docker executor, either Docker-in-Docker as here or a rootless builder such as Kaniko or BuildKit. Shell runners can use the host's Docker directly.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Go deeper

Suggested reading

Editor's pick
Flat illustration for the post “An Axum Service You Can Run in Production From Zero”, composed around deploy.
WebGuide

An Axum Service You Can Run in Production From Zero

Build a small Axum 0.8 service from an empty crate to something you can deploy: a testable router, one error type, limits and timeouts, tracing, oneshot tests and graceful shutdown on SIGTERM.

17 min read
Flat illustration for the post “Axum Integration Tests With a Real Database in Docker”, composed around web.
WebGuide

Axum Integration Tests With a Real Database in Docker

Test an Axum API against a real Postgres started by Testcontainers: one container per test binary, one migrated database per test, the leaks and version traps that bite, and measured timings for each isolation strategy.

18 min read

Keep planning

Similar tools