allow specifying custom tobiko gerrit
refsec for checking out and testing a specific patch Change-Id: I8e7b3ac16700fd28ef6f00577e822838713904d9
This commit is contained in:
parent
52e9f80a19
commit
c0d8e38d03
@ -11,10 +11,35 @@
|
|||||||
name: "{{ required_packages }}"
|
name: "{{ required_packages }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: "Ensure {{ test.dir }} doesn't exist"
|
||||||
|
file:
|
||||||
|
path: "{{ test.dir }}"
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Clone Tobiko project
|
- name: Clone Tobiko project
|
||||||
git:
|
git:
|
||||||
repo: 'https://review.opendev.org/x/tobiko'
|
repo: 'https://review.opendev.org/x/tobiko'
|
||||||
dest: "{{ test.dir }}"
|
dest: "{{ test.dir }}"
|
||||||
|
when: test.refsec == ''
|
||||||
|
|
||||||
|
- name: Checkout specific gerrit patch
|
||||||
|
git:
|
||||||
|
repo: 'https://review.opendev.org/x/tobiko'
|
||||||
|
dest: "{{ test.dir }}"
|
||||||
|
refspec: "{{ test.refsec }}"
|
||||||
|
version: 'FETCH_HEAD'
|
||||||
|
when: test.refsec != ''
|
||||||
|
|
||||||
|
- name: output gerrit patch log
|
||||||
|
shell: |
|
||||||
|
git log -n 1
|
||||||
|
register: git_log
|
||||||
|
args:
|
||||||
|
chdir: "{{ test.dir }}"
|
||||||
|
when: test.refsec != ''
|
||||||
|
|
||||||
|
- debug: var=git_log.stdout_lines
|
||||||
|
when: test.refsec != ''
|
||||||
|
|
||||||
- name: Create Virtualenv
|
- name: Create Virtualenv
|
||||||
vars:
|
vars:
|
||||||
@ -24,6 +49,10 @@
|
|||||||
name: "{{ packages }}"
|
name: "{{ packages }}"
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
|
args:
|
||||||
|
chdir: "{{ test.dir }}"
|
||||||
|
when: test.gerrit-patch != ''
|
||||||
|
|
||||||
- name: Install Tobiko
|
- name: Install Tobiko
|
||||||
pip:
|
pip:
|
||||||
chdir: "{{ test.dir }}"
|
chdir: "{{ test.dir }}"
|
||||||
|
@ -41,3 +41,10 @@ subparsers:
|
|||||||
help: |
|
help: |
|
||||||
The set of tests to execute
|
The set of tests to execute
|
||||||
default: neutron
|
default: neutron
|
||||||
|
refsec:
|
||||||
|
type: Value
|
||||||
|
help: |
|
||||||
|
specific gerrit patch refsec to
|
||||||
|
checkout, example:
|
||||||
|
--refsec refs/changes/66/665966/7
|
||||||
|
default: ''
|
||||||
|
Loading…
Reference in New Issue
Block a user