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

Commit 0551b75

Browse files
committed
jenkins with github webhook
Signed-off-by: lwsanty <lwsanty@gmail.com>
1 parent 58aabed commit 0551b75

File tree

2 files changed

+33
-17
lines changed

2 files changed

+33
-17
lines changed

assets/skeleton/bindata.go

+18-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/skeleton/Jenkinsfile.tpl

+15-7
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,21 @@ spec:
3838
PROM_ADDRESS = "http://prom-pushgateway-prometheus-pushgateway.monitoring.svc.cluster.local:9091"
3939
PROM_JOB = "bblfsh_perfomance"
4040
}
41-
// TODO(lwsanty): https://github.com/src-d/infrastructure/issues/992
42-
// this is polling for every 2 minutes
43-
// however it's better to use trigger curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository>
44-
// https://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/
45-
// the problem is that it requires Jenkins to be accessible from the hook side
46-
// probably Travis CI could trigger Jenkins after all unit tests have passed...
47-
triggers { pollSCM('H/2 * * * *') }
41+
triggers {
42+
GenericTrigger(
43+
genericVariables: [
44+
[key: 'ref', value: '$.ref']
45+
],
46+
token: '{{.Manifest.Language}}-driver',
47+
causeString: 'Triggered on $ref',
48+
49+
printContributedVariables: true,
50+
printPostContent: true,
51+
52+
regexpFilterText: '$ref',
53+
regexpFilterExpression: 'refs/heads/' + BRANCH_NAME
54+
)
55+
}
4856
stages {
4957
stage('Run transformations benchmark') {
5058
when { branch 'master' }

0 commit comments

Comments
 (0)