{"id":19725,"date":"2016-08-18T06:50:41","date_gmt":"2016-08-18T10:50:41","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/?p=19725"},"modified":"2019-02-14T17:33:45","modified_gmt":"2019-02-15T01:33:45","slug":"tfs-integration-jenkins-jobs-pipelines-artifacts","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/tfs-integration-jenkins-jobs-pipelines-artifacts\/","title":{"rendered":"Team Services Integration with Jenkins Jobs, Pipelines, and Artifacts"},"content":{"rendered":"<p>Team Services now integrates even better\u00a0with Jenkins. \u00a0<span>The &#8220;Jenkins Queue Job&#8221; and &#8220;Jenkins Download Artifacts&#8221;\u00a0tasks are\u00a0useful for blending Team Services and Jenkins build and release steps. Why would Microsoft choose\u00a0to integrate with Jenkins when Team Services has its own highly-capable <a href=\"https:\/\/beta.visualstudio.com\/team-services\/continuous-integration\/\">build<\/a> and <a href=\"https:\/\/beta.visualstudio.com\/team-services\/release-management\/\">release<\/a> systems? \u00a0Our goal is to integrate\u00a0with whatever tools work best for your team. \u00a0Here are some\u00a0example scenarios:<\/span><\/p>\n<ul>\n<li>Use Jenkins to validate your <a href=\"https:\/\/beta.visualstudio.com\/team-services\/git\/\">Team Services pull requests<\/a><\/li>\n<li>Use Jenkins continuous integration for your <a href=\"https:\/\/beta.visualstudio.com\/team-services\/git\/\">Team Services Git<\/a> repository<\/li>\n<li>Use Jenkins to test or deploy your <a href=\"https:\/\/beta.visualstudio.com\/team-services\/continuous-integration\/\">Team Services build<\/a><\/li>\n<li>Download Jenkins build artifacts for use in a Team Services <a href=\"https:\/\/beta.visualstudio.com\/team-services\/testing-tools\/\">test<\/a>, <a href=\"https:\/\/beta.visualstudio.com\/team-services\/continuous-integration\/\">build<\/a>, or <a href=\"https:\/\/beta.visualstudio.com\/team-services\/release-management\/\">release<\/a><\/li>\n<\/ul>\n<p>The &#8220;Jenkins Queue Job&#8221; task was initially <a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/07\/12\/jenkins-queue-job-build-task\/\">introduced<\/a>\u00a0in July, 2016. \u00a0The task now has support for parameterized Jenkins jobs and tracks full Jenkins pipelines. \u00a0It also now supports\u00a0self-signed server certificates and Jenkins crumb security for protection against\u00a0<a href=\"https:\/\/wiki.jenkins-ci.org\/display\/JENKINS\/CSRF+Protection\">cross-site request forgery (CSRF) exploits<\/a>. Because the task runs in a light-weight, long-polling <a href=\"https:\/\/github.com\/Microsoft\/vsts-agent\">agent<\/a> that can be installed on\u00a0your Jenkins server, it obviates the need to modify\u00a0inbound\u00a0firewall rules for Team Services to queue\u00a0Jenkins jobs.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/JenkinsQueueJob104.png\"><img decoding=\"async\" width=\"974\" height=\"496\" class=\"alignnone wp-image-19735 size-full\" alt=\"Jenkins Queue Job task\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/JenkinsQueueJob104.png\" \/><\/a><\/p>\n<p>When capturing pipelines, the task console will capture the console output for the full Jenkins job pipeline:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/JenkinsQueueJobConsole.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/JenkinsQueueJobConsole.png\" alt=\"Jenkins Queue Job console\" width=\"885\" height=\"554\" class=\"alignnone wp-image-19815 size-full\" \/><\/a><\/p>\n<p>A pipeline job tree is rendered in the Team Services build summary\u00a0for traceability:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/JenkinsResultTree.png\"><img decoding=\"async\" width=\"945\" height=\"608\" class=\"alignnone wp-image-19765 size-full\" alt=\"Jenkins Queue Job build summary\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/JenkinsResultTree.png\" \/><\/a><\/p>\n<p>New in August, 2016\u00a0is the &#8220;Jenkins Download Artifacts&#8221; task.\u00a0 This task makes it easy to download build artifacts from Jenkins and integrate them into your\u00a0Team Services build or release process.\u00a0 Once artifacts are downloaded, they can be used by other tasks as demonstrated in the video below.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/JenkinsDownloadArtifacts104.png\"><img decoding=\"async\" width=\"978\" height=\"358\" class=\"alignnone wp-image-19755 size-full\" alt=\"Jenkins Download Artifacts task\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/JenkinsDownloadArtifacts104.png\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><iframe title=\"Follow Jenkins Pipelines and Download Artifacts with Visual Studio Team Services\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/9F7Gmc13oDM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>Both\u00a0tasks are\u00a0<a target=\"_blank\" href=\"https:\/\/github.com\/Microsoft\/vsts-tasks\">open-sourced<\/a>. Contributions are welcome, and feel free to use these as a pattern to create\u00a0your own <a href=\"https:\/\/www.visualstudio.com\/docs\/integrate\/extensions\/overview\">extensions<\/a> in the <a href=\"https:\/\/marketplace.visualstudio.com\/vsts\">Team Services Marketplace<\/a>. If you have any suggestions or find issues, reach out to us on <a target=\"_blank\" href=\"https:\/\/github.com\/Microsoft\/vsts-tasks\/issues\">GitHub<\/a>.<\/p>\n<p>Note that these tasks are available today in Team Services and will be available in the next version of Team Foundation Server for on-premises installations.<\/p>\n<p>Also check out <a target=\"_blank\" href=\"https:\/\/visualstudio.microsoft.com\">Team Services for Java<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Team Services now integrates even better\u00a0with Jenkins. \u00a0The &#8220;Jenkins Queue Job&#8221; and &#8220;Jenkins Download Artifacts&#8221;\u00a0tasks are\u00a0useful for blending Team Services and Jenkins build and release steps. Why would Microsoft choose\u00a0to integrate with Jenkins when Team Services has its own highly-capable build and release systems? \u00a0Our goal is to integrate\u00a0with whatever tools work best for your [&hellip;]<\/p>\n","protected":false},"author":178,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-19725","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"acf":[],"blog_post_summary":"<p>Team Services now integrates even better\u00a0with Jenkins. \u00a0The &#8220;Jenkins Queue Job&#8221; and &#8220;Jenkins Download Artifacts&#8221;\u00a0tasks are\u00a0useful for blending Team Services and Jenkins build and release steps. Why would Microsoft choose\u00a0to integrate with Jenkins when Team Services has its own highly-capable build and release systems? \u00a0Our goal is to integrate\u00a0with whatever tools work best for your [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/19725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/178"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=19725"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/19725\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=19725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=19725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=19725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}