Skip to content

Commit

Permalink
Fix Jenkins pipeline failing randomly (#215)
Browse files Browse the repository at this point in the history
Use sepatarate pip cache dir per worker and parallel step
see pypa/pip#5345
  • Loading branch information
olovy authored Aug 27, 2019
1 parent fd8eb42 commit 23846a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,15 @@ pipeline {
sh 'npm install'
sh 'npm run build'
},
// use separate pip cache dir per worker and parallel step
// https://github.com/pypa/pip/issues/5345
'Create virtualenv (py27)': {
sh 'scl enable python27 "virtualenv $VENV_ROOT/py27venv"'
sh 'scl enable python27 "$VENV_ROOT/py27venv/bin/pip install -r requirements/dev.txt"'
sh 'scl enable python27 "$VENV_ROOT/py27venv/bin/pip --cache-dir ~/.cache/pip27/$EXECUTOR_NUMBER install -r requirements/dev.txt"'
},
'Create virtualenv (py35)': {
sh 'scl enable rh-python35 "virtualenv $VENV_ROOT/py35venv"'
sh 'scl enable rh-python35 "$VENV_ROOT/py35venv/bin/pip install -r requirements/dev.txt"'
sh 'scl enable rh-python35 "$VENV_ROOT/py35venv/bin/pip --cache-dir ~/.cache/pip35/$EXECUTOR_NUMBER install -r requirements/dev.txt"'
}
)
}
Expand Down

0 comments on commit 23846a0

Please sign in to comment.