Default it to the number of CPU cores available on the system.
Issue: RELENG-917
Change-Id: I5f65ec7d7142f1a778b6e31cc6700ca2bca1ef88
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
:build-timeout: Timeout in minutes before aborting build. (default: 10)
:git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
:jjb-cache: JJB cache location. (default: $HOME/.cache/jenkins_jobs)
:build-timeout: Timeout in minutes before aborting build. (default: 10)
:git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
:jjb-cache: JJB cache location. (default: $HOME/.cache/jenkins_jobs)
+ :jjb-workers: Number of threads to run **update** with. Set to 0 by default
+ which is equivalent to the number of available CPU cores. (default: 0)
:jjb-version: JJB version to install. (default: see job-template)
:stream: Keyword that can be used to represent a release code-name.
Often the same as the branch. (default: master)
:jjb-version: JJB version to install. (default: see job-template)
:stream: Keyword that can be used to represent a release code-name.
Often the same as the branch. (default: master)
# Default parameters #
######################
# Default parameters #
######################
gerrit_merge_triggers:
- change-merged-event
- comment-added-contains-event:
gerrit_merge_triggers:
- change-merged-event
- comment-added-contains-event:
builders:
- lf-infra-pre-build
- lf-infra-jjbini
builders:
- lf-infra-pre-build
- lf-infra-jjbini
+ - inject:
+ properties-content: JJB_WORKERS={jjb-workers}
- shell: !include-raw-escape:
- ../shell/jjb-install.sh
- ../shell/jjb-merge-job.sh
- shell: !include-raw-escape:
- ../shell/jjb-install.sh
- ../shell/jjb-merge-job.sh
--- /dev/null
+---
+features:
+ - |
+ The **jjb-merge** job now has a new parameter ``jjb-workers`` to allow
+ configuration of the number of threads to run update with. Default is *0*
+ which is equivalent to the number of CPU cores available on the system.
##############################################################################
echo "---> jjb-merge-job.sh"
##############################################################################
echo "---> jjb-merge-job.sh"
+workers="${JJB_WORKERS:-0}"
+
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
-jenkins-jobs update --recursive --delete-old --workers 4 jjb/
+jenkins-jobs update --recursive --delete-old --workers "$workers" jjb/