From: Andrew Grimberg Date: Wed, 3 Apr 2019 16:26:30 +0000 (+0000) Subject: Merge "INFO.yaml check vote for global-jjb" X-Git-Tag: v0.35.0~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=fabebb6e6d86dd37fa0fe47cff429ca0fc1b3ef6;hp=0010308163a62fb231ebece5926b64d6b86c0901;p=releng%2Fglobal-jjb.git Merge "INFO.yaml check vote for global-jjb" --- diff --git a/docs/jjb/lf-ci-jobs.rst b/docs/jjb/lf-ci-jobs.rst index 6184284f..5ad9b6a3 100644 --- a/docs/jjb/lf-ci-jobs.rst +++ b/docs/jjb/lf-ci-jobs.rst @@ -424,6 +424,8 @@ Runs `jenkins-jobs update` to update production job configuration :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) diff --git a/docs/jjb/lf-macros.rst b/docs/jjb/lf-macros.rst index d1efe476..133795e0 100644 --- a/docs/jjb/lf-macros.rst +++ b/docs/jjb/lf-macros.rst @@ -5,6 +5,14 @@ Global Macros 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 -------------------------- diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 8a49d036..ebf637fd 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -719,6 +719,8 @@ # Default parameters # ###################### + jjb-workers: 0 + gerrit_merge_triggers: - change-merged-event - comment-added-contains-event: @@ -731,6 +733,8 @@ 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 diff --git a/jjb/lf-macros.yaml b/jjb/lf-macros.yaml index 58c5c506..134ef13d 100644 --- a/jjb/lf-macros.yaml +++ b/jjb/lf-macros.yaml @@ -3,6 +3,14 @@ # 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: diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index eec378af..dea836b2 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -1064,7 +1064,7 @@ 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 diff --git a/releasenotes/notes/jjb-workers-9459a54a5ecb91e8.yaml b/releasenotes/notes/jjb-workers-9459a54a5ecb91e8.yaml new file mode 100644 index 00000000..fc11d250 --- /dev/null +++ b/releasenotes/notes/jjb-workers-9459a54a5ecb91e8.yaml @@ -0,0 +1,6 @@ +--- +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. diff --git a/releasenotes/notes/mvn-verify-skip-source-39f1e748f5505d4c.yaml b/releasenotes/notes/mvn-verify-skip-source-39f1e748f5505d4c.yaml new file mode 100644 index 00000000..36470ae8 --- /dev/null +++ b/releasenotes/notes/mvn-verify-skip-source-39f1e748f5505d4c.yaml @@ -0,0 +1,6 @@ +--- +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. diff --git a/shell/comment-to-gerrit.sh b/shell/comment-to-gerrit.sh new file mode 100644 index 00000000..b4d3d66a --- /dev/null +++ b/shell/comment-to-gerrit.sh @@ -0,0 +1,25 @@ +#!/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 diff --git a/shell/jjb-merge-job.sh b/shell/jjb-merge-job.sh index 090e9153..0a05c4f0 100644 --- a/shell/jjb-merge-job.sh +++ b/shell/jjb-merge-job.sh @@ -10,7 +10,9 @@ ############################################################################## 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/ diff --git a/shell/python-tools-install.sh b/shell/python-tools-install.sh index 2e514d5b..58fb2692 100644 --- a/shell/python-tools-install.sh +++ b/shell/python-tools-install.sh @@ -18,7 +18,7 @@ REQUIREMENTS_FILE=$(mktemp /tmp/requirements-XXXX.txt) # 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