diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2020-05-17 17:43:55 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2020-05-18 13:05:50 +0200 |
commit | 20b5bd446572dbe2c45322a0611ec2553809fa56 (patch) | |
tree | 71cd47ba99234151650c3d61cc51bfb8b093dce5 /vagrant/ansible/roles/client.test.prep/tasks/main.yml | |
parent | 479b4e9cf1a93eaf6d169d840c339c6dfce84f64 (diff) | |
download | samba-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>
Diffstat (limited to 'vagrant/ansible/roles/client.test.prep/tasks/main.yml')
-rw-r--r-- | vagrant/ansible/roles/client.test.prep/tasks/main.yml | 17 |
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}}" |