Skip to content
gohacks.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.

Keep planning

Similar tools