Skip to content

Job


Introduction

Pipeline configuration starts with a Job. A Job is a fundamental part of the gitflic-ci.yaml file configuration.

Jobs have the following basic properties:

  • A job must contain at least one element with the keyword script or trigger;
  • The number of jobs in a pipeline is unlimited.

Example:

job 1:  
  script: echo "Hello everyone"  

job 2:  
  script: echo "And have a nice day"  

This example shows the simplest pipeline configuration with two jobs named job 1 and job 2. Of course, you can execute any commands that can be run in the operating system terminal, such as yarn install, ./test.sh, and so on.

Jobs are requested by an agent and executed in the environment of the specific agent that picked them up. It is also important to note that each job runs independently of all other jobs in the pipeline.

Any job must contain either:

  • The keyword script (or scripts). In this case, the job will execute the specified set of commands.
  • The keyword trigger. In this case, the job will create a child pipeline within the current project or another project specified in the configuration. For more details on trigger, see here.

A job cannot contain both the script and trigger keywords simultaneously.

Restrictions for Job Names

Jobs cannot be named with the following words, as these are reserved keywords in the gitflic-ci.yaml configuration file:

  • image
  • stage
  • stages
  • after_script
  • before_script
  • job
  • scripts
  • artifacts
  • needs
  • tags
  • rules
  • only
  • except
  • allow_failure

Use unique job names because if a pipeline contains multiple jobs with the same name, only one job will be added to the pipeline.

Viewing Jobs

To view pipeline details, click on the pipeline number. You will be redirected to the jobs page for that pipeline.

The header on the details page displays the branch the pipeline is running on, execution time, a link to the associated commit, and information about the merge request.
The Info tab shows all jobs that should be executed as part of the pipeline. Each job is displayed with its current status.

Job

The Graph tab visually represents the sequential dependencies between jobs. In other words, the lines indicate which jobs must complete before the next one can start. Jobs are displayed similarly to the Info tab: the name is shown alongside the current status and a job restart button.

Job

The Jobs tab lists all jobs. It includes information about job execution time, start time, status, stage, and name.

Job

The Errors tab collects information about job failures. To view detailed logs, click on the job title—you will be redirected to a new page. The job page URL follows the format project-name/ci-cd/job/*/, where * is the job ID.

Job

The Logs tab displays all logs for the job execution. It includes log management buttons: viewing raw log files and deleting logs for the selected job. Use the right panel to navigate between pipeline jobs. Logs are only stored for a limited time and will eventually be deleted, along with other job artifacts. Artifact retention can be managed in service settings.

Job

The Artifacts tab contains the job execution results. Artifacts are created based on the settings in your gitflic-ci.yaml file. Artifacts can be downloaded or deleted. All artifacts have a lifespan and will be deleted once it expires.

Job

Automatic translation!

This page has been automatically translated. The text may contain inaccuracies