#Integrate Jenkins and create CI/CD pipelines for your Visual Studio Team Services Git repositories The CloudBees Jenkins Platform is the proven, fully-featured, enterprise platform for implementing continuous delivery (CD) processes powered by Jenkins. The Visual Studio Team Services feature enables you to:
Install the CloudBees Jenkins Visual Studio Team Services PluginOn your CloudBees Jenkins Platform master, navigate to the "Manage Jenkins/Manage Plugins" screen and install the "Visual Studio Team Services Plugin." Note: this plugin is only available on CloudBees Jenkins Platform and not available on Jenkins "Open Source." (Optional) Install Visual Studio Team Services ExtensionOpen https://marketplace.visualstudio.com/items/cloudbees.cloudbees-jenkins-platform-extension in your browser. Select Get it free to activate CloudBees extension on your Visual Studio Team Services Account. Trigger Jenkins build when pushing code to Visual Studio Team Services GitTrigger Jenkins builds and workflows when pushing code to Visual Studio Team Services Git repositories using a Web Hook. If you installed CloudBees' Visual Studio Team Services extensionCreate a Visual Studio Team Services Service Hook of type "CloudBees" and configure its URL to If you didn't installed CloudBees' Visual Studio Team Services extensionCreate a Visual Studio Team Services Service Hook of type "Web Hook" and configure its URL to Then, in your Jenkins job configuration, navigate to the "Build Triggers" section and check "Build when a change is pushed to Visual Studio Team Services". Use Jenkins Multi Branch Jobs for better branch and pull request visibilityLeverage multi-branch capabilities for better per branch and per pull request visibility with unique jobs, history and notifications. Install the Jenkins Multibranch Workflow Plugin and Jenkins will automatically create per branch and per pull request jobs. Use "Jenkinsfile" to define the build configuration with the source codeMultiple branches of a source code repository may require different build configurations.
To solve this problem, the Multibranch Workflow plugin uses a job definition stored with the source code in a file named The Sample 'Jenkinsfile' for a Maven project
The Jenkins Multibranch Workflow plugin will index the git repository and create one build job per branch and per pull request containing a file Jobs created for pull requests are automatically deleted when the pull requests are closed. Create a "Multibranch Workflow project"On Visual Studio Team Services web portal, navigate to your user profile and create a Personal Access Token (see here). In Jenkins, Navigate to the "Branch Sources" section of the configuration pages of your job and create credentials of type "username/password". Use your Visual Studio Team Services personal token as password and the username can be anything, we recommend to use the Visual Studio Team Services username for documentation purpose. Then select the desired repository. Jenkins will automatically discover all the branches of your Git repository and the existing pull requests and create on "sub job" per branch and per pull request. |