Add a simple Jenkinsfile to act as a webhook trigger

This must be triggered after the master Pipeline run for evergreen has
completed, in order to ensure that the evergreen backend is properly notified of
the last successful run .

Fixes JENKINS-53538
This commit is contained in:
R. Tyler Croy 2018-09-27 10:08:56 -07:00
commit a9631736e2
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 27 additions and 0 deletions

27
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,27 @@
pipeline {
agent any
triggers {
upstream 'Infra/evergreen/master'
}
stages {
stage('Notify webhook') {
environment {
TOKEN = credentials('evergreen-upload-token')
}
steps {
echo 'Simulating a GitHub webhook call to the evergreen-upload Azure Function'
sh '''
curl -v --fail -H 'X-GitHub-Event: push' \
-d '{"ref":"refs/heads/master", "repository": {"full_name" : "jenkins-infra/evergreen"}, "commits": []}' \
https://jenkins-infra-functions.azurewebsites.net/api/evergreen-upload?code=${TOKEN}&clientId=default
'''
echo '..webhook notified'
}
}
}
}
// vim: ft=groovy