Task inputs and outputs¶
-
Review the task inputs and outputs example.
-
Review the contents of the file
task-passing-artifact.yml
.
How is this pipeline different from previous pipelines?
Note how:
- This pipeline has one job, but the job has two tasks (a type of job step).
- The first task declares an output named files.
- The second task declares an input by the same name.
As before:
- Set the pipeline
- Unpause it
- Trigger the job
Does the information produced by the first task correctly make its way to the output of the second?
Concourse runs each task in a separate container.
It arranges for everything:
- Concourse creates the first container
- It creates a directory named files inside that container
- It then runs the task, which deposits a file into that directory
Concourse then captures the output and makes it available to the next task:
- Concourse creates the second container
- Because the task defines the input, the contents of the
files
folder are deposited into a new directory, also namedfiles
- The second task runs
In Summary
Task inputs and outputs are an important feature of Concourse. The feature leverages conventions, such as naming directories after those of declared inputs and outputs.
The contents of the inputs can be provided to a task, while the contents of generated outputs can be propagated to subsequent tasks.
Furthermore, inputs can be obtained (with get
steps) from outside Concourse and stashed away (with put
steps) to some external location via the concept
of resources.
The next lesson provides an example.