Draft: Resolve "Support multiple artifacts generation per job"
What does this MR do?
artifacts:archives
artifacts:archives
is used to create multiple artifact archives per job. All of the artifacts:
syntax can be used with artifacts:archives
, one time per archive, except for
archives:
or reports:
. Each artifact is a single list (array) item under artifacts:archives
.
name:
and path:
are mandatory keywords, the rest are optional.
For example, use the example below to create the following multiple artifacts:
- An archive named
coverage
that uploads/coverage/path-1.txt
and/coverage/path-2.txt
only on success. - An archive named
failures
that uploads/failure/file-1.txt
only on failure. - Two
artifacts:reports
, forjunit: rspec.xml
andterraform: tfplan.json
artifacts:
archives:
- name: coverage
untracked: false
paths:
- /coverage/file-1.txt
- /coverage/file-2.txt
expose_as: test_coverage
when: on_success
- name: failures
paths:
- /failure/file-1.txt
when: on_failure
reports:
junit: rspec.xml
terraform: tfplan.json
Limitations
In 13.7 artifacts specified in this way are only available for download via the artifacts dropdown in
the project pipeline index at <path-to-project>/-/pipelines
. Only the first archive specified by a given job
will be passed to the next stages by default or when a job is specified as a dependency using dependencies
.
Screenshots
View | Screenshots |
---|---|
ci editor | |
job logs | |
pipeline view |
Database Lab output
exec DROP INDEX CONCURRENTLY index_ci_job_artifacts_on_job_id_and_file_type;
The query has been executed. Duration: 11.314 s (edited)
exec CREATE UNIQUE INDEX CONCURRENTLY index_ci_job_artifacts_on_job_id_and_file_type ON ci_job_artifacts USING btree (job_id, file_type) WHERE (file_type <> 1);
The query has been executed. Duration: 33.481 min (edited)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Part of #18744