Skip to content

Task inputs and outputs

  1. Review the task inputs and outputs example.

  2. Review the contents of the file task-passing-artifact.yml.

How is this pipeline different from previous pipelines?

Note how:

  1. This pipeline has one job, but the job has two tasks (a type of job step).
  2. The first task declares an output named files.
  3. The second task declares an input by the same name.

As before:

  1. Set the pipeline
  2. Unpause it
  3. 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 named files
  • 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.