Integration tests: differentiate labels for different pipelines
zuul.change isn't available in the post and periodic pipelines so we shouldn't try to include it. We're splitting this into a different file so we can add more things later. Change-Id: I53a257aafba395e07afc0a1755e26cab28c1b2f0
This commit is contained in:
parent
ad8803318f
commit
c5df7f2cd6
@ -89,14 +89,8 @@
|
|||||||
command: "{{ ara_api_venv_path }}/bin/python -m ara.setup.plugins"
|
command: "{{ ara_api_venv_path }}/bin/python -m ara.setup.plugins"
|
||||||
register: ara_setup_plugins
|
register: ara_setup_plugins
|
||||||
|
|
||||||
- name: Set default labels with Zuul
|
- name: Record Zuul metadata for ARA playbooks
|
||||||
set_fact:
|
include_tasks: zuul_metadata.yaml
|
||||||
_default_labels:
|
|
||||||
- "nodepool.provider:{{ nodepool.provider }}"
|
|
||||||
- "zuul.change:{{ zuul.change }}"
|
|
||||||
- "zuul.executor:{{ zuul.executor.hostname }}"
|
|
||||||
- "zuul.pipeline:{{ zuul.pipeline }}"
|
|
||||||
- "zuul.project:{{ zuul.project.canonical_name }}"
|
|
||||||
when: zuul is defined
|
when: zuul is defined
|
||||||
|
|
||||||
- name: Template an ansible.cfg file
|
- name: Template an ansible.cfg file
|
||||||
|
@ -63,14 +63,8 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
register: ara_setup_plugins
|
register: ara_setup_plugins
|
||||||
|
|
||||||
- name: Set default labels with Zuul
|
- name: Record Zuul metadata for ARA playbooks
|
||||||
set_fact:
|
include_tasks: zuul_metadata.yaml
|
||||||
_default_labels:
|
|
||||||
- "nodepool.provider:{{ nodepool.provider }}"
|
|
||||||
- "zuul.change:{{ zuul.change }}"
|
|
||||||
- "zuul.executor:{{ zuul.executor.hostname }}"
|
|
||||||
- "zuul.pipeline:{{ zuul.pipeline }}"
|
|
||||||
- "zuul.project:{{ zuul.project.canonical_name }}"
|
|
||||||
when: zuul is defined
|
when: zuul is defined
|
||||||
|
|
||||||
# These aren't in the same task (i.e, with loop) so we can tell individual test
|
# These aren't in the same task (i.e, with loop) so we can tell individual test
|
||||||
|
24
tests/zuul_metadata.yaml
Normal file
24
tests/zuul_metadata.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
- name: Set default labels for check, gate and promote pipelines
|
||||||
|
set_fact:
|
||||||
|
_default_labels:
|
||||||
|
- "nodepool.provider:{{ nodepool.provider }}"
|
||||||
|
- "zuul.change:{{ zuul.change }}"
|
||||||
|
- "zuul.executor:{{ zuul.executor.hostname }}"
|
||||||
|
- "zuul.job:{{ zuul.job }}"
|
||||||
|
- "zuul.pipeline:{{ zuul.pipeline }}"
|
||||||
|
- "zuul.project:{{ zuul.project.canonical_name }}"
|
||||||
|
when:
|
||||||
|
- zuul.pipeline is defined
|
||||||
|
- zuul.pipeline in ["check", "gate", "promote"]
|
||||||
|
|
||||||
|
- name: Set default labels for periodic and post pipelines
|
||||||
|
set_fact:
|
||||||
|
_default_labels:
|
||||||
|
- "nodepool.provider:{{ nodepool.provider }}"
|
||||||
|
- "zuul.executor:{{ zuul.executor.hostname }}"
|
||||||
|
- "zuul.job:{{ zuul.job }}"
|
||||||
|
- "zuul.pipeline:{{ zuul.pipeline }}"
|
||||||
|
- "zuul.project:{{ zuul.project.canonical_name }}"
|
||||||
|
when:
|
||||||
|
- zuul.pipeline is defined
|
||||||
|
- zuul.pipeline in ["periodic", "post"]
|
Loading…
x
Reference in New Issue
Block a user