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

Week 16 review, recall and recovery

30–90 min including independent practice6 topicsRecall, catch-up, or rest
LET’S MAKE THIS SIMPLE

What you’re learning today

Design and break a release pipeline without cloud credentials. Draft trigger, runner, tests, artifact identity, environment gate, OIDC trust, registry publication, deployment validation, and rollback record. Compare a GitHub Actions pipeline with a Jenkinsfile and identify runner/agent trust and credential boundaries. Treat the review as a short evidence-based check: use the existing local lab or paper design, record which outcomes you actually reproduced, and repair one named gap before adding more complexity. Do not create extra billable resources just to prove recall.

Think of it this way

A weekly review is a recovery drill: demonstrate the system, inject one controlled mistake, and explain the evidence that proves repair.

TOPIC 01 / 06Step by step

Workflow events and YAML

A workflow YAML file under .github/workflows defines triggers, jobs, and steps. Event selection determines which code and context run. Push, pull_request, workflow_dispatch, and other triggers have different security implications; valid YAML alone does not establish the intended workflow semantics. For example, a pull_request workflow runs tests while a separately controlled release workflow performs deployment.

WORKED EXAMPLE
A pull_request workflow runs tests while a separately controlled release workflow performs deployment.
Why this matters

A pull_request workflow runs tests while a separately controlled release workflow performs deployment.

A common trap

Do not overlook this operational distinction: Push, pull_request, workflow_dispatch, and other triggers have different security implications; valid YAML alone does not establish the intended workflow semantics.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Workflow events and YAML

A workflow YAML file under .github/workflows defines triggers, jobs, and steps. Event selection determines which code and context run. Push, pull_request, workflow_dispatch, and other triggers have different security implications; valid YAML alone does not establish the intended workflow semantics. For example, a pull_request workflow runs tests while a separately controlled release workflow performs deployment.

WORKED EXAMPLE
A pull_request workflow runs tests while a separately controlled release workflow performs deployment.

Why this matters

A pull_request workflow runs tests while a separately controlled release workflow performs deployment.

A common trap

Do not overlook this operational distinction: Push, pull_request, workflow_dispatch, and other triggers have different security implications; valid YAML alone does not establish the intended workflow semantics.

Build reproducibility

Build from a defined checkout with controlled toolchain and dependencies. Record revision and artifact identity. A fresh runner helps expose accidental reliance on local files, but downloads and mutable dependencies still require control. The build’s success indicates artifact creation, not all functional correctness. For example, a Python package build records the commit SHA and dependency lock input used by the job.

WORKED EXAMPLE
A Python package build records the commit SHA and dependency lock input used by the job.

Why this matters

A Python package build records the commit SHA and dependency lock input used by the job.

A common trap

Do not overlook this operational distinction: The build’s success indicates artifact creation, not all functional correctness.

Secrets and ordinary variables

GitHub Actions secrets hold sensitive values with access rules and masking behavior; configuration variables are nonsecret settings. Masking is not a guarantee against transformed leakage. Do not echo secrets, place them in artifacts, or pass untrusted input into shell commands unsafely. For example, a nonsecret region is a variable; a credential, if unavoidable, belongs in a protected secret rather than YAML text.

WORKED EXAMPLE
A nonsecret region is a variable; a credential, if unavoidable, belongs in a protected secret rather than YAML text.

Why this matters

A nonsecret region is a variable; a credential, if unavoidable, belongs in a protected secret rather than YAML text.

A common trap

Do not overlook this operational distinction: Do not echo secrets, place them in artifacts, or pass untrusted input into shell commands unsafely.

Token issuance and role exchange

GitHub can issue an OIDC token to a job with id-token: write permission. The AWS role must trust the GitHub provider for sts:AssumeRoleWithWebIdentity. AWS credentials are a separate resulting session. Token-request permission itself grants no AWS resource actions. For example, a job requests a GitHub JWT, then a reviewed configure-aws-credentials action exchanges it for an AWS role session.

WORKED EXAMPLE
A job requests a GitHub JWT, then a reviewed configure-aws-credentials action exchanges it for an AWS role session.

Why this matters

A job requests a GitHub JWT, then a reviewed configure-aws-credentials action exchanges it for an AWS role session.

A common trap

Do not overlook this operational distinction: Token-request permission itself grants no AWS resource actions.

Build and test gates

Run required checks before publication and deployment. Tie each stage to source revision and artifact identity. Separate credential-free checks from privileged publishing jobs where practical. A pipeline diagram should state precisely what is tested and which failures stop advancement. For example, the build job produces image digest X after tests; the publish job records X and deploy uses X.

WORKED EXAMPLE
The build job produces image digest X after tests; the publish job records X and deploy uses X.

Why this matters

The build job produces image digest X after tests; the publish job records X and deploy uses X.

A common trap

Do not overlook this operational distinction: A pipeline diagram should state precisely what is tested and which failures stop advancement.

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.

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.

KEEP THESE WITH YOU

Today’s takeaways

Workflow events and YAML: A workflow YAML file under .github/workflows defines triggers, jobs, and steps. Event selection determines which code and context run. Push, pull_request, workflow_dispatch, and other triggers have different security implications; valid YAML alone does not establish the intended workflow semantics.

Build reproducibility: Build from a defined checkout with controlled toolchain and dependencies. Record revision and artifact identity. A fresh runner helps expose accidental reliance on local files, but downloads and mutable dependencies still require control. The build’s success indicates artifact creation, not all functional correctness.

Secrets and ordinary variables: GitHub Actions secrets hold sensitive values with access rules and masking behavior; configuration variables are nonsecret settings. Masking is not a guarantee against transformed leakage. Do not echo secrets, place them in artifacts, or pass untrusted input into shell commands unsafely.

Token issuance and role exchange: GitHub can issue an OIDC token to a job with id-token: write permission. The AWS role must trust the GitHub provider for sts:AssumeRoleWithWebIdentity. AWS credentials are a separate resulting session. Token-request permission itself grants no AWS resource actions.

Build and test gates: Run required checks before publication and deployment. Tie each stage to source revision and artifact identity. Separate credential-free checks from privileged publishing jobs where practical. A pipeline diagram should state precisely what is tested and which failures stop advancement.

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.

CLOSE THE LOOP

Ready to complete this day?

Verify your recall or recovery steps, then finish this review day.

Lab steps verifiedReview day: quiz optional