Clone zuul into workspace in gate-zuul-nodepool
In order to use the run-tox macro, we need zuul to be in the job workspace. Change-Id: I59881626625b36d5f93a38277e8aa07cf2e27800
This commit is contained in:
parent
e6c7bc63ed
commit
1a258f41d5
@ -447,9 +447,9 @@
|
||||
node: ubuntu-xenial
|
||||
|
||||
builders:
|
||||
- zuul-clone:
|
||||
- zuul-clone-workspace:
|
||||
project: openstack-infra/zuul
|
||||
- shell: openstack-infra/zuul/tools/nodepool-integration-setup.sh
|
||||
- shell: tools/nodepool-integration-setup.sh
|
||||
- run-tox:
|
||||
envlist: 'nodepool'
|
||||
|
||||
|
@ -321,6 +321,33 @@
|
||||
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
|
||||
git://git.openstack.org {project}
|
||||
|
||||
- builder:
|
||||
name: zuul-clone-workspace
|
||||
builders:
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
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: {project}
|
||||
dest: .
|
||||
EOF
|
||||
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
|
||||
git://git.openstack.org {project}
|
||||
|
||||
- builder:
|
||||
name: revoke-sudo
|
||||
builders:
|
||||
|
Loading…
Reference in New Issue
Block a user