summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Prabhu <sprabhu@redhat.com>2020-05-17 17:43:55 +0100
committerMichael Adam <obnox@samba.org>2020-05-18 13:05:50 +0200
commit20b5bd446572dbe2c45322a0611ec2553809fa56 (patch)
tree71cd47ba99234151650c3d61cc51bfb8b093dce5
parent479b4e9cf1a93eaf6d169d840c339c6dfce84f64 (diff)
downloadsamba-integration-20b5bd446572dbe2c45322a0611ec2553809fa56.tar.gz
samba-integration-20b5bd446572dbe2c45322a0611ec2553809fa56.tar.xz
samba-integration-20b5bd446572dbe2c45322a0611ec2553809fa56.zip
Allow users to specify a PR for test repo
Allow users to pass variable test_repo_pr in EXTRA_VARS to test specific prs in the test repo. example: EXTRA_VARS="test_repo_pr=59" make client.test Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
-rw-r--r--vagrant/ansible/roles/client.test.prep/tasks/main.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/vagrant/ansible/roles/client.test.prep/tasks/main.yml b/vagrant/ansible/roles/client.test.prep/tasks/main.yml
index 3e95c97..98abe1d 100644
--- a/vagrant/ansible/roles/client.test.prep/tasks/main.yml
+++ b/vagrant/ansible/roles/client.test.prep/tasks/main.yml
@@ -1,4 +1,21 @@
---
+- block:
+ - name: Fetch repo/switch to master branch
+ git:
+ repo: "{{ test_repo }}"
+ version: "master"
+ dest: /root/samba-integration-tests
+
+ - name: Fetching PR
+ git:
+ repo: "{{ test_repo }}"
+ refspec: +pull/{{ test_repo_pr }}/head:pr{{ test_repo_pr }}
+ dest: /root/samba-integration-tests
+
+ - set_fact:
+ test_repo_branch: "pr{{ test_repo_pr }}"
+ when: test_repo_pr is defined
+
- debug:
msg: "Preparing to checkout from test repo: {{ test_repo }}, branch {{test_repo_branch}}"