liveBook · Manning

Continuous deployment

As explained in Learn Docker in a Month of Lunches, Second Edition

Continuous deployment is the practice of automatically packaging and delivering validated software for deployment.

Continuous deployment automates the path from a repository change to validated software delivery. A push triggers a cloud workflow, which provisions a temporary runner, retrieves the code, executes build logic, and then removes the runner. The practical implementation keeps most logic in portable scripts rather than provider-specific workflow actions. section 16.1

A small implementation follows this sequence:

  • Define the workflow in YAML and trigger it from repository changes. section 16.1
  • Run a portable PowerShell build script on an Ubuntu runner. section 16.1
  • Build Docker images and run unit tests as part of the build. section 16.1
  • Stop the workflow when a test fails, preventing an invalid build from continuing. section 16.1

A minimal GitHub Actions workflow

The workflow checks out the repository and runs the build script from the cicd directory using PowerShell: `jobs: build: runs-on: ubuntu-latest; steps: - uses: actions/checkout@master; - name: build; working-directory: cicd; run: ./build.ps1; shell: pwsh`. Committing and pushing this file triggers the cloud build. section 16.1

# check your dependencies are available:
git version
pwsh -version
# launch PowerShell:
pwsh
# and make sure your Docker setup is using Linux containers:
$info = docker version -f json | ConvertFrom-Json
echo "Platform: $($info.Server.Os)/$($info.Server.Arch)"

Verify Git, PowerShell, and Docker before running the workflow exercises; the commands also confirm that Docker uses Linux containers. section 16.1

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Explains runners, YAML workflows, portable scripts, Docker builds, and test failures, but stops short of deployment-target configuration.
Examples
Uses a PowerShell build script, a GitHub workflow, multi-stage Docker tests, and a deliberately failing test.
What it assumes
Assumes a GitHub account and Git client while requiring learners to install PowerShell 7+ and optionally GitHub CLI and Docker.
What you can do after
Build it from scratch: configure a GitHub Actions workflow that runs portable build and test scripts after pushes.
How it connects
Connects CI/CD with GitHub Actions, Docker, PowerShell, multi-stage builds, and unit testing.

Also explained in

Compare how 6 books explain continuous deployment →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.