Move CI vars out of gitlab and into var files (#1808)

This commit is contained in:
Matthew Mosesohn
2017-10-18 17:28:54 +01:00
committed by GitHub
parent c9fe8fde59
commit 4efb0b78fa
21 changed files with 274 additions and 196 deletions

View File

@@ -6,7 +6,11 @@
cloud_machine_type: g1-small
mode: default
preemptible: no
ci_job_name: "{{ lookup('env', 'CI_JOB_NAME') }}"
tasks:
- name: include vars for test {{ ci_test_name }}
include_vars: "../files/{{ ci_job_name }}.yml"
- name: replace_test_id
set_fact:
test_name: "{{test_id |regex_replace('\\.', '-')}}"
@@ -32,7 +36,7 @@
credentials_file: "{{gce_credentials_file | default(omit)}}"
project_id: "{{ gce_project_id }}"
zone: "{{cloud_region}}"
metadata: '{"test_id": "{{test_id}}", "network": "{{kube_network_plugin}}", "startup-script": "{{startup_script}}"}'
metadata: '{"test_id": "{{test_id}}", "network": "{{kube_network_plugin}}", "startup-script": "{{startup_script|default("")}}"}'
tags: "build-{{test_name}},{{kube_network_plugin}}"
ip_forward: yes
service_account_permissions: ['compute-rw']
@@ -59,7 +63,6 @@
dest: "{{ inventory_path|dirname }}/group_vars/fake_hosts.yml"
when: mode in ['scale', 'separate-scale', 'ha-scale']
- name: Wait for instances
hosts: "waitfor_hosts"
gather_facts: false