project-config/jenkins/jobs/sqlalchemy-migrate.yaml
James Polley aeadb73010 Always use sudo -H when pip installing
Recent versions of pip will create ~/.cache if it doesn't already exist.

If this happens while running "sudo pip" the resulting dir will be owned
by root and 700 - which breaks anything else on the system that wants to
use ~/.cache

I *think* this finds all instances of "sudo pip" in this repo and fixes
them to use -H. This should mean they always run in the right ~

Change-Id: I47ddb3b591df6ac2100f09b38c9b8a03cb1ba1ff
closes-bug: #1405732
2014-12-26 10:41:58 +01:00

38 lines
1.1 KiB
YAML

- job-template:
name: '{pipeline}-sqlalchemy-migrate-devstack-dsvm{branch-designator}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 185
- timestamps
builders:
- link-logs
- net-info
- devstack-checkout
- shell: |
#!/bin/bash -xe
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TIMEOUT=180
export PROJECTS="stackforge/sqlalchemy-migrate $PROJECTS"
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_TEMPEST_FULL=1
export BRANCH_OVERRIDE={branch-override}
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
function pre_test_hook {{
cd /opt/stack/new/sqlalchemy-migrate
sudo -H pip install .
}}
export -f pre_test_hook
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
publishers:
- devstack-logs
- console-log