Office 365 Connector plugin for Jenkins
Plugin is used to send actionable messages in Outlook, Office 365 Groups, and Microsoft Teams.
- Install this plugin on your Jenkins server
- Configure it in your Jenkins job and add webhook URL obtained from office 365 connector.
job('Example Job Name') {
description 'Example description'
configure { project ->
project / 'properties' << 'jenkins.plugins.office365connector.WebhookJobProperty' {
webhooks {
'jenkins.plugins.office365connector.Webhook' {
name('Example Webhook Name')
url('https://outlook.office.com/webhook/123456...')
startNotification(false)
notifySuccess(true)
notifyAborted(false)
notifyNotBuilt(false)
notifyUnstable(true)
notifyFailure(true)
notifyBackToNormal(true)
notifyRepeatedFailure(false)
timeout(30000)
macros(class: 'empty-list')
}
}
}
}
}
pipeline {
agent any
options {
office365ConnectorWebhooks([[
startNotification: true,
url: 'https://outlook.office.com/webhook/123456...'
]]
)
}
stages {
stage('Init') {
steps {
echo 'Starting!'
}
}
}
}
stage('Upload') {
steps {
// some instructions here
office365ConnectorSend webhookUrl: 'https://outlook.office.com/webhook/123456...',
message: 'Application has been [deployed](https://uat.green.biz)',
status: 'Success'
}
}
pipeline {
agent any
stages {
stage('Init') {
steps {
echo 'Hello!'
}
}
}
post {
failure {
office365ConnectorSend webhookUrl: "https://outlook.office.com/webhook/123456...",
factDefinitions: [[name: "fact1", template: "content of fact1"],
[name: "fact2", template: "content of fact2"]]
}
}
}
You may find useful below link if you like to contribute and add new feature: