Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zuul] Use include_vars in prepare stage #496

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions ci/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
- name: "Prepare the environment for running stf"
hosts: controller
tasks:
- name: "Set the sto_dir if it isn't already set"
ansible.builtin.set_fact:
sto_dir: '{{ ansible_env.HOME }}/{{ zuul.project.src_dir }}'
when: sto_dir | default('') | length == 0

- name: "Get vars common to all jobs"
ansible.builtin.include_vars:
file: "vars-zuul-common.yml"

- name: "Get scenario-specific vars"
ansible.builtin.include_vars:
file: "vars-{{ scenario }}.yml"

- name: "Update pip"
ansible.builtin.pip:
name: pip
state: latest
extra_args: "-U"

- name: "Set the value of sto_dir, if it's not already defined"
ansible.builtin.set_fact:
sto_dir: "{{ ansible_env.HOME }}/{{ zuul.project.src_dir }}"
when: not (sto_dir is defined)

- name: "Install pre-reqs from pip"
ansible.builtin.pip:
requirements: "build/stf-run-ci/requirements.txt"
Expand Down