Skip to content

GitLab CI Kotlin DSLopensavvy.gitlab.ciArtifactsexclude

exclude

fun exclude(path: String)

Prevents files from being added to the artifacts archive.

Paths are relative to the project directory and can use wildcards with glob patterns. You can call this method multiple times to exclude multiple paths.

Example

val build by job {
    script {
        shell("make build")
    }

    artifacts {
        include("binaries/")
        exclude("binaries/**/*.o")
         exclude("*.tmp")
     }
 }

External resources