TFS and Jenkins automation - jenkins

I am doing continious Integration between TFS and Jenkins.I am using TFS as a repository server.I am able to create workspace from TFS in jenkins and building of application successfully.I need automation build after TFS checkin.

IIRC Jenkins polls tfs to see if there's been a checkin, when there has it does a build (as opposed to TFS kicking off the build).

Related

TFS 2013 Multipipeline builds like in Jenkins

I have been looking for a while now. Is there any way to create something like multipipeline branches from jenkins in TFS 2013?
Multipipeline builds in Jenkins work such that everytime a developer creates a branch in the repository, Jenkins would clone the main build and create a new build specifically for that new branch. Once the branch is deleted, the build also disappears. This way we can make sure that nothing is merged back to master, that did not pass tests or doesn't build.
Is there any way to achieve the same effect in TFS 2013? I know its possible in Azure DevOps but can't find anything specifically on TFS 2013. Sadly TFS2013 is a constraint of the project and cannot be changed.
Is there any way to achieve the same effect in TFS 2013?
I am afraid there is no same workflow in TFS2013, TFS newer versions(e.g. 2015 2017 2018...),Azure Devops Service.
Since TFS2013 is an older version, many features are not supported in this version of TFS.
For example: Triggers, Conditions and so on.
So even a similar workflow cannot be used in TFS2013. I suggest you can update TFS2013 to a newer version, so you will have more applicable functions
In the newer version of TFS, Azure Devops Server or Azure Devops Service, it can use triggers and conditions to trigger build or task to verify the branch.
For example:
You could set CI Trigger for pipeline, and set condition for some tasks. Then when the new branch is created, it will trigger the build. In the build, it will determine the task to run based on the triggered branch(condition).
Or in order to avoid directly merging the branch into the master, you can use PR trigger to pre-merge the branch so that you can verify that the branch is correct.
For more detailed information, you could refer to this doc: Build multiple branches

TFS + Jenkins job

I have a project on local TFS server. This project has a PowerShell script which creates the build.
I need to create a correct JOB in Jenkins, which will start when any change happens in the project (TFS). This job will automatically start PS script on project directory.
Please, help me with this task.
Based on your description, you just need to integrate Jenkins with TFS and set CI/CD to trigger the build/release in Jenkins.
To run PowerShell in Jenkins you can refer this article: Running Powershell scripts using Jenkins
For the Jenkins integration and CI/CD, you can reference below articles:
TFS and Jenkins Integration
Visual Studio Team Services Integration with Jenkins
Tutorial: Integrate your Jenkins CI jobs with VSTS CD to Azure

SonarQube TFS 2015 express Integration

I follow SonarQube documentation:
But with TFS2015 express I don't see build step "SonarQube for MSBuild". Is that some plugin to install into TFS express ? Or the feature is not allowed to Express edition ?
This build step is RTM with TFS 2015 update1. Details please refer Team Foundation Server 2015 Update 1
SonarQube build tasks that embed the sonar-msbuild-runner 1.0 work
with on-premises and hosted agents. You can now use two build tasks to
execute a SonarQube analysis in conjunction with MSBuild. Before the
build steps that execute the actual MSBuild, insert a SonarQube for
MSBuild - Begin Analysis task to specify the SonarQube project
parameters, the connection to the SonarQube server, and (until
SonarQube 5.2 is available) the connection to the SonarQube database.
After the build and any test tasks, append a SonarQube for MSBuild -
End Analysis task to complete the analysis and send the data to
SonarQube.
So, the feature is also not in TFS Express 2015. There is no TFS Express 2015 upade1 for now. If you want to use this feature, you may have to use either TFS2015 update1 or VS Team Service.

Personal builds (pre-test commits) using TFS and Jenkins

Is it possible to trigger personal builds using TFS and Jenkins? Similar to what can be achieved using Teamcity. Can a developer trigger a build without checking-in so that his/her changes can be tested before checkin?
thanks,
You can do this with TFS. Assuming you are using TFS Build, available in TFS 2015 and in VSTS, and your source control is Git, you can setup a build policy for a specific branch that triggers a build any time a pull request happens. Details here.
If you are using the older XAML builds, look at Gated Checkins.

How to setup TFS2010 to use Jenkins build server

We use Jenkins as our CI build server but have moved over to TFS to do all the project management stuff (user stories, dev tasks, test cases, reporting, automation). How do I setup TFS2010 to use our Jenkins build server?
it's actually more like the other way around. You need to configure the TFS plugin for Jenkins, telling it to use TFS as your source control system. below is a link to the jenkins TFS plug-in...
https://wiki.jenkins-ci.org/display/JENKINS/Team+Foundation+Server+Plugin

Resources