From: Fatih Degirmenci Date: Thu, 12 Mar 2020 13:09:19 +0000 (+0000) Subject: engine: Run tox jobs in parallel X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=9714e3e22c64aff876cfa1f04e42c046edb89a1d;p=infra%2Fcicd.git engine: Run tox jobs in parallel Change-Id: Ied53d2e4cfb71f1a863dff71a3fc075677f921d0 --- diff --git a/jjb/engine/engine-verify-tox.yaml b/jjb/engine/engine-verify-tox.yaml index f105de43..1cf39621 100644 --- a/jjb/engine/engine-verify-tox.yaml +++ b/jjb/engine/engine-verify-tox.yaml @@ -107,65 +107,26 @@ builders: - multijob: - name: ansible-lint + name: Engine Lint condition: ALWAYS + execution-type: PARALLEL projects: - name: 'engine-verify-ansible-lint-{stream}' current-parameters: true kill-phase-on: NEVER abort-all-job: false - predefined-parameters: | - GERRIT_PROJECT=$GERRIT_PROJECT - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - VERBOSITY=$VERBOSITY - - multijob: - name: shellcheck - condition: ALWAYS - projects: - name: 'engine-verify-shellcheck-{stream}' current-parameters: true kill-phase-on: NEVER abort-all-job: false - predefined-parameters: | - GERRIT_PROJECT=$GERRIT_PROJECT - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - VERBOSITY=$VERBOSITY - - multijob: - name: yamllint - condition: ALWAYS - projects: - name: 'engine-verify-yamllint-{stream}' current-parameters: true kill-phase-on: NEVER abort-all-job: false - predefined-parameters: | - GERRIT_PROJECT=$GERRIT_PROJECT - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - VERBOSITY=$VERBOSITY - - multijob: - name: docs - condition: ALWAYS - projects: - name: 'engine-verify-docs-{stream}' current-parameters: true kill-phase-on: NEVER abort-all-job: false - predefined-parameters: | - GERRIT_PROJECT=$GERRIT_PROJECT - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - VERBOSITY=$VERBOSITY - job-template: name: 'engine-verify-{lint-type}-{stream}' @@ -177,10 +138,6 @@ node: infra-tools-docker-slave-ubuntu1804 parameters: - - string: - name: PROJECT - default: $GERRIT_PROJECT - description: 'The project which the change is proposed for' - string: name: LINT_TYPE default: '{lint-type}' @@ -189,11 +146,6 @@ name: REPOS_TO_IGNORE default: '{repos-to-ignore}' description: 'Repos to ignore for the specific lint type' - - string: - name: VERBOSITY - default: 'false' - description: 'Verbosity setting for the tox script' - - nordix-gerrit-parameters properties: - logrotate diff --git a/jjb/engine/scripts/engine-verify-tox.sh b/jjb/engine/scripts/engine-verify-tox.sh index 0d0870fe..be8b8462 100755 --- a/jjb/engine/scripts/engine-verify-tox.sh +++ b/jjb/engine/scripts/engine-verify-tox.sh @@ -64,9 +64,10 @@ run_tox() { redirect_cmd source .venv/bin/activate set -u - # install test-requirements - echo "Info : Install python packages listed in test-requirements.txt using pip" - redirect_cmd pip install --force-reinstall -r test-requirements.txt + # install only tox since the rest of the requirements are installed by tox itself + TOX_PACKAGE=$(grep "^tox==" test-requirements.txt) + echo "Info : Install $TOX_PACKAGE" + redirect_cmd pip install --force-reinstall "$TOX_PACKAGE" # run tox echo "Info : Run $LINT_TYPE using tox"