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 same directory as the path defined by the targetPath of your Publish Pipeline Artifacts task.
Syntax
The .artifactignore follows the same syntax as the .gitignore with some minor limitations.
Important
The plus sign character + is not supported in URL paths and some of the semantic versioning metadata for some package types like Maven.
Ignored by default
To reduce the chances of publishing the .git folder, we automatically ignore this path if you do not have an .artifactignore file. You can re-include it by creating an empty .artifactignore file.
Related articles
Povratne informacije
Pošalјite i prikažite povratne informacije za