teluzia.Cloud Engineer · Day 111
CHAPTER 16 · CI/CD AND AUTOMATED DEPLOYMENTS

Rollback, validation and Jenkins concepts

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Rollback is choosing a previously verified release, while Jenkins is another workshop that needs the same evidence and access discipline. Define what failure warrants rollback and identify a known previous artifact. Rolling back application code may not reverse database schema changes or external effects. Include compatibility and data recovery decisions rather than assume switching an image guarantees the former behavior is safe. Use bounded readiness checks and a meaningful application request, comparing errors and latency with expectations. Successful command completion is one signal, not final health evidence. A rollback also needs validation and a record of what remains changed, especially for stateful systems.

Think of it this way

Rollback is choosing a previously verified release, while Jenkins is another workshop that needs the same evidence and access discipline.

TOPIC 01 / 03Step by step

Rollback criteria and limits

Define what failure warrants rollback and identify a known previous artifact. Rolling back application code may not reverse database schema changes or external effects. Include compatibility and data recovery decisions rather than assume switching an image guarantees the former behavior is safe. For example, a migration removes a required column; the previous application image may fail even if its rollout succeeds.

WORKED EXAMPLE
A migration removes a required column; the previous application image may fail even if its rollout succeeds.

A release changes both application code and a database schema. The new image fails, so the team considers returning to the previous image. If the migration removed a column that old code requires, switching images can worsen the outage. Rollback planning must separate reversible runtime configuration from irreversible or incompatible data effects.

Rollback restores a selected earlier release state. A migration changes stored data or schema. Compatibility determines whether old and new code can operate against the relevant data layout. Expand-and-contract migrations can support staged transitions, while destructive changes need explicit recovery or forward-fix plans. Preserve prior artifact identity and configuration dependencies. A fallback that was healthy last week is not automatically healthy against today's state. Define rollback criteria before deployment, but permit reasoned forward repair when restoration would violate data integrity or introduce a larger failure.

Why this matters

A migration removes a required column; the previous application image may fail even if its rollout succeeds.

A common trap

Do not overlook this operational distinction: Include compatibility and data recovery decisions rather than assume switching an image guarantees the former behavior is safe.

MAKE IT VISIBLE

Rehearse a release decision

A RELEASE IS A SERIES OF DECISIONS

Can you ship without losing the old version?

This browser simulation shows why tests, plan review, health validation and rollback belong in a pipeline.

1Tests
2Plan review
3Deploy
4Health check
Currently serving: v1

Ready to run

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Rollback criteria and limits

Define what failure warrants rollback and identify a known previous artifact. Rolling back application code may not reverse database schema changes or external effects. Include compatibility and data recovery decisions rather than assume switching an image guarantees the former behavior is safe. For example, a migration removes a required column; the previous application image may fail even if its rollout succeeds.

WORKED EXAMPLE
A migration removes a required column; the previous application image may fail even if its rollout succeeds.

A release changes both application code and a database schema. The new image fails, so the team considers returning to the previous image. If the migration removed a column that old code requires, switching images can worsen the outage. Rollback planning must separate reversible runtime configuration from irreversible or incompatible data effects.

Rollback restores a selected earlier release state. A migration changes stored data or schema. Compatibility determines whether old and new code can operate against the relevant data layout. Expand-and-contract migrations can support staged transitions, while destructive changes need explicit recovery or forward-fix plans. Preserve prior artifact identity and configuration dependencies. A fallback that was healthy last week is not automatically healthy against today's state. Define rollback criteria before deployment, but permit reasoned forward repair when restoration would violate data integrity or introduce a larger failure.

Why this matters

A migration removes a required column; the previous application image may fail even if its rollout succeeds.

A common trap

Do not overlook this operational distinction: Include compatibility and data recovery decisions rather than assume switching an image guarantees the former behavior is safe.

Post-release validation

Use bounded readiness checks and a meaningful application request, comparing errors and latency with expectations. Successful command completion is one signal, not final health evidence. A rollback also needs validation and a record of what remains changed, especially for stateful systems. For example, after switching to the previous digest, verify health, a representative request, and data compatibility within an explicit timeout.

WORKED EXAMPLE
After switching to the previous digest, verify health, a representative request, and data compatibility within an explicit timeout.

After a rollback command completes, inspect rollout readiness, ready endpoints, and a meaningful request that exercises required dependencies. Compare the observed error rate or latency with the expected baseline within a bounded interval. The command's exit is one milestone, not proof of service restoration.

A health signal reports selected behavior. An acceptance criterion defines success for users or operators. A timeout bounds how long the workflow waits before escalation. Readiness can be green while a particular business operation fails, so include a representative transaction that is safe for the practice environment. Record what remains changed, such as a Secret, external configuration, or database migration. A recovery note should identify the exact restored artifact and test evidence. Repeatedly rolling backward through versions without understanding compatibility can increase uncertainty; diagnose the failed boundary and use a known viable recovery candidate.

Why this matters

After switching to the previous digest, verify health, a representative request, and data compatibility within an explicit timeout.

A common trap

Do not overlook this operational distinction: A rollback also needs validation and a record of what remains changed, especially for stateful systems.

Jenkins pipeline concepts

Jenkins organizes automation through jobs or pipeline definitions, agents, stages, credentials, and plugins. Declarative Jenkinsfiles can describe build/test/deploy stages. Unlike managed assumptions, the team must account for controller, agent, plugin, credential, and execution isolation maintenance appropriate to its installation. For example, a Jenkins agent runs tests while credentials are scoped only to a publishing stage on a trusted execution path.

WORKED EXAMPLE
A Jenkins agent runs tests while credentials are scoped only to a publishing stage on a trusted execution path.

A Jenkins controller receives a pipeline request and schedules stages on assigned agents. The agent checks out source, runs tests, builds artifacts, and uses scoped credentials only for selected privileged steps. The controller, agents, plugins, and credential store need operational maintenance appropriate to that installation; a Jenkinsfile does not supply isolation by itself.

A controller coordinates jobs. An agent executes assigned work. A stage groups a pipeline activity such as Test or Publish. Declarative pipeline syntax provides a structured model, while shared libraries and plugins can add behavior and dependencies. Compare trust paths with GitHub Actions rather than only syntax. Untrusted code on a powerful persistent agent can access ambient files or network resources. Pin supported components, patch deliberately, and separate deployment agents from arbitrary contribution tests. A passing Jenkins stage supplies evidence only for its actual commands and preserved failure status.

Why this matters

A Jenkins agent runs tests while credentials are scoped only to a publishing stage on a trusted execution path.

A common trap

Do not overlook this operational distinction: Unlike managed assumptions, the team must account for controller, agent, plugin, credential, and execution isolation maintenance appropriate to its installation.

KEEP THESE WITH YOU

Today’s takeaways

Rollback criteria and limits: Define what failure warrants rollback and identify a known previous artifact. Rolling back application code may not reverse database schema changes or external effects. Include compatibility and data recovery decisions rather than assume switching an image guarantees the former behavior is safe.

Post-release validation: Use bounded readiness checks and a meaningful application request, comparing errors and latency with expectations. Successful command completion is one signal, not final health evidence. A rollback also needs validation and a record of what remains changed, especially for stateful systems.

Jenkins pipeline concepts: Jenkins organizes automation through jobs or pipeline definitions, agents, stages, credentials, and plugins. Declarative Jenkinsfiles can describe build/test/deploy stages. Unlike managed assumptions, the team must account for controller, agent, plugin, credential, and execution isolation maintenance appropriate to its installation.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed