Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (35 sloc) 1.39 KB
- hosts: primary
vars:
ci_config_repo: "{{ ansible_user_dir }}/{{ zuul.projects['review.rdoproject.org/config'].src_dir }}"
workspace: "{{ ansible_user_dir }}/workspace"
tasks:
- name: Build containers
block:
- name: Set zuul-log-path fact
include_role:
name: set-zuul-log-path-fact
- name: Run container build script
shell: |
export RELEASE="{{ release }}"
export DISTRO_NAME="{{ ansible_distribution|lower }}"
export DISTRO_VERSION="{{ ansible_distribution_major_version }}"
bash -xe {{ ci_config_repo }}/ci-scripts/tripleo-upstream/build-containers-images.sh
args:
chdir: "{{ workspace }}"
environment: "{{ zuul | zuul_legacy_vars | combine({'REGISTRY_PASSWORD': rdo_registry.token}) }}"
always:
- name: Copy logs to logpath
shell: |
export LOG_PATH="{{ workspace }}/logs"
mkdir -p $LOG_PATH
cp -a /tmp/kolla $LOG_PATH/
# Ensure permissions allow artifact uploading
sudo chown -R "$(id -u).$(id -g)" $LOG_PATH
args:
chdir: "{{ workspace }}"
environment: "{{ zuul | zuul_legacy_vars }}"
when: zuul_success|bool
- name: Print container build status
debug:
msg: "Containers build for {{ release }} skipped, run has failed."
when: not zuul_success|bool
You can’t perform that action at this time.