I'm looking for expanded descriptions on the various options that PublishBuildArtifacts can take and what their significance are.
In particular, I wouldn't mind knowing what the two options for publishLocation imply, and which parameter I should be using to specify the path to my artifact.
Also, am I required to provide anything for pathToPublish, or is the default safe enough to use?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@andyjlewis I think @DavidStaheli or another of the Pipelines PMs can better help with this issue.
??
pathToPublish: required in YAML, but if you're using the designer, $(Build.ArtifactStagingDirectory) is pre-filled for you, and that's the most common value and what you'd want to use in most cases.
publishLocation: if you leave it empty or specify container in YAML then it has the same effect as if you chose "Visual Studio Team Services/TFS" in the designer. This is the most common choice and what you'd want to use in most cases.
BTW, this thread and topic is helping to serve as a poster child for some small and big improvements I want to make to the task reference. So thank you for the feedback, questions, and your patience. @vtbassmatt and @DavidStaheli to check me and for awareness of this thread for future doc improvements we're talking about.
Spoke too quickly. Looking at it this morning with @vtbassmatt, it looks like pathToPublish is not required in YAML and does default to $(Build.ArtifactStagingDirectory). Again, thanks for calling out these questions. We'll continue to look for ways to make the task reference better.
Hi, I'm having one issue here . I can build and publish the code using CI, but the publish version is not the version , it is simply copying from Source Folder to my diestional folder in VM, can anybody help me to get the new publish copy.. ?
@maverick14 not sure I understand the problem you're facing. Typically what you do is use a CopyFiles task to move the right set of files to the $(Build.ArtifactStagingDirectory), then use the Publish Build Artifacts task to upload them as build artifacts.
Guys we need dead-simple-obvious-baby-step examples in this section, I'm new to Azure and I am almost ready to give up on the whole thing just because I've been unable to find how to put my artifact back in the right place.
In most cases, Azure Pipelines/TFS (Server on TFS 2018 RTM and older) is the best and simplest option.
What? What does that mean? Can you add example of what to write?
What is a "file share" ?
Yeah, this doc needs a lot of work. For now, I'm planning to add something like the below. Would this have helped you, @phil-lgr ?
A typical pattern for using this task is:
For example:
steps:
- powershell: .\build.ps1
- task: CopyFiles@2
inputs:
contents: _buildOutput\**
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: MyBuildOutputs
Yes!
On Thu, Nov 15, 2018 at 7:46 AM Matt Cooper <[email protected]notifications@github.com> wrote:
Yeah, this doc needs a lot of work. For now, I'm planning to add something like the below. Would this have helped you, @phil-lgrhttps://github.com/phil-lgr ?
Usage
A typical pattern for using this task is:
For example:
steps:
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/vsts-docs/issues/1934#issuecomment-439028346, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMrQ_ziIGnPxjGpj43F2yqlqRVZckueks5uvWIPgaJpZM4XCG3R.
--
Phil Sent from Mobile
Fix is published.
Hello, thank you for this. Unfortunately, this is still obscure to me.
I am using this step in a pipeline:
task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'myProject'
publishLocation: 'Container'
I don't understand from this above where my files will be at the end !
Maybe I'm not at the right place or using this correctly, I created a self-hosted Windows agent.
My pipelines tells my agent to get the code from GitHub, restore nugets, build the dotnetcore project and output to b folder, then it zips the file to a folder.
I wanted to the zip file to be "published" to my one of my feeds in Azure Artifacts but as I don't specify the feed anywhere, I don't understand where it will try to put the files !!!
Of course, it fails: Fail to upload 'E:Agent_work5a6502.zip' due to 'Moved Temporarily'.
If you could point me in the right direction, it would be awesome, thanks a lot !
Claude VERNIER
This definitely still needs some work... I've got a task that "successfully" uploads my artifacts, but I have no idea where I can actually find them. The Artifacts section in ADO doesn't show them, and the search doesn't find them.