mistral/playbooks/legacy/mistral-ha/run.yaml
zhulingjie 46fd1b8a75 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I52d44a333d2eaa4a2e65c150e3640a4a84e291aa
2019-04-24 15:44:25 +08:00

55 lines
2.0 KiB
YAML

- hosts: all
name: Autoconverted job legacy-mistral-ha from old job gate-mistral-ha-ubuntu-xenial-nv
roles:
- role: bindep
bindep_dir: "{{ ansible_user_dir }}/workspace"
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
CLONEMAP=`mktemp`
function cleanup {
# In cases where zuul-cloner is aborted during a git
# clone operation, git will remove the git work tree in
# its cleanup. The work tree in these jobs is the
# workspace directory, which means that subsequent
# jenkins post-build actions can not run because the
# workspace has been removed.
# To reduce the likelihood of this having an impact,
# recreate the workspace directory if needed
mkdir -p $WORKSPACE
rm -f $CLONEMAP
}
trap cleanup EXIT
cat > $CLONEMAP << EOF
clonemap:
- name: $ZUUL_PROJECT
dest: .
EOF
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
https://opendev.org $ZUUL_PROJECT
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
# TODO: this is a temporary solution that puts all installation
# code into a script residing in mistral repo just for more
# convenient debugging (since we will be able to send patchsets to
# mistral with "check experimental" and trigger the gate). After
# it's ready it'll be better to create a special builder in this
# file.
ha_gate/install.sh
ha_gate/run_tests.sh
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'