Integrate TFS on-premise with Slack - tfs

Question
Is there a way to integrate my builds on TFS On-Premise (2013) with Slack?
If yes, what are the steps to do so?
Example
For example when a build fails, I would like to automatically get a message on a Channel in Slack.
Note
I already have setup a Slack channel and have the WebHook URL for it. Also added Visual Studio Team Services to the Apps in the Slack group integration settings.

Try with TfsNotificationRelay extension.
TfsNotificationRelay is an extensible plugin for Team Foundation
Server that sends notifications to Slack, HipChat and IRC.
Supported Events
XAML Build completion
vNext Build completion*
Build quality change
Work item update
Team project creation/deletion
Release creation*
Release deployment*
Git
TFVC *TFS 2015 only

Related

Jenkins connector in Microsoft team is not visible

i am trying to integrate jenkins build with Microsoft team and for that i used team 365 connector plugin. But the problem is that i can not find jenkins connector in microsoft team, i tried to search for jenkins in team connector but can not find it.
It's there. You can install it from here: https://appsource.microsoft.com/en-us/product/office/WA104380360?tab=Overview
If it doesn't show up in your version of Teams, it's because your administrator has disabled apps or Jenkins specifically. More information here: https://learn.microsoft.com/en-us/microsoftteams/admin-settings.
Now, you don't need anymore the "Jenkins connector" installed on Teams.
You could use the "Incoming Webhook" of Microsoft to get hook url.
See https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/what-are-webhooks-and-connectors
See https://teams.microsoft.com/l/app/203a1e2c-26cc-47ca-83ae-be98f960b6b2?source=app-details-dialog

Install Build for TFS 2018

I have installed Team Foundation Server 2018 Update 1 and I want to install and configure automated generated builds for the team.
In Team Foundation Management Console, there is an entry "Build and release" but there a only informations and links that are not clickable.
If I click a link, another windows opens, but the ok button stays disabled, so I do not get additional information:
In earlier releases of TFS I could install and configure the tfs build system on this place.
How I can do now in tfs2018. Do I have to install additional software and where I can download.
For one reason, we are using Visual Studio 2015 (we want upgrade later to 2017).
Go to the TFS Web interface, in the settings panel find the Agent Pool and hit the "Download Agent" link.
TFS 2018 is the first TFS version that no longer supports the XAML agent infrastructure.
You need to deploy an agent first as jessehouwing mentiond above, you can also refer to this link for detials : Deploy an agent on Windows
Then create a build definition and Enable continuous integration (CI) to automate builds. Refer to this link for details: https://learn.microsoft.com/en-us/vsts/build-release/actions/ci-cd-part-1
Below articles may also helps for you:
Build and Release in VSTS and TFS
Build and release tasks
Build and release quickstarts
Thanks for the answers. No I have found the page, where I can download the build-agent.
For TFS2018 you can download the build agent by using the following url:
https://{your_server}/DefaultCollection/_admin/_AgentPool
Like provided from Microsoft you can find it for other TFS versions:
VSTS: https://{your_account}.visualstudio.com/_admin/_AgentPool
TFS 2017: https://{your_server}/tfs/DefaultCollection/_admin/_AgentPool
TFS 2015: http://{your_server}:8080/tfs/_admin/_AgentPool

Jenkins plugin "Visual Studio Team Services Continuous Deployment" throws NullPointerException

My system is an on-premises setup for TFS 2015 and I am trying to get Release Management working with my Jenkins continuous integration system. I have recently added the ""Visual Studio Team Services Continuous Deployment" plugin to Jenkins. After finding out that I need to have Basic Authentication enabled on my TFS server to avoid a 401 - Unauthorized: Access is denied due to invalid credentials. error I am getting to the next error: NullPointerException.
I have looked through the code for the vsts-cd-plugin to see that there is an explicit reference to this API call that I don't believe is in TFS 2015 Update 3...
"/_apis/release/releases?api-version=3.0-preview.2"
Has anyone been successful in using the vsts-cd-plugin with Jenkins and an on-premises TFS 2015 setup? Does anyone have a suggestion on how I can fix this problem to create a TFS Release from Jenkins?
The API version 3.0-preview.2 is for Visual Studio Team Services, it is not included in On-premise TFS. In On-premise TFS, you need to use 2.2-preview.1.
api-version = 3.0-preview.1
Using on-premises: An earlier, and slightly different, version of this
Release Management API is available in Team Foundation Server 2015
Update 2. To use, you must specify an API version of 2.2-preview.1.
New release references a release definition to deploy an application
comprising of one/
You can try to download the source code of the plugin and update the API version and then build it on your local machine and install it in Jenkins.

How to trigger jenkins build when changes are commited to TFS?

I have a maven project in Jenkins (which is a selenium- java project), web-Developers use TFS , I want to execute my selenium tests as soon as developers push their code change to TFS.
If you are using Visual Studio Team Services, then you can store your code in Visual Studio Team Services and continue to use Jenkins for your continuous integration builds. You can trigger a Jenkins build when you push code to your team project's Git repository or when you check code in to Team Foundation version control:
If you haven't already, set up a Jenkins server. If you're setting up Jenkins on-premises, enable HTTPS.
In Jenkins, create a new item. Create the type of build that's appropriate for your project.
Set the URL for your Git repository in Visual Studio Team Services. The URL is in the form https://{VSTS account}.visualstudio.com/DefaultCollection/_git/{team project}.
If you haven't already, enable alternate credentials in your Visual Studio Team Services profile. Be sure to set a secondary user name because you won't be able to use your email account to connect Visual Studio Team Services to Jenkins.
Go to your team project's administration page. On the Service Hooks tab, create a subscription. Add Jenkins.
Pick the event from Visual Studio Team Services that you want to trigger a Jenkins build.
Configure the action to take in Jenkins. Now, when that event occurs in Visual Studio Team Services, your Jenkins build will be triggered.
Check:https://www.visualstudio.com/en-us/get-started/integrate/service-hooks/jenkins-and-vso-vs

Can we use TFS as Source Code Repository for Salesforce?

Can we use TFS as Source Code Repository for Salesforce? If yes then is there any TFS/Salesforce API which can be used to fetch the latest code from Salesforce Dev Org?
You can store your code in any SCM system. Salesforce orgs also have meta-data that affect configuration and this must be exported, usually via an SFDC plug-in to an IDE like eclipse. Deploying code to SFDC must be through their interfaces and requires test code. This could all be scripted in .NET / PS via SFDC API, but that is beyond the scope of a post like this IMO.
Yes. You can fetch the code from Project collection and deploy into Sandbox.
However, the command line fetch from TFS is still evolving and in TFS 2013 , there are some new changes.
AutoRABIT - a release management suite for Salesforce Applications has support for deployments from Team Foundation Server [ TFS 2013 ] - Salesforce Sandbox or auto-commit from Sandbox to TFS .
Niranjan

Resources