Jeffrey Zhang b64198cce0 Moving jobs to kolla repo
This is zuulv3 migration patch. This patch only implement build jobs.
Deploy jobs will be pushed in another one.

Partial-Bug: #1720601
Change-Id: Ib9157ed132820d752ef1dbd7a53353ebd68b1934
2017-10-19 10:34:03 +08:00

52 lines
1.4 KiB
YAML

- hosts: all
vars:
kolla_inventory_path: "{{ zuul.project.src_dir }}/inventory"
tasks:
- name: generate kolla inventory file
copy:
dest: "{{ kolla_inventory_path }}"
content: |
{% for host in hostvars %}
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user={{ hostvars[host]['ansible_user'] }}
{% endfor %}
- name: setup logging
shell:
cmd: |
mkdir logs
ln -s $(pwd)/logs /tmp/logs
mkdir -p /tmp/logs/{ansible,build,kolla,kolla_configs,system_logs}
executable: /bin/bash
chdir: "{{ zuul.project.src_dir }}"
- name: copy setup script
copy:
src: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/tools/setup_{{ ansible_os_family }}.sh"
dest: /tmp/setup.sh
mode: 0755
- name: run node setup script
shell: /tmp/setup.sh
become: true
- name: changing permission of Docker socket to 666
file:
path: /run/docker.sock
mode: 666
become: true
- shell:
cmd: |
set -e
set -x
export ACTION={{ action }}
export BASE_DISTRO={{ base_distro }}
export INSTALL_TYPE={{ install_type }}
export IN_PROJECT_JOBS=1
tools/gate_run.sh
executable: /bin/bash
chdir: "{{ zuul.project.src_dir }}"
environment: '{{ zuul | zuul_legacy_vars }}'