Here is a walkaround that will work.
Commit the build artifact to the repository.
- First, a task in the build pipeline writes the artifacts in $(Build.SourcesDirectory)\BuildArtifacts\myBuildArtifact_run$(Build.BuildNumber).zip
- Then the next task is a command-line script to commit to repos :
echo This is the current working directory: %cd%
echo get worktree list
git worktree list
echo commit all changes
git config user.email "joe@contoso.com"
git config user.name "Automatic Build"
git checkout master
git add --all
git commit -m "pipeline : $(Build.DefinitionName)"
echo push code to repo
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin master
- Finally, you’ll find the committed artifact in your repository, under root > BuildArtifacts
This will help you solve this issue.