Skip to main content

Add a Build and push job

A Build and push Job builds a Docker image from a Dockerfile in your Pipeline Source and pushes it to a container registry. It's typically the first Job in a Pipeline, added right after the Pipeline Source is configured — later Jobs, such as a security scan or a deploy, act on the image this Job produces.

Prerequisites

Add a Build and push job

Add job menu — Build and push

  1. In the Pipeline Editor, click Add Job (or Add Parallel Job) on the Stage you want to build from.
  2. Under Build, select Build and push.

Add Job Build config form

  1. Enter the Job name.
  2. Enter the Docker file path (relative) — the path to the Dockerfile within the repository, relative to its root.
  3. Enter the Build context directory — defaults to . (the repository root).
  4. Select a Container registry connection, or click Add registry connections to create one.
  5. Enter the Registry repository — the name of the repository in the selected registry where the image will be pushed (e.g. team-platform/my-service).
  6. Optionally add Docker build argument(s) as key/value pairs. Click Add new for each additional argument.
  7. Click Save.

The Build and push Job is added to the Stage.

tip

Docker file location in the panel is read-only — it always points at the Code source already configured for this Pipeline. See Configure Pipeline Source to change it.

tip

The Job name defaults to build-and-push — rename it if you plan to add more than one Build and push Job to the same Pipeline.

Next steps