@@ -54,6 +54,11 @@ resource_types:
5454 source :
5555 repository : dpb587/github-status-resource
5656 tag : master
57+ - name : pull-request
58+ type : registry-image
59+ source :
60+ repository : teliaoss/github-pr-resource
61+ tag : v0.23.0
5762- name : slack-notification
5863 type : registry-image
5964 source :
@@ -93,6 +98,14 @@ resources:
9398 username : ((artifactory-username))
9499 password : ((artifactory-password))
95100 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/*"]
96109- name : repo-status-build
97110 type : github-status-resource
98111 icon : eye-check-outline
@@ -257,6 +270,34 @@ jobs:
257270 << : *slack-fail-params
258271 - put : repo-status-jdk15-build
259272 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
260301- name : stage-milestone
261302 serial : true
262303 plan :
@@ -412,3 +453,5 @@ groups:
412453 jobs : ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release"]
413454- name : " ci-images"
414455 jobs : ["build-ci-images"]
456+ - name : " pull-requests"
457+ jobs : [ "build-pull-requests" ]
0 commit comments