Is it possible to add a button to the "Stage View" build results screen with some custom logic? When the build succeeds it pushes built packages out to a package manager and the "output" of the build is essentially a generated version string. I'd like users to be able to just click a button to copy that version string to clipboard.
Related
Ideally I would like to clone a jenkins project, but it is in say /dir1/dir2/dir3/dir4/dir5 and I am in /dir1/dir2/dir6/dir7/dir8 and I can "copy existing item from" but it does not offer a browse, and I don't know how to specify a project from a different directory. If someone knows, you could let me know.
In the meantime, I will just have two window open. One window displaying the current project and the other window creating a new one, and I will just copy the things over. My problem, and I bet it is very simple but I could not find out during research or else it is so simple I overlooked it ;-) Jenkins wants me to specify the type (Freestyle project, MultiJob Project, Maven project, Pipeline, etc) and I am not sure. I want to make it the same as the existing project, but I can't figure out how to tell what type the existing project is. It does check out files from SVN and build via Java.
Can someone tell me how to find out what type of project an existing maven project is?
There is no specific tag, but if you open a project, delete button have the type of project information available. pipleline project will have "Delete Pipeline" button, maven project will have "Delete Maven Project" button and a freestyle project will only have "Delete Project" button.
In addition one should have description text about this information.
On Jenkins' Dashboard, each project type has a different icon representation on the left of the project table. For example, Folder project has a Folder icon. When you hover your mouse over the icon, it will show a tooltip that is the project type.
You can go to the script page on jenkins(http://replace_with_your_jenkins_url/script) and execute the below script:
def jenkins = Jenkins.getInstance()
def jobName = "name_of_your_job"
def job = jenkins.getItem(jobName)
println "Job type: ${job.getClass()}"
You don't need to know the project type. Just click on 'New Item' and enter the name of the new project and enter the name of the project you want to clone from, in 'Copy from' input and click OK
I'm currently trying to run custom code coverage using OpenCover and to generate output in easily readable format using Report Generator. The final output of these two applications is xml files.
I am running these applications using InvokeProcess activity in build definition to get their outputs but the output are currently present only in my build controller's Build binaries folder.(ex:C:\Builds\1\project_collection\build_definition\bin)
I want to save these files per build in some location and to retrieve them back when needed by clicking on a hyperlink present in Build summary similar to how built-in code coverage results are displayed in tfs build summary.
I tried this question but as you can see there is no correct answers listed there.
So how do I copy these output files to some remote location and refer them in my build summary to retrieve them?
Copy outputs to some remote location is similar to copy outputs to drop folder. You can simply specify the drop location in Build Definition--Build Defaults--Staging location. Check the screenshot below:
Refer the binaries in your build summary to retrieve them, you can add a new activity “WriteCustomSummaryInformation” to your build process template, which has several properties that allow you create a new Section and add text to that section. Check this blog for more information: http://blogs.msdn.com/b/jpricket/archive/2012/06/07/tfs11-rc-simple-build-summary-customization.aspx
As I also answered here Display OpenCover results in TFS 2015 build Summary, it is now possible to customize the build results in TFS 2015.
I managed to upload the OpenCover xml result file as 'testrun-attachment' via REST-interface and got the pieces in place to show the summary values on both the build summary tab and on its own extended “build-results-view”.
How can TFS be configured to select by default the two checkboxes "Overwrite writeable files that are not checked out" and "Overwrite all files even if the local version matches the specified version" when doing a Get Specific Version?
I am using TFS 2013. My real goal is to automate the process of right clicking a folder, selecting Advanced, and then clicking the two checkboxes. I have created a keyboard shortcut to pull up the window for Get Specific version, but I also want to have the two checkboxes selected by default. I do not want this scripted through the command line as I still want to have the window popped up and manually perform the final step to hit the Get button. Ideally the whole process would work something like Alt-G to pull up the Get Specific Version window, and then manually hit the Get button to complete the action.
There is not option to change this default setting. Even though you don't want to use command, it seems using command line is the only way to automate the process.
tf get-overwrite
tf get-force
https://msdn.microsoft.com/en-us/library/fx7sdeyf(v=vs.120).aspx
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 built a custom build processes template based on the DefaultTemplate.xaml and added a few parameters. They show up fine on the Build definition window but I can not find a way to have them be displayed on the parameters tab of the Queue New Build Dialog.
I am hoping that this is possible, I would rather not need to define a separate build for each variation of parameters.
You can define that in the Metadata parameter: http://www.ewaldhofman.nl/post/2010/05/17/Customize-Team-Build-2010-e28093-Part-6-Use-custom-type-for-an-argument.aspx
You can play with the "View the parameter when" option at the bottom