Demo project for Jenkins CI and Slack integration using Google Cloud Functions as the webhooks and swaggy-jenkins node.js library.
Component | Description |
---|---|
slack-outgoing-webhooks | Sample configuration values and icon image |
cloudfunctions-webhooks | Google Cloud Functions serving as Slack webhooks which proxy requests to Jenkins CI |
jenkins-data | Jenkins jobs configuration files and Jenkinsfile |
Requirements:
- Install Serverless, used for managing Jenkins Slack webhooks
- Install Nestor, used for creating Jenkins jobs
Download Jenkins Slack Demo code:
git clone https://github.com/cliffano/jenkins-slack-demo
Configure slackToken
and jenkinsUrl
in cloudfunctions-webhooks/conf.json
.
Set JENKINS_URL
environment variable in the form of <protocol>://<username>:<password>@<host>:<port>
.
Create Jenkins jobs:
make create-jenkins-jobs
Deploy Jenkins Cloud Functions webhooks:
make deps deploy-cloudfunctions-webhooks
Login to Slack and create outgoing webhooks using sample values in slack-outgoing-webhooks/config.txt
as a guideline.
Presentations:
Related Projects:
- swaggy-jenkins - A set of Jenkins API clients in multiple languages generated from Swagger / Open API specification