jenkinsfile-test-stageslisted
Install: claude install-skill testland/qa
# jenkinsfile-test-stages
## Overview
Jenkins Declarative Pipeline (introduced 2017) is the modern
Jenkinsfile syntax - replaces older Scripted Pipeline for most
use cases.
A Jenkinsfile defines:
- **Pipeline** - top-level container.
- **Agent** - where stages run (any agent / specific node /
Docker container).
- **Stages** - sequential or parallel phases.
- **Steps** - commands within a stage.
- **Post** - actions after stages (always / success / failure /
unstable / changed).
## When to use
- Enterprise / regulated environments using Jenkins.
- Existing Jenkins infrastructure; migration to GitHub
Actions / GitLab CI prohibitive.
- Self-hosted CI / specialized hardware needs (GPU, specialized
drivers).
For new projects in 2026+: GitHub Actions / GitLab CI offer
better managed-runner experiences. Jenkins shines in self-hosted
+ plugin-rich environments.
## How to use
1. Add a `Jenkinsfile` with a `pipeline { agent ...; stages { ... } }`
block; choose `agent any`, a labelled node, or a Docker image
for reproducibility (Steps 1-2).
2. Define `stage('Build')` / `stage('Test')` steps that run your
install + test commands via `sh`.
3. Parallelize independent suites and fan across an OS × runtime
matrix -
[references/parallel-and-matrix.md](references/parallel-and-matrix.md).
4. Add a `post {}` block to publish JUnit XML, archive artifacts,
and notify per outcome -
[references/post-actions.md](references/post-actions.md).
5. Inject `environment