@@ -54,6 +54,11 @@ resource_types:
54
54
source :
55
55
repository : dpb587/github-status-resource
56
56
tag : master
57
+ - name : pull-request
58
+ type : registry-image
59
+ source :
60
+ repository : teliaoss/github-pr-resource
61
+ tag : v0.23.0
57
62
- name : slack-notification
58
63
type : registry-image
59
64
source :
@@ -93,6 +98,14 @@ resources:
93
98
username : ((artifactory-username))
94
99
password : ((artifactory-password))
95
100
build_name : ((build-name))
101
+ - name : git-pull-request
102
+ type : pull-request
103
+ icon : source-pull
104
+ source :
105
+ access_token : ((github-ci-pull-request-token))
106
+ repository : ((github-repo-name))
107
+ base_branch : ((branch))
108
+ ignore_paths : ["ci/*"]
96
109
- name : repo-status-build
97
110
type : github-status-resource
98
111
icon : eye-check-outline
@@ -257,6 +270,34 @@ jobs:
257
270
<< : *slack-fail-params
258
271
- put : repo-status-jdk15-build
259
272
params : { state: "success", commit: "git-repo" }
273
+ - name : build-pull-requests
274
+ serial : true
275
+ public : true
276
+ plan :
277
+ - get : ci-image
278
+ - get : git-repo
279
+ resource : git-pull-request
280
+ trigger : true
281
+ version : every
282
+ - do :
283
+ - put : git-pull-request
284
+ params :
285
+ path : git-repo
286
+ status : pending
287
+ - task : build-pr
288
+ image : ci-image
289
+ file : git-repo/ci/tasks/build-pr.yml
290
+ << : *build-project-task-params
291
+ on_success :
292
+ put : git-pull-request
293
+ params :
294
+ path : git-repo
295
+ status : success
296
+ on_failure :
297
+ put : git-pull-request
298
+ params :
299
+ path : git-repo
300
+ status : failure
260
301
- name : stage-milestone
261
302
serial : true
262
303
plan :
@@ -412,3 +453,5 @@ groups:
412
453
jobs : ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release"]
413
454
- name : " ci-images"
414
455
jobs : ["build-ci-images"]
456
+ - name : " pull-requests"
457
+ jobs : [ "build-pull-requests" ]
0 commit comments