Advanced

Deploying gated by the report

The build answers and the deploy reads. The report is between them, and the report is why a deploy is a decision about numbers.

What you will see

0. The deploy runs no build, which is one answer.

About 1 min of reading

Try It

Gate a deploy with a written limit

1

Write the limit

printf 'max_refusals 0\n' > /tmp/l.txt; cat /tmp/l.txt

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

What it prints
One line with a limit. A written limit is a nameable limit.
2

Read the report

printf 'refusals 2\nmax_refusals 0\n' | awk '{print ($1>=$3) ? "refuse names 2 and 0" : "deploy"}'

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

What it prints
refuse names 2 and 0. Two numbers is actionable.
3

Prove the build is not run twice

printf 'build 1 deploy 0\n' | awk '{print $4}'

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

What it prints
0. The deploy runs no build, which is one answer.

Data Flow

A report to a deploy or a refusal
1 The build writes the report
↓
2 The gate reads the refusal count
↓
3 The limit is read from one file
↓
4 A refusal names the count and the limit
Why this works
Why the deploy never runs the build

The build already answered. Running again is a second answer, and a second answer is a different site.

The one thing the gate does not check

The size of the site. Size is a different limit, and a different limit is a different file.

Examples

The gate reads the report

The gate does not read the pages. One source is what makes the gate and the build agree.

The limit is written

The refusal limit is in one file. A written limit is a limit that a refusal can name.

A refusal names the limit

The refusal says the number and the limit. Two numbers is what makes a failure actionable.

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.

← Watching as a component that owns a list
Previous Lesson
Watching as a component that owns a list
Next Lesson
Building a large site in chunks
Building a large site in chunks →