CI for the TripleO project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

run.yaml 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. - hosts: all
  2. name: TripleO container image building job
  3. roles:
  4. - role: bindep
  5. bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/python-tripleoclient'].src_dir }}"
  6. tasks:
  7. - name: Include common vars
  8. include_vars:
  9. file: "common.yaml"
  10. - name: Get branch
  11. set_fact:
  12. ci_branch: "{{ zuul.branch | default('master') | replace('stable/','') }}"
  13. - name: Swap is essential as we are not meeting memory requirements
  14. include_role:
  15. name: configure-swap
  16. - name: Set legacy log path
  17. include_role:
  18. name: set-zuul-log-path-fact
  19. - name: Ensure legacy workspace directory
  20. file:
  21. path: '{{ workspace }}'
  22. state: directory
  23. - name: Ensure legacy logs directory
  24. file:
  25. path: '{{ workspace }}/logs'
  26. state: directory
  27. - name: Install pip
  28. become: true
  29. package:
  30. name: python-pip
  31. state: present
  32. - name: Install virtualenv
  33. become: true
  34. package:
  35. name: python-virtualenv
  36. state: present
  37. - name: pip install required items
  38. become: true
  39. pip:
  40. name: "{{ item }}"
  41. state: present
  42. virtualenv: "{{ workspace }}/venv"
  43. with_items:
  44. - "file://{{ openstack_git_root }}/kolla"
  45. - "file://{{ openstack_git_root }}/tripleo-common"
  46. - "file://{{ openstack_git_root }}/python-tripleoclient"
  47. # TODO(aschultz): make the kolla-build branch aware
  48. - name: Generate kolla-build.conf
  49. template:
  50. src: templates/kolla-build.conf.j2
  51. dest: "{{ workspace }}/kolla-build.conf"
  52. mode: 0644
  53. force: yes
  54. - name: Run image build
  55. args:
  56. chdir: '{{ workspace }}'
  57. shell: |
  58. set -x
  59. source {{ workspace }}/venv/bin/activate
  60. TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/tripleo-common"
  61. openstack overcloud container image build \
  62. --config-file $TRIPLEO_COMMON_PATH/container-images/overcloud_containers.yaml \
  63. --kolla-config-file {{ workspace }}/kolla-build.conf > {{ workspace }}/build.log 2> {{ workspace }}/build-err.log
  64. RESULT=$?
  65. exit $RESULT