engine: Run tox jobs in parallel 97/3997/1
authorFatih Degirmenci <fdegir@gmail.com>
Thu, 12 Mar 2020 13:09:19 +0000 (13:09 +0000)
committerFatih Degirmenci <fdegir@gmail.com>
Thu, 12 Mar 2020 13:09:19 +0000 (13:09 +0000)
Change-Id: Ied53d2e4cfb71f1a863dff71a3fc075677f921d0

jjb/engine/engine-verify-tox.yaml
jjb/engine/scripts/engine-verify-tox.sh

index f105de43f3b82c0ac3616b801f0118080a60677f..1cf39621180d98c59364f841c3edfba73e1e5880 100644 (file)
 
     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}'
     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}'
           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
index 0d0870fe8407321721f104c79069ce38281afc7f..be8b84623612569a2081cd1489369cc9b7360cbb 100755 (executable)
@@ -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"