From 94b178290820e75aeeb46d071ba8ebc0f4d34ac2 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 8 May 2013 13:33:30 -0700 Subject: [PATCH] Make requirements check test more flexible. * modules/openstack_project/files/jenkins_job_builder/config/requirements.yaml: Check for existance of various requirements files and only clean them up and attempt to pip install -r them if they exist. Change-Id: I08201fa86f7a7cef47a1b2d34e44af1712f12687 Reviewed-on: https://review.openstack.org/28610 Approved: Jeremy Stanley Reviewed-by: Jeremy Stanley Tested-by: Jenkins --- .../jenkins_job_builder/config/requirements.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/openstack_project/files/jenkins_job_builder/config/requirements.yaml b/modules/openstack_project/files/jenkins_job_builder/config/requirements.yaml index 59789feba3..61626b0e69 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/requirements.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/requirements.yaml @@ -11,11 +11,19 @@ #!/bin/bash -xe /usr/local/jenkins/slave_scripts/select-mirror.sh openstack requirements virtualenv --clear --distribute .venv - # Ignore lines beginning with https?:// just as the mirror script does. - sed -e '/https\?:\/\//d' tools/pip-requires > tools/pip-requires.clean - sed -e '/https\?:\/\//d' tools/test-requires > tools/test-requires.clean + PIP_ARGS="" + REQ_FILES="tools/pip-requires tools/test-requires requirements.txt test-requirements.txt" + for FILE in $REQ_FILES + do + if [ -e $FILE ] + then + # Ignore lines beginning with https?:// just as the mirror script does. + sed -e '/https\?:\/\//d' $FILE > $FILE.clean + PIP_ARGS="$PIP_ARGS -r $FILE.clean" + fi + done # Run the same basic pip command that the mirror script runs. - .venv/bin/pip install -M -U --exists-action=w -r tools/pip-requires.clean -r tools/test-requires.clean + .venv/bin/pip install -M -U --exists-action=w $PIP_ARGS publishers: - console-log