How to enable Artifacts link - tfs

I have a TFS2015 build definition: after the build step I have a PowerShell step which is publishing the build artifacts.
How can I enabled the Artifacts link in the build summary?
I've noticed that the Artifacts link is visible only when I have a Publish Artifacts build step in the build definition. I can't use this step because I need a specific folders structure in the build drop folder.

The easiest thing might be to use your PowerShell script to prepare your drop as normal but then add the Publish Build Artifacts task so that the artifacts tab of the release is populated.
The example in this article uses $(build.stagingDirectory) to order the files and then specifies that directory in the Copy Root field of the Publish task.
http://www.codewrecks.com/blog/index.php/2015/06/30/manage-artifacts-with-tfs-build-vnext/

Related

Jenkins copy artifacts from another project

I moved a job that does an update function from one project to another. Under the configure option i used the copy artifacts from another project and updated the tab with the project name from which project it needs to pull files from and hit save. When i run build on the job, it does not pull the files that it needs to from the intended project and the build fails. Am i missing anything on this?

TFS - Multiple builds feeding a single release

I have 2 builds (A & B), which create their own artifacts which are dropped into the $(Build.ArtifactStagingDirectory) and then published to 'Visual Studio Team Services/TFS'
Everything works fine for build A, but I am finding that when I am wanting to download an artifact from build B, that artifact cannot be found. When I look at the error message, I can see that TFS is actually looking for it from build A.
I dont want to point to a specific build number for build B, instead just want to point to the latest build of B.
Anyone know how I can update the reference so that TFS is looking at build B?
If I use the 'Download Artifact' Task, I can get this to work if I point to a 'Specific Build', but it does not work if I use the option 'Current Build'
Try below steps to achieve that:
Create 2 build definitions to queue Build A and B :
Build Definition A -- Build A
Build Definition B -- Build B
Create a release definition, add Build Definition A and Build Definition B as the artifacts source.
Trigger the release
Release works with multiple artifacts:
UPDATE1:
The Download Artifact task only works on single artifact, multiple artifacts doesn't work.
Besides, why you have to use the Download Artifact task? By default the release definition has enabled the Download Artifact, that means it will download the multiple artifacts automatically, then you just need to use the multiple artifacts directly in other tasks.
UPDATE2:
Since you already linked multiple artifacts in your release definition, that means you have to download them to use on subsequent Phases/tasks. But based on your description seems you want to use the Download Artifact task to down the latest version of one of them. That seems a bit contradictory for your requirements.
I can think of is that you can download the artifacts to a staging folder, then add copy task to copy the artifacts which you need in your phases.
Besides if you want to download all the latest artifacts, you can try this extension: Download Artifacts

How to publish binaries and copy to server in TFS 2017

We were using xaml builds earlier now we migrated to TFS2017. I am not able to publish the build files and how can we copy them.
My Build runs file it does not publish files. I see only the code files.
You need to add Copy Files task and Publish Build Artifacts task in your build definition, to copy and publish files:
Maybe you may create the publish profile for you web project and use it in build process. I use this way for the web site project:
Create the publish profile for project to package: https://msdn.microsoft.com/en-us/library/dd465323(v=vs.110).aspx
Add publish args for the build step. In my case:
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\Test" /p:PublishProfile="shdemowebtest - Web Deploy"
Then copy drop artifact
In your case you may create profile to publish on the file system. Then add build args to publish and redirect the destination folder: MsBuild publish website without using publish profile
Steps for publish to local folder (on VSTS and local build agent):
Add new profile to your project (destination bin\release\PublishOutput):
I use first build step to build additional project with tests.
Add step to publish with default folder path.
MS Build Args:
/p:DeployOnBuild=true /p:PublishProfile="FolderProfile"
3.1. Then I use standard step to copy results to staged directory:
3.2. And publish to drop artifact:
3.3. Then you can use that artifact to deploy with release management:
Add step to publish to custom path:
MS Build Args:
/p:DeployOnBuild=true /p:PublishProfile="FolderProfile" /p:publishUrl="C:\temp\Output"
4.1. The result of this step:

Jenkins switch build folder

I'm not even sure if I'm thinking about this correctly so I'm having difficulty googling it. I've got Jenkins set up and building a site and correctly sending the build artifacts over SSH to the live server.
My ideal workflow would be to ssh into the server, drop the new assets into a build folder, copy the old build files to a backup directory and drop all the new build files where the old build files used to be.
Not sure if that even makes sense or if there is a better way to do this. To be clear, I'm not talking about a single .war file or anything. I'm talking about a package of PHP files, images, CSS and other stuff.
I'm new to Jenkins in general so any help pointing me in the right direction is greatly appreciated.
See the ArtifactDeployer Plugin:
ArtifactDeployer plugin enables you to archive build artifacts to any remote locations such as to a separate file server.
...
ArtifactDeployer is a complete alternative to the built-in Jenkins feature "Archiving artefacts' and it is aimed at providing an uniform deployment mechanism.
Add it to your project's config with Post-build Actions → Add post-build action → [ArtifactDeployer] - Deploy the artifacts from build workspace to remote locations.
or the Flexible Publish Plugin:
...
[Send build artifacts over SSH]
...
Add it to your project's config with Post-build Actions → Add post-build action → Flexible publish.
or an idea I haven't tried myself yet, so no guarantees:
Configure your live server to be Jenkins slave node, create a project that is bound to this slave and use the Copy Artifact Plugin therein:
Adds a build step to copy artifacts from another project.
Add it to this project's config with Build → Add build step → Copy artifacts from another project.

TFS2015 VNext build output folders

New to TFS but have managed to set up a vNext build definition and am able to trigger a build that executes successfully.
The build output is placed at
D:\TestAgent_work\c312e966
on the build server. However after every subsequent builds this directory is overwritten with the new build output.
Is there a way of retaining previous builds that include the build version in the folder structure?
Thanks in advance
Use the "Publish Build Artifacts" task to copy the output to either a UNC share or upload it to the server.

Resources