The container
Environment variables
Every active variable is exported by name. See the exposure rules for how empty, optional, boolean, and inactive variables resolve. In addition:
User variables may not start with
KEEL_.
Step execution
Keel assembles one script from the steps and runs it in the container:- Order. Steps run in declaration order.
- Isolation. Each step’s
runexecutes in its own subshell. Working directory changes,setoptions, functions, and unexported shell variables do not leak into the next step. - Exports carry forward. After each step — including a failing one —
the step’s exported environment is snapshotted and restored at the start
of the next, so
export FOO=…in step 2 is visible in step 3 and to output capture. - Failure. The script runs under
set -e, and each step’s subshell inherits it: the first command in arunblock that exits non-zero ends the step, the step is marked failed, and every later step is skipped. Keel does not retry and does not roll back. - Status. Each step reports pending, running, succeeded, failed, or skipped, driven by marker lines the engine emits and consumes; they never appear in the visible log.
set -e exemptions apply inside a block: a command in an if
condition, on the left of && or ||, or anywhere in a pipeline except
its last command does not end the step when it fails. Append || true to a
command that is allowed to fail, and check the exit of pipelines explicitly
(set -o pipefail works in Alpine’s ash and in bash, not in dash).
Logs
Standard output and standard error of the build and of the steps stream line by line to the run page and, forkeel deploy, to the terminal. Before
a line is stored or shown, every secret value is replaced with •••.
A single line longer than 1 MB cannot be processed. Keel logs
[keel] log line dropped and discards the rest of that stream (standard
output or standard error) for the remainder of the run; the run itself
continues and its exit status is unaffected. Avoid dumping large blobs on
one line — pipe them through fold or write them to a file.
Outputs
At the end of a run in which every step succeeded, each declared output is read from the final environment and captured — up to 64 KiB per value, on a channel separate from the log. See the outputs reference.Cancellation
Cancel (UI) or Ctrl+C (keel deploy) force-removes the container. The run
is marked canceled, the running step failed, later steps skipped. Whatever
the steps already did in external systems remains.