diff --git a/modules/openstack_project/files/slave_scripts/common_translation_update.sh b/modules/openstack_project/files/slave_scripts/common_translation_update.sh index f8705b83e8..4a6b46d429 100644 --- a/modules/openstack_project/files/slave_scripts/common_translation_update.sh +++ b/modules/openstack_project/files/slave_scripts/common_translation_update.sh @@ -149,9 +149,7 @@ function setup_git () # COMMIT_MSG. function setup_review () { - local ORG="$1" - local PROJECT="$2" - + FULL_PROJECT=$(grep project .gitreview | cut -f2 -d= | cut -f1 -d.) COMMIT_MSG="Imported Translations from Transifex" git review -s @@ -159,7 +157,7 @@ function setup_review () # See if there is an open change in the transifex/translations # topic. If so, get the change id for the existing change for use # in the commit msg. - change_info=`ssh -p 29418 proposal-bot@review.openstack.org gerrit query --current-patch-set status:open project:$ORG/$PROJECT topic:transifex/translations owner:proposal-bot` + change_info=`ssh -p 29418 proposal-bot@review.openstack.org gerrit query --current-patch-set status:open project:$FULL_PROJECT topic:transifex/translations owner:proposal-bot` previous=`echo "$change_info" | grep "^ number:" | awk '{print $2}'` if [ "x${previous}" != "x" ] ; then change_id=`echo "$change_info" | grep "^change" | awk '{print $2}'` diff --git a/modules/openstack_project/files/slave_scripts/propose_translation_update.sh b/modules/openstack_project/files/slave_scripts/propose_translation_update.sh index b85fbd23ef..5d5065abf1 100755 --- a/modules/openstack_project/files/slave_scripts/propose_translation_update.sh +++ b/modules/openstack_project/files/slave_scripts/propose_translation_update.sh @@ -12,14 +12,20 @@ # License for the specific language governing permissions and limitations # under the License. -ORG=$1 -PROJECT=$2 +# Transitional backward compat test which can get removed once jobs are only +# calling this with one parameter +if [ -n "$2" ] +then + PROJECT=$2 +else + PROJECT=$1 +fi source /usr/local/jenkins/slave_scripts/common_translation_update.sh setup_git -setup_review "$ORG" "$PROJECT" +setup_review setup_translation setup_project "$PROJECT" diff --git a/modules/openstack_project/files/slave_scripts/propose_translation_update_django_openstack_auth.sh b/modules/openstack_project/files/slave_scripts/propose_translation_update_django_openstack_auth.sh index b883b09d3f..2f08223863 100755 --- a/modules/openstack_project/files/slave_scripts/propose_translation_update_django_openstack_auth.sh +++ b/modules/openstack_project/files/slave_scripts/propose_translation_update_django_openstack_auth.sh @@ -12,15 +12,13 @@ # License for the specific language governing permissions and limitations # under the License. -ORG=openstack -PROJECT=django_openstack_auth COMMIT_MSG="Imported Translations from Transifex" source /usr/local/jenkins/slave_scripts/common_translation_update.sh setup_git -setup_review "$ORG" "$PROJECT" +setup_review setup_django_openstack_auth diff --git a/modules/openstack_project/files/slave_scripts/propose_translation_update_horizon.sh b/modules/openstack_project/files/slave_scripts/propose_translation_update_horizon.sh index d2f8c51856..54608b2fe0 100755 --- a/modules/openstack_project/files/slave_scripts/propose_translation_update_horizon.sh +++ b/modules/openstack_project/files/slave_scripts/propose_translation_update_horizon.sh @@ -12,14 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. -ORG=openstack -PROJECT=horizon - source /usr/local/jenkins/slave_scripts/common_translation_update.sh setup_git -setup_review "$ORG" "$PROJECT" +setup_review setup_translation setup_horizon diff --git a/modules/openstack_project/files/slave_scripts/propose_translation_update_manuals.sh b/modules/openstack_project/files/slave_scripts/propose_translation_update_manuals.sh index 008e572edd..f175edd262 100755 --- a/modules/openstack_project/files/slave_scripts/propose_translation_update_manuals.sh +++ b/modules/openstack_project/files/slave_scripts/propose_translation_update_manuals.sh @@ -17,7 +17,6 @@ # The script is to pull the translations from Transifex, # and push to Gerrit. -ORG="openstack" PROJECT=$1 source /usr/local/jenkins/slave_scripts/common_translation_update.sh @@ -25,7 +24,7 @@ source /usr/local/jenkins/slave_scripts/common_translation_update.sh init_manuals "$PROJECT" setup_git -setup_review "$ORG" "$PROJECT" +setup_review setup_translation setup_manuals "$PROJECT" diff --git a/modules/openstack_project/files/slave_scripts/run-bashate.sh b/modules/openstack_project/files/slave_scripts/run-bashate.sh index 62dae77f08..8b28e14630 100755 --- a/modules/openstack_project/files/slave_scripts/run-bashate.sh +++ b/modules/openstack_project/files/slave_scripts/run-bashate.sh @@ -14,14 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -org=$1 -project=$2 - -source /usr/local/jenkins/slave_scripts/functions.sh -check_variable_org_project "$org" "$project" "$0" - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - set -o pipefail ./run_tests.sh set +o pipefail diff --git a/modules/openstack_project/files/slave_scripts/run-cover.sh b/modules/openstack_project/files/slave_scripts/run-cover.sh index 95248cae64..245aa25469 100755 --- a/modules/openstack_project/files/slave_scripts/run-cover.sh +++ b/modules/openstack_project/files/slave_scripts/run-cover.sh @@ -4,14 +4,6 @@ # resulting environment at the end so that we have a record of exactly # what packages we ended up testing. -org=$1 -project=$2 - -source /usr/local/jenkins/slave_scripts/functions.sh -check_variable_org_project "$org" "$project" "$0" - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - export NOSE_COVER_HTML=1 venv=cover diff --git a/modules/openstack_project/files/slave_scripts/run-docs.sh b/modules/openstack_project/files/slave_scripts/run-docs.sh index 69d0fa9d78..359d510cf5 100755 --- a/modules/openstack_project/files/slave_scripts/run-docs.sh +++ b/modules/openstack_project/files/slave_scripts/run-docs.sh @@ -7,14 +7,6 @@ # what packages we ended up testing. # -org=$1 -project=$2 - -source /usr/local/jenkins/slave_scripts/functions.sh -check_variable_org_project "$org" "$project" "$0" - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - venv=venv echo "Begin pip freeze output from test virtualenv:" diff --git a/modules/openstack_project/files/slave_scripts/run-jsbuild.sh b/modules/openstack_project/files/slave_scripts/run-jsbuild.sh index 8119605374..c712daa7ab 100755 --- a/modules/openstack_project/files/slave_scripts/run-jsbuild.sh +++ b/modules/openstack_project/files/slave_scripts/run-jsbuild.sh @@ -14,13 +14,6 @@ # under the License. command=$1 -org=$2 -project=$3 - -source /usr/local/jenkins/slave_scripts/functions.sh -check_variable_org_project "$org" "$project" "$0" - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project rm -f dist/*.tar.gz diff --git a/modules/openstack_project/files/slave_scripts/run-pep8.sh b/modules/openstack_project/files/slave_scripts/run-pep8.sh index fda4aa3909..8e1e0913e7 100755 --- a/modules/openstack_project/files/slave_scripts/run-pep8.sh +++ b/modules/openstack_project/files/slave_scripts/run-pep8.sh @@ -14,14 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -org=$1 -project=$2 - -source /usr/local/jenkins/slave_scripts/functions.sh -check_variable_org_project "$org" "$project" "$0" - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - set -o pipefail tox -v -epep8 | tee pep8.txt set +o pipefail diff --git a/modules/openstack_project/files/slave_scripts/run-pylint.sh b/modules/openstack_project/files/slave_scripts/run-pylint.sh index cd6e5a698f..2078e2425c 100755 --- a/modules/openstack_project/files/slave_scripts/run-pylint.sh +++ b/modules/openstack_project/files/slave_scripts/run-pylint.sh @@ -14,14 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -org=$1 -project=$2 - -source /usr/local/jenkins/slave_scripts/functions.sh -check_variable_org_project "$org" "$project" "$0" - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - set -o pipefail tox -v -epylint | tee pylint.txt set +o pipefail diff --git a/modules/openstack_project/files/slave_scripts/run-selenium.sh b/modules/openstack_project/files/slave_scripts/run-selenium.sh index 73541c7c2d..08993236b1 100755 --- a/modules/openstack_project/files/slave_scripts/run-selenium.sh +++ b/modules/openstack_project/files/slave_scripts/run-selenium.sh @@ -7,14 +7,6 @@ # what packages we ended up testing. # -org=$1 -project=$2 - -source /usr/local/jenkins/slave_scripts/functions.sh -check_variable_org_project "$org" "$project" "$0" - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - venv=venv VDISPLAY=99 diff --git a/modules/openstack_project/files/slave_scripts/run-tarball.sh b/modules/openstack_project/files/slave_scripts/run-tarball.sh index c022f28811..90040fde25 100755 --- a/modules/openstack_project/files/slave_scripts/run-tarball.sh +++ b/modules/openstack_project/files/slave_scripts/run-tarball.sh @@ -14,14 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -org=$1 -project=$2 - -source /usr/local/jenkins/slave_scripts/functions.sh -check_variable_org_project "$org" "$project" "$0" - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - rm -f dist/*.tar.gz tox -evenv python setup.py sdist diff --git a/modules/openstack_project/files/slave_scripts/run-tox.sh b/modules/openstack_project/files/slave_scripts/run-tox.sh index afe8092ee7..f7ccbcdb25 100755 --- a/modules/openstack_project/files/slave_scripts/run-tox.sh +++ b/modules/openstack_project/files/slave_scripts/run-tox.sh @@ -12,16 +12,12 @@ # project's tox.ini file). venv=$1 -org=$2 -project=$3 -if [[ -z "$venv" || -z "$org" || -z "$project" ]] +if [[ -z "$venv" ]] then - echo "Usage: $? VENV ORG PROJECT" + echo "Usage: $?" echo echo "VENV: The tox environment to run (eg 'python27')" - echo "ORG: The project organization (eg 'stackforge')" - echo "PROJECT: The project name (eg 'nova')" exit 1 fi @@ -29,8 +25,6 @@ fi sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh pre -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - tox -v -e$venv result=$? diff --git a/modules/openstack_project/files/slave_scripts/run-unittests.sh b/modules/openstack_project/files/slave_scripts/run-unittests.sh index 36287d4520..f335612028 100755 --- a/modules/openstack_project/files/slave_scripts/run-unittests.sh +++ b/modules/openstack_project/files/slave_scripts/run-unittests.sh @@ -11,11 +11,6 @@ # "py27"/"jenkins27" respectively. version=$1 -org=$2 -project=$3 - -source /usr/local/jenkins/slave_scripts/functions.sh -check_variable_version_org_project "$version" "$org" "$project" "$0" venv=py$version @@ -29,8 +24,6 @@ trap "rm -rf $TMPDIR" EXIT sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh pre -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - tox -e$venv result=$? diff --git a/modules/openstack_project/files/slave_scripts/run-wheel.sh b/modules/openstack_project/files/slave_scripts/run-wheel.sh index ef7f9fd614..c46e762733 100644 --- a/modules/openstack_project/files/slave_scripts/run-wheel.sh +++ b/modules/openstack_project/files/slave_scripts/run-wheel.sh @@ -14,20 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -org=$1 -project=$2 - -if [[ -z "$org" || -z "$project" ]] -then - echo "Usage: $0 ORG PROJECT" - echo - echo "ORG: The project organization (eg 'openstack')" - echo "PROJECT: The project name (eg 'nova')" - exit 1 -fi - -source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project - rm -f dist/*.whl tox -evenv pip install wheel tox -evenv python setup.py bdist_wheel