From faa5e2b36473c0e6c7415533dc82c41b79b71eb3 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 25 Dec 2016 05:52:19 +0200 Subject: [PATCH] - Use virtualenv to avoid root access. --- Jenkinsfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8ad913d..5823321 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,14 +3,15 @@ pipeline { stages { stage('install') { steps { - sh 'pip install -r tests/requirements.txt' - sh 'ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles' - sh 'molecule dependency' + sh 'virtualenv example' + sh '. example/bin/activate && pip install -r tests/requirements.txt' + sh '. example/bin/activate && ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles' + sh '. example/bin/activate && molecule dependency' } } stage('test') { steps { - sh 'pre-commit run --all-files' + sh '. example/bin/activate && pre-commit run --all-files' } } } -- GitLab