A powerful CLI tool that predicts which GitLab CI jobs will run under different conditions. Perfect for testing pipeline rules without pushing commits!
- Rules Simulation - Test
if/whenconditions locally - YAML Expansion - Resolve anchors, aliases, and
!reference - Regex Support - Validate branch/tag patterns (=~ operator)
- Script Preview - See what commands would execute
# See what would run for a master branch commit
$ ./glps .gitlab-ci.yml CI_COMMIT_BRANCH=master
🚀 Stage: build
✅ Job: build_production
├─ Condition: $CI_COMMIT_BRANCH == "master"
└─ When: always
🚀 Stage: test
✅ Job: unit_tests
├─ Condition: $CI_PIPELINE_SOURCE == "push"
└─ When: on_successGet pre-built binaries from Releases page
git clone https://github.com/sanchezpaco/gitlab-pipeline-simulator
cd gitlab-pipeline-simulator
make build - Simulate Feature Branch Pipeline
./glps ci.yml CI_COMMIT_BRANCH=feat/new-auth CI_DEBUG_TRACE=true
🚀 Stage: quality
✅ Job: eslint
├─ Condition: $CI_COMMIT_BRANCH =~ /^feat\/.*/
└─ When: manual
✅ Job: unittest
├─ Condition: $CI_DEBUG_TRACE == "true"
└─ When: always- Validate Experimental Tag
./glps ci.yml CI_COMMIT_TAG=v1.5.0-experimental
🚀 Stage: test
✅ Job: chaos_test
├─ Condition: $CI_COMMIT_TAG =~ /-experimental$/
└─ When: manual| Flag | Description |
|---|---|
-show-scripts |
Display scripts for matching jobs |
-expand-only |
Output expanded YAML without simulating a pipeline |
-h -help |
Prints CLI options and examples |
Not yet implemented (PRs welcome!):
includestatementsonly/exceptrules- Child/parent pipelines
make test # Run all tests
make build # Generates the binary Contributions are welcomed! Please check:
Star ⭐ the repo if you find this useful!