: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)
Builders
========
+comment-to-gerrit
+-----------------
+
+This macro will post a comment to the gerrit patchset if the build
+creates a file named gerrit_comment.txt
+To use this macro add it to the list of builders.
+
+
lf-fetch-dependent-patches
--------------------------
# Default parameters #
######################
+ jjb-workers: 0
+
gerrit_merge_triggers:
- change-merged-event
- comment-added-contains-event:
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
# BUILDERS #
############
+# To take advantage of this macro, have your build write
+# out the file 'gerrit_comment.txt' with information to post
+# back to gerrit and include this macro in the list of builders.
+- builder:
+ name: comment-to-gerrit
+ builders:
+ - shell: !include-raw ../shell/comment-to-gerrit.sh
+
- builder:
name: lf-fetch-dependent-patches
builders:
mvn-global-settings: global-settings
mvn-goals: clean deploy
mvn-opts: ''
- mvn-params: '-Dstream=$STREAM'
+ mvn-params: '-Dstream=$STREAM -Dmaven.source.skip=true'
mvn-version: mvn35
stream: master
submodule-recursive: true
--- /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.
--- /dev/null
+---
+other:
+ - |
+ The Maven Verify job will now call ``-Dmaven.source.skip`` to skip source
+ jar generation in the verify job. This saves us some time in the verify
+ build as the source artifacts are not useful in a verify job.
--- /dev/null
+#!/bin/bash -l
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2019 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+set -xe -o pipefail
+
+if [[ -e gerrit_comment.txt ]] ; then
+ echo
+ echo "posting review comment to gerrit..."
+ echo
+ cat gerrit_comment.txt
+ echo
+ ssh -p 29418 "$GERRIT_HOST" \
+ "gerrit review -p $GERRIT_PROJECT \
+ -m '$(cat gerrit_comment.txt)' \
+ $GERRIT_PATCHSET_REVISION \
+ --notify NONE"
+fi
##############################################################################
echo "---> jjb-merge-job.sh"
+workers="${JJB_WORKERS:-0}"
+
# 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/
# git+https://github.com/lfit/releng-lftools.git#egg=lftools[openstack]
cat << EOF > "$REQUIREMENTS_FILE"
-lftools[openstack]~=0.22.0
+lftools[openstack]~=0.22.1
python-heatclient~=1.16.1
python-openstackclient~=3.16.0
dogpile.cache~=0.6.8 # Version 0.7.[01] seems to break openstackclient