How do I create a custom environment template for a TFS release?
Here is the document to delete it.
https://learn.microsoft.com/en-us/vsts/build-release/concepts/definitions/release/env-templates?view=vsts#how-do-i-delete-a-custom-environment-template
I am trying to add a new custom template to the TFS 2018 release section.
It's under the ellipsis when you click on an environment in the pipeline view, next to "Delete" and "Move".
Related
When I try to create a new pipeline in visualstudio.com, I don't see the option to get sources from TFS, only from GIT. There is a message saying:
"To create a pipeline for TFVC, BitBucket, or use the old designer, disable the "New YAML pipeline creation experience" preview feature"
Where can I disable the "New YAML pipeline creation experience"?
From your account, Click the preview features
Change the preview features from for me to for this account/organization
Disable the Build YAML Pipelines
Reference
I am trying to add a new build process template (XAML) to TFS 2010, using VS 2017.
I have committed it under the BuildProcessTemplates folder for the team project and it is shown in the Source Control Explorer, but it doesn't show up in the drop down list on the Process tab of the Build definition dialog.
The drop down list only shows the other 3 templates (DefaultTemplate.xaml, UpgradeTemplate.xaml...) in the folder.
I found this description of how the dropdown list works:
This list is populated with the following build process templates:
The ones that come out of the box (DefaultTemplate.xaml,
UpgradetTemplate.xaml and LabDefaultTemplate.xaml). These are created
for every new team project (this can be changed by modifying the
process template)
Any build process templates that have previously
been added for any other build definitions in the same team project.
The last bullet is a bit unintuitive, but it means that if a developer creates
a new build definition in team project A, and adds a new build process
template (for example by by selecting New and then browse to an
existing .xaml file),
this build process template will be available in the process dropdown
list for all other build definitions in team project A. It will not be
available in team project B, but has to be added in the same way.
https://blog.ehn.nu/2010/11/managing-build-process-templates-in-tfs-2010-build/
I tried clicking on "New..." next to the drop down list. It only shows the option
to "Select a team project that contains your build process template", there's no option to create a new one.
If I enter the path to the .xaml file under "Path in repository" and click on OK I get an error: "Object reference not set to an instance of an object"
Screenshot of error
How do I make the new build process template available for build definitions?
Normally, you just need to check in the template xaml files under the BuildProcessTemplate folder, then in Build Definition Process tab, Click New… button to add these xaml files from that fold. The path of xaml should have a \ sample in front of it.
In your case, also try to clear TFS and VS cache, then try it again.
If delete cache folder still doesn't work, please try it with older Visual Studio Version such as Visual Studio 2015 and create a new build definition, select the template.
Also take a look at this blog shows the customize process template experience in TFS 2013, which may be helpful.
We just upgraded from TFS 2013 to TFS 2017 and I was excited to go in and create a new build definition, but I can't seem to do it at the collection level. I can only create a new build definition once I've selected a project and then when defining the Get Sources page I can't seem to access other projects within the collection. The highest level it will allow me to get is the current project. In the Repository drop-down the only option is the current project. How can I create a new build definition across projects in TFS 2017?
The TFS build is project level for now, it's not able to create a build definition at collection level and across projects. For 2015 you could, instead of using the trigger path '$/{team project}', also insert just '$/', which would result in that the continuous integration build triggers on all check-ins in that team project collection. It's more like a backdoor.
However, In TFS 2017, it 's no longer possible to freely edit this field, and that you can only add a trigger for the team project that the build definition resides in.
There had been a uservoice and got started:
VSO build vnext: share build templates between projects
https://visualstudio.uservoice.com/forums/330519-visual-studio-team-services/suggestions/8468566-vso-build-vnext-share-build-templates-between-pro
As a workaround you could export your existing build definition in the project to other project. However, this just avoid you manually duplicating the definition in another team project. It's not able to get source from another project which different with the build definition belongs to.
There is an Export/Import Build Definition extension in Visual Studio Marketplace you can use now. Also available from within the TFS2017 update1 Build Definitions web UI:
.
We are running TFS 2013 update 3 with Git - We have a powershell script that uses the output created by the BuildNumberFormat (environment variable TF_BUILD_BUILDNUMBER) that is generated at the time a build is executed. We also want to be able to queue a new build, and override that auto-generated BuildNumber, and specify a alternate (targeted hotfix for a previous tree / branch). With the default build template, there is no option to change the Build Number format (where we can statically set the desired value).
Our Build template:
Queue New Build template where we are targeting a specific changeset:
So the question is -- Do I need to edit the build work flow xaml to add this option as something that is passed in or is there a simpler way? I would like not to have to edit my power shell scripts that depend on this if we can. Ideas are greatly appreciated.
I ended up figuring it out, and it was incredibly easy. This may be an answer for similar questions also.
Copy the default build template (you can press download)
Place the file in your Repo path such as /BuildProcessTemplates/companyName.GitTemplate.12.xaml
Open the new xaml file in visual studios.
At the bottom of the screen, click the "Arguments"
Scroll down to "Metadata" and click on the edit button on the right
Scroll down to BuildNumberFormat - select it, and on the drop down "View this parameter when", change it to "Always Show the parameter"
Save the template, Commit it to your Git repo, push to your Git server.
Update your build Definition to use your new build template
You can now specify your own BuildNumber
Hope this helps someone. Looks useful for the other variables available in the build template.
I'm trying to edit my build template to set the build name to be the same as my msi name. My msi-file is created with wix with a name "Product 1.0.0..msi" and I want the "Product 1.0.0." to be the build name in TFS instead of the normal "$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)".
The assembly-version on the output of MSBuild is also correct, so a solution using that is acceptable too.
Is this possible to do in a custom build template in Visual Studio? Anyone who have done this?
If you edit the build definition and go to the process tab you should change the build number to $(build and)_1.0.0$(Rev:.r) which will give you the number
then get the TF Version activity from the TFS Community Build Tools on codeplex. Then you can configure TF Version in "Get Version" mode to populate the variable. With that you have to put something in there to update the msi file.
http://tfsbuildextensions.codeplex.com/wikipage?title=How%20to%20integrate%20the%20TfsVersion%20build%20activity&referringTitle=Documentation
Right button on build definition on Team Explorer, and "Edit Build Definition..." submenu. Rename the field "Build Definition Name:", like this: