Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
jenkins with github webhook
Browse files Browse the repository at this point in the history
Signed-off-by: lwsanty <[email protected]>
  • Loading branch information
lwsanty committed Oct 30, 2019
1 parent 58aabed commit 0551b75
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
28 changes: 18 additions & 10 deletions assets/skeleton/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 15 additions & 7 deletions etc/skeleton/Jenkinsfile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,21 @@ spec:
PROM_ADDRESS = "http://prom-pushgateway-prometheus-pushgateway.monitoring.svc.cluster.local:9091"
PROM_JOB = "bblfsh_perfomance"
}
// TODO(lwsanty): https://github.com/src-d/infrastructure/issues/992
// this is polling for every 2 minutes
// however it's better to use trigger curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository>
// https://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/
// the problem is that it requires Jenkins to be accessible from the hook side
// probably Travis CI could trigger Jenkins after all unit tests have passed...
triggers { pollSCM('H/2 * * * *') }
triggers {
GenericTrigger(
genericVariables: [
[key: 'ref', value: '$.ref']
],
token: '{{.Manifest.Language}}-driver',
causeString: 'Triggered on $ref',
printContributedVariables: true,
printPostContent: true,
regexpFilterText: '$ref',
regexpFilterExpression: 'refs/heads/' + BRANCH_NAME
)
}
stages {
stage('Run transformations benchmark') {
when { branch 'master' }
Expand Down

0 comments on commit 0551b75

Please sign in to comment.