Build Jobs

Overview

Jobs are the most fundamental element of Gallery project build workflows. They are specified in the .gallery-deploy.yml file under the jobs block of the file.

jobs:
  job_name:
    script:
      - echo "hi"
    stage: build
  # More jobs here

Jobs must be part of a stage, and can include a list of commands under the script section of the yaml.

Environment Variables

Logging

Both pre-infra and post-infra jobs run when an environment is created, and logs from the job are available in the environment page, under the logs tab. Logs are grouped first under the repository the build is associated with, with build stages listed under the repository name in the sidebar. The resulting view lists the jobs within the stage, and the logs under each job.

Special Output Sequences

Gallery supports groups within job outputs. Adding ::group:: before a line of output indicates to Gallery that the line is a start of a folding group, which continues until the ::endgroup:: specifier is output in the job. For example, the following sequence of outputs will result in a group starting with the line group1and including all lines until endgroup1.

echo ::group::group1
echo test
echo endgroup1
echo ::endgroup::
echo outofgroup

Last updated