Skip to content

Generalized artifact functionality to aid in debugging of GitLab pipeline job stages

Mark Ferguson requested to merge add-artifacts-to-builds into main

While code is contained in .gitlab-ci.yml, ci/artifact.yml, and ci/artifact-script.yml there is nothing that can be tested in a local environment. Please review the code in:

  • .gitlab-ci.yml
  • ci/artifact.yml
  • ci/artifact-script.yml
  • ci/build.template.yml
  • ci/push.template.yml

Please keep in mind that the two artifact-related yml files were split this way to work around what GitLab supports (or doesn't support well):

  • artifact.yml - extends does not support merge of scripts from the .filename version but does support merge of variables
  • artifact-script.yml is built so that it can be merged into any existing job stage script block as needed
  • Ideally, these two would be combined if GitLab supported full merge when using extends tags

You can review sample artifacts being generated by going to this previously run pipeline and click on Jobs and then the download icon (far right to get the artifacts left by that job stage). See below.

Screen_Shot_2022-08-19_at_11_29_24_AM

Sample code and examples for using this functionality in your project can be found in the gitlab-ci-artifact-example repo

Edited by Mark Ferguson

Merge request reports

Loading