Collect artifacts

Overview of the Collect artifacts job step, which lets you collect one or more artifacts generated during the execution of the Job.

Artifacts can be collected using one of two following procedures, selectable from the Collect Artifact job step form:

Collect individual artifacts

Figure 1. Collect individual artifacts

From the job step settings (Figure 1), you can customize information about the job step, including:

  • A custom step name can be defined; otherwise, the default step name will be used
  • Collect artifacts: define which files are collected from the workspace. In order to collect one specific file from the workspace root, enter its name in the field (i.e. requirements.txt). In order to collect multiple specific files from the workspace root separate them by commas, for example: requirements_1.txt, requirements_2.txt. Artifacts can also be collected based on an entered regex. The entered regex needs to follow rules defined by fnmatch python module. For example if you want to collect all .txt files the regex would be *.txt
  • Every step has Advanced options through which steps can be managed. When execution of the step fails, execution of the job continues. If option Abort job on step fail is marked, Job execution will stop once this step fails and further steps will not be executed. When it comes to skip condition, it allows skipping the current step if the condition is met.

Zip and collect directory as a single artifact

Figure 2. Collect zip archive

From the job step settings (Figure 2), you can customize information about the job step, including:

  • A custom step name can be defined; otherwise, the default step name will be used
  • Collect artifacts: define which directories should be zipped and collected from the workspace. In order to collect one specific directory as a zip archive from the workspace root, enter the name of that directory in the field (i.e. build_directory). In order to collect multiple directories from the workspace root as zip archives separate them by commas, for example: build_directory_1, build_directory_2.
  • Every step has Advanced options through which steps can be managed. When execution of the step fails, execution of the job continues. If option Abort job on step fail is marked, Job execution will stop once this step fails and further steps will not be executed. When it comes to skip condition, it allows skipping the current step if the condition is met.
    Figure 3. Collect artifacts job step with advanced options shown
Note: In order to save a form, all input fields must be valid. Required fields are signed with *.