summaryrefslogtreecommitdiffstats
path: root/vagrant/ansible/roles/client.test.prep/tasks/main.yml
blob: 98abe1d22c7757b79d4bca8191eb4ab7a4263c61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
- 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}}"

- name: Fetching tests repo
  git:
    repo: "{{ test_repo }}"
    version: "{{ test_repo_branch }}"
    dest: /root/samba-integration-tests

- name: Create a symlink for test-info.yml file
  file:
    src: /root/test-info.yml
    dest: /root/samba-integration-tests/test-info.yml
    owner: root
    group: root
    state: link