David Shrewsbury 7760676d94 Migrate legacy jobs for feature/zuulv3 branch
The nodepool-functional-py35 and nodepool-functional-py35-src
jobs are copied directly from the master branch since there is
currently a zuulv3 bug preventing us from using those jobs in
this branch.

Change-Id: If8636dc36dbab145ef976ce3dd38dd3b593ef1b1
Depends-On: I22007434b38129379690f4e469a1981ed7dcb68c
2017-10-24 11:42:56 -04:00

53 lines
1.8 KiB
YAML

- hosts: all
name: Autoconverted job legacy-zuul-nodepool from old job gate-zuul-nodepool
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 likelyhood 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: openstack-infra/zuul
dest: .
EOF
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
git://git.openstack.org openstack-infra/zuul
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: tools/nodepool-integration-setup.sh
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: /usr/local/jenkins/slave_scripts/run-tox.sh nodepool
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'