
Depends-On: I4a5ac77948ddb65944b0852b03122190a659269b Change-Id: If126f32a301c5bd0a2c50b6b9c6b0d8ef2cdf7ca
83 lines
2.6 KiB
YAML
83 lines
2.6 KiB
YAML
---
|
|
- block:
|
|
- include_role: name=tobiko-ir-jenkins
|
|
when: "(lookup('env','JENKINS_URL') | length) > 0"
|
|
|
|
- name: "consolidate deploy facts"
|
|
set_fact:
|
|
tobiko_dir: '{{ tobiko_dir | realpath }}'
|
|
tobiko_src_dir: '{{ tobiko_src_dir | realpath }}'
|
|
tobiko_git_repo: '{{ tobiko_git_repo }}'
|
|
tobiko_git_refspec: "{{ tobiko_git_refspec }}"
|
|
tobiko_git_remote: "{{ tobiko_git_remote }}"
|
|
test_dir: '{{ test_dir | realpath }}'
|
|
test_src_dir: '{{ test_src_dir | realpath }}'
|
|
test_git_repo: '{{ test_git_repo }}'
|
|
test_git_refspec: "{{ test_git_refspec }}"
|
|
test_git_remote: "{{ test_git_remote }}"
|
|
|
|
- name: "deploy Tobiko files"
|
|
include_role: name=tobiko-ir-deploy
|
|
vars:
|
|
deploy_dir: '{{ tobiko_dir }}'
|
|
deploy_src_dir: '{{ tobiko_src_dir }}'
|
|
deploy_git_repo: '{{ tobiko_git_repo }}'
|
|
deploy_git_refspec: "{{ tobiko_git_refspec }}"
|
|
deploy_git_remote: '{{ tobiko_git_remote }}'
|
|
|
|
- name: "deploy test files"
|
|
include_role: name=tobiko-ir-deploy
|
|
vars:
|
|
deploy_dir: '{{ test_dir }}'
|
|
deploy_src_dir: '{{ test_src_dir }}'
|
|
deploy_git_repo: '{{ test_git_repo }}'
|
|
deploy_git_refspec: "{{ test_git_refspec }}"
|
|
deploy_git_remote: '{{ test_git_remote }}'
|
|
when: test_dir != tobiko_dir
|
|
|
|
- name: deploy OpenShift InfraRed plugin files
|
|
include_role: name=tobiko-ir-deploy
|
|
vars:
|
|
deploy_dir: '{{ openshift_infrared_dir | realpath }}'
|
|
deploy_src_dir: '{{ openshift_infrared_src_dir | realpath }}'
|
|
|
|
deploy_git_repo: '{{ openshift_infrared_git_repo }}'
|
|
deploy_git_refspec: '{{ openshift_infrared_git_refspec }}'
|
|
deploy_git_remote: '{{ openshift_infrared_git_remote }}'
|
|
|
|
- name: apply pre-requisites before tests run
|
|
include_role: name=tobiko-ir-before-run
|
|
|
|
- name: "download images"
|
|
include_role: name=tobiko-download-images
|
|
|
|
- name: "initialize test execution"
|
|
include_role: name=tobiko-configure
|
|
|
|
- name: "run tests"
|
|
include_role: name=tobiko-run
|
|
|
|
rescue:
|
|
- name: "clean up heat stacks generated during tobiko tests"
|
|
include_role: name=tobiko-cleanup
|
|
when: stacks_cleanup
|
|
|
|
- name: "finalize test execution"
|
|
include_role: name=tobiko-collect
|
|
ignore_errors: yes
|
|
|
|
- fail:
|
|
msg: 'TEST EXECUTION FAILED'
|
|
|
|
|
|
- name: "clean up heat stacks generated during tobiko tests"
|
|
include_role: name=tobiko-cleanup
|
|
when: stacks_cleanup
|
|
|
|
- name: "finalize test execution"
|
|
include_role: name=tobiko-collect
|
|
|
|
|
|
- debug:
|
|
msg: 'TEST EXECUTION SUCCEEDED'
|