Basic

The build answers with a report

A build that says only that it finished is a build that cannot be argued with. The report is the numbers, and the numbers are the claim.

What you will see

deploy allowed. Zero refusals is the accepted claim.

About 1 min of reading

Try It

Write a report and gate

1

Write the counts

printf 'read 12 written 12 links 40 refusals 0\n' > /tmp/r.txt; cat /tmp/r.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One line with four numbers. Four numbers is the claim.
2

Write a refusal report

printf 'read 12 written 11 refusals 1 name=/d/\n' >> /tmp/r.txt; tail -1 /tmp/r.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One line with a name. Written on refusal is what makes it readable.
3

Gate the deploy

printf 'refusals 0\n' | awk '{print ($2==0) ? "deploy allowed" : "deploy refused"}'

Before you run it, say out loud what it will print. Then open the answer.

What it prints
deploy allowed. Zero refusals is the accepted claim.

Data Flow

A build to a report
1 The counts are collected during the build
↓
2 Refusals are written with their names
↓
3 The report is written even on refusal
↓
4 The gate reads the refusal count
Why this works
Why the report is a file

A file is kept. A kept report is a report a later change is compared against.

The one number that must be zero

The refusals. Zero is the accepted claim, and zero is what the gate checks.

Examples

The report has counts

Pages read, pages written, links checked, refusals. Four numbers, and four numbers is a claim.

A refusal is in the report

The report is written even when the build refuses. Written on refusal is what makes a failure readable.

The report gates the deploy

A report with a refusal does not deploy. The gate is the same shape as every other gate in this site.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← Links between pages as a graph
Previous Lesson
Links between pages as a graph
Next Lesson
Assets with a version in the name
Assets with a version in the name →