Use .artifactignore
Azure DevOps Services
The .artifactignore is a text file that controls which files are uploaded when you publish a Universal Package or a Pipeline Artifact.
.artifactignore is typically checked into your version control repository and the syntax is similar to that of .gitignore.
Using the .artifactignore file can help reduce your pipeline execution time by avoiding copying files into your staging directory before publishing your artifacts.
Example
In the following example, we will be ignoring all files except the ones in the src/MyApp/bin/Release directory.
**/*
!src/MyApp/bin/Release/**.*
Important
The .artifactignore file must be in the directory provided to the targetPath
argument in your Publish Pipeline Artifacts task.
Syntax
The .artifactignore follows the same syntax as the .gitignore with some minor limitations. The plus sign character +
is not supported in URL paths and some of the semantic versioning metadata for some package types like Maven.
Note
The .gitignore file is ignored by default if you don't have an .artifactignore file. You can re-include it by creating an empty .artifactignore file.
Related articles
Feedback
Submit and view feedback for