GitLab CI Kotlin DSL • opensavvy.gitlab.ci • Artifacts • rule
rule¶
Specifies when to upload artifacts based on job result.
By default, artifacts are uploaded only when the job succeeds. Use this method to change when artifacts should be uploaded.
Example¶
val test by job {
script {
shell("run-tests")
}
artifacts {
include("test-results/")
rule(When.Always) // Upload artifacts regardless of job result
}
}