James E. Blair 45ea4ecf3a Don't remove $WORKSPACE on propsal jobs
These jobs used to run on a long-lived node, and we needed to periodically
clean out the jenkins home dir of workspaces or the disk would fill.  Now
they run on single-use nodes and we don't.  Moreover, removing everything
in the homedir also removes the prepared git repos in v3, which makes the
jobs fail.

Change-Id: I86bc40885abea73bb90aee3998c1938e26f6e1f8
2017-10-08 06:56:31 -07:00

51 lines
1.5 KiB
YAML

- hosts: all
name: Autoconverted job legacy-propose-requirements-constraints-master from old
job propose-requirements-constraints-master
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -x
sudo rm -f /etc/sudoers.d/zuul
# Prove that general sudo access is actually revoked
! sudo -n true
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export BRANCH=master
CLONEMAP=`mktemp`
function cleanup {
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 \
--branch=$BRANCH \
git://git.openstack.org $ZUUL_PROJECT
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
export ZUUL_REFNAME=master
/usr/local/jenkins/slave_scripts/propose_update.sh \
requirements-constraints
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'