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:
commit
a9631736e2
|
@ -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
|
Loading…
Reference in New Issue