Jenkins

Jenkins Practice

Learn Jenkins by building real pipelines with stages, agents, parameters, conditions, parallel execution, and matrix builds, graded on actual build results.

linux-cliLinux CLI
Module 1

Pipeline Structure & Docker Agents

Write your first Jenkinsfile: stages and steps, the order they run in, and why a failing stage stops the build. Then give each stage its own Docker agent pinned to an exact image, because the Jenkins server has no toolchain of its own.

3
About this challenge

Rewrite a one-block Jenkins pipeline as three ordered declarative stages so a failing command stops the build where it failed instead of letting the next command overwrite good output.

About this challenge

Move a Jenkins pipeline off the built-in node by giving each stage its own Docker agent on an exactly pinned image, with the agent arguments the stage needs.

About this challenge

Write a Jenkins declarative pipeline from nothing: three ordered stages, each on its own exactly pinned Docker agent with no global agent, so the build stops at the first stage that fails.

Module 2

Environment & Parameters

Stop editing the pipeline to change what it builds. Declare values once in an environment block, override one for a single stage, read a value from a command at run time, and turn the rest into build parameters - a string, a choice and a checkbox that decides whether a stage runs at all.

3
About this challenge

Replace values repeated by hand in every shell command with a layered Jenkins environment: declared once at pipeline level, overridden on the one stage that needs a different value, and one value derived from a command at run time.

About this challenge

Turn a Jenkins pipeline that is edited and committed for every release into one that takes a string, a choice and a boolean parameter, where the boolean decides whether a whole stage runs.

About this challenge

Collapse four drifted copies of a Jenkins pipeline into one configurable pipeline: declared parameters with defaults, layered pipeline and stage environment blocks, a value derived from a command at run time, and an optional stage driven by a parameter.

Module 3 · Coming soon

Conditional Stages & Post Conditions

Make the pipeline decide. Gate the slow stages with when - on a parameter, on an environment value, and on a combination of the two - keep a gated stage from starting a container it will not use, and add post conditions that clean up after every build, including the ones that failed.

0
Module 4 · Coming soon

Parallel & Matrix

Stop waiting. Run independent suites as parallel branches of one stage and decide whether a failing branch cancels its siblings, then declare a matrix over two axes with an exclusion so every runtime and scope is verified in its own container, and build the whole grid in one pipeline.

0
Module 5 · Coming soon

Artifacts, Stash & Test Reporting

Keep what the build produced. Hand files from one stage to the next with stash and unstash, archive the release as a build artifact, and publish a JUnit report so a failing suite turns the build unstable instead of silently red.

0
Module 6 · Coming soon

Resilience & Scripted Control

Pipelines meet the real world. Bound a hanging stage with a timeout, retry a flaky one, compute a decision in a script block, and use catchError so one failure marks the stage without throwing the whole build away.

0
Module 7 · Coming soon

Image Build & Registry Release

Ship an image. Build it from the project's own Dockerfile inside the pipeline, tag it, push it to a registry, and verify the release by the digest the registry returned - the capstone that composes every earlier layer.

0

Frequently asked questions

4

What will I practice in this path?

2 modules: Pipeline Structure & Docker Agents and Environment & Parameters. More modules are on the way.

How many challenges are there, and how hard are they?

6 challenges, all easy.

What does this path run on?

Challenges run on Linux CLI.

Do I need to install anything?

No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.