Merge "Add ability to pass environment to gate runner from job"

This commit is contained in:
Zuul 2021-05-11 20:11:47 +00:00 committed by Gerrit Code Review
commit bfe8cd3b00

View File

@ -10,14 +10,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Set default_zuul_dir
set_fact:
default_zuul_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
- name: Set env facts
set_fact:
local_environment:
AIRSHIP_CONFIG_PHASE_REPO_URL: "{{ remote_work_dir | default(local_src_dir) | default(default_zuul_dir) }}"
SITE: "{{ site | default('test-site') }}"
job_environment: "{{ job_environment | default({}) }}"
- name: "Run script {{ gate_script_path }}"
environment: "{{ local_environment | combine(job_environment) }}"
shell: |
set -xe;
{{ gate_script_path }}
args:
chdir: "{{ zuul.project.src_dir }}"
vars:
default_zuul_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
environment:
AIRSHIP_CONFIG_PHASE_REPO_URL: "{{ remote_work_dir | default(local_src_dir) | default(default_zuul_dir) }}"
SITE: "{{ site | default('test-site') }}"