Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

Packaging and CI/CD pipelines

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

50 minutes

Friday, 5 pm, release time

A team has to release by hand. They copy files. They run tests, if they remember. They upload.

Today they forget one file. The app breaks for all users. Everyone goes home late.

A good team does not do this by hand. A machine does it the same way every time.

Key words

WordWhat it meansExample
Front endThe part the user sees and touches. It runs in the browser or app.HTML, CSS, JavaScript
Back endThe part that runs on a server. It holds the rules and the data.Python, a database
PackagePutting all the files of a product together so it can be installed or run.
FrameworkReady-made code with a standard structure that you build your app inside.
ExecutableOne file that a computer can run directly.game.exe
Continuous integrationEvery change is joined to the main code and checked at once. Short name: CI.
Continuous deploymentA change that passes all checks goes live by itself. Short name: CD.
PipelineA line of automatic steps that every change goes through.
CompileTurn code you write into code the computer can run.
AutomationA machine does the job by itself, the same way every time.
DatabaseAn organised store of data that programs can search and change.
BuildTurning source code into something that can run.
Unit testA small test of one part of the code.

The cells students fill in are left blank in this preview.

Many files, one product

A product has a front end and a back end. The front end may be HTML, CSS and a framework (ready-made code).

The back end may be Python and a database.

To give it to users you package it: you put every file in the right place. You can also compile the code and join it into one executable file.

The user does not want ten files and a list of steps. They want one thing that works.

Quick check: packaging

Have a go

Quick check: packaging

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Ways to package

WayWhat the user getsExample
Web productA web address. The files sit on a serverHTML, CSS and JavaScript served with a Python back end
Compiled executableOne file. The code is compiled and joined into itA game you install on a PC
InstallerA file that puts everything in placeA setup file for a desktop app
ContainerA box with the program and what it needsA back end that runs on any server

The cells students fill in are left blank in this preview.

CI and CD

Continuous integration (CI): every time a developer saves a change, a machine joins it to the main code, builds it and tests it.

Continuous deployment (CD): if all checks pass, the change goes live by itself.

The line of automatic steps is a pipeline. A bad change stops in the pipeline. Users never see it.

What each stage does

StageJobExample tool
Source code controlKeeps the code and starts the pipeline on every pushGit, Gitea, GitHub
Build automationMakes the program from the codeGitHub Actions, Jenkins, Maven
Unit test automationRuns every test. Stops if one failspytest, JUnit
Deployment automationPuts the new version live, the same way each timeDocker, a deploy script
MonitoringWatches the live product and sends an alert on a problemLogs, uptime checks, dashboards

The cells students fill in are left blank in this preview.

The lesson goes on

5 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.