File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 21
21
tasks :
22
22
- name : Determine cluster stack directory
23
23
block :
24
+ - name : Get PR details
25
+ ansible.builtin.uri :
26
+ url : " https://api.github.com/repos/{{ zuul.project.name }}/pulls/{{ zuul.change }}"
27
+ body_format : json
28
+ headers :
29
+ Accept : application/vnd.github+json
30
+ X-GitHub-Api-Version : 2022-11-28
31
+ register : pull_request
32
+ when : zuul.change is defined # execute when the e2e pipeline is initiated on a PR
33
+ - name : Set facts when the e2e pipeline is initiated on a PR
34
+ ansible.builtin.set_fact :
35
+ git_branch_name : " {{ pull_request.json.head.ref }}"
36
+ git_repository_url : " {{ pull_request.json.head.repo.clone_url }}"
37
+ when : zuul.change is defined # execute when the e2e pipeline is initiated on a PR
38
+ - name : Checkout to PR branch
39
+ ansible.builtin.git :
40
+ repo : " {{ git_repository_url }}"
41
+ clone : false
42
+ dest : " {{ project_dir }}"
43
+ version : " {{ git_branch_name }}"
44
+ when : zuul.change is defined # execute when the e2e pipeline is initiated on a PR
24
45
- name : Make sure directory structure exists
25
46
ansible.builtin.file :
26
47
path : " {{ item }}"
You can’t perform that action at this time.
0 commit comments