name: gerrit-python-jobs
jobs:
- "{project-name}-python-jobs"
+ - gerrit-tox-sonar
project-name: gerrit-python
name: github-python-jobs
jobs:
- "{project-name}-github-python-jobs"
+ - github-tox-sonar
project-name: github-python
- gerrit-rtd-merge
- gerrit-rtd-verify
- rtd-project: gerrit-rtd
project-name: gerrit-rtd
+ rtd-build-url: fake-rtd-build-url
+ rtd-token: fake-rtd-token
- project:
name: github-rtd-jobs
- github-rtd-merge
- github-rtd-verify
- rtd-project: github-rtd
project-name: github-rtd
+ rtd-build-url: fake-rtd-build-url
+ rtd-token: fake-rtd-token
# built documents.
#
# The short X.Y version.
-version = '0.18.0-dev'
+version = '0.19.0-dev'
# The full version, including alpha/beta/rc tags.
release = version
<https://docs.npmjs.com/files/npmrc>`_.
:Required: This file MUST exist. An empty file is acceptable if a
-proxy is not available for the project.
+ proxy is not available for the project.
:type: Custom file
Create a "Custom file" with contents:
`pip project <https://pip.readthedocs.io/en/stable/user_guide/#configuration>`_.
:Required: This file MUST exist. An empty file is acceptable if a
-proxy is not available for the project.
+ proxy is not available for the project.
:type: Custom file
Create a "Custom file" with contents:
Job template code is in the `jjb/` directory but documentation is in the
`docs/jjb/` directory of this project.
-- :doc:`jjb/lf-ci-jobs`
-- :doc:`jjb/lf-macros`
-- :doc:`jjb/lf-maven-jobs`
-- :doc:`jjb/lf-node-jobs`
-- :doc:`jjb/lf-python-jobs`
-- :doc:`jjb/lf-rtd-jobs`
+.. toctree::
+ :maxdepth: 1
+
+ jjb/lf-ci-jobs
+ jjb/lf-macros
+ jjb/lf-maven-jobs
+ jjb/lf-node-jobs
+ jjb/lf-python-jobs
+ jjb/lf-rtd-jobs
Indices and tables
==================
.. note:: The first package listed in PIP_PACKAGES is used as the VENV name.
-.. _lf-provide-maven-settings
+.. _lf-provide-maven-settings:
lf-provide-maven-settings
-------------------------
Job Templates
=============
+Python XC CLM
+-------------
+
+CLM scans for Python based repos. This job will call the Nexus IQ CLI
+directly to run the scans.
+
+A new credential named "nexus-iq-xc-clm" needs to exist in the Jenkins credentials.
+The credential should contain the username and password to access Nexus
+IQ Server.
+
+:Template Names:
+
+ - {project-name}-python-clm-{stream}
+ - gerrit-python-xc-clm
+ - github-python-xc-clm
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ get configured in defaults.yaml)
+
+:Optional parameters:
+
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :nexus-iq-cli-version: Nexus IQ CLI package version to download and use. (default: 1.44.0-01)
+ :build-timeout: Timeout in seconds before aborting build. (default: 60)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :java-version: Version of Java to use for the build. (default: openjdk8)
+ :stream: Keyword used to represent a release code-name.
+ Often the same as the branch. (default: master)
+ :submodule-recursive: Whether to checkout submodules recursively.
+ (default: true)
+ :gerrit_clm_triggers: Override Gerrit Triggers.
+
+Python Sonar with Tox
+---------------------
+
+Sonar scans for Python based repos. This job will perform a tox call which
+runs the coverage command to gather tests results. These test results get
+published back into Sonar after running the Sonar goals.
+
+To get the Sonar coverage results, tox.ini needs to exist and configured
+with coverage commands to run.
+
+The coverage commands define the code that gets executed by the test suites.
+It does not guarantee that the code tests executed properly, but it will help
+pointing out the code that is not tested at all.
+
+For example:
+
+.. code-block:: bash
+
+ [testenv:py27]
+ commands =
+ coverage run --module pytest --junitxml xunit-results.xml
+ coverage xml --omit=".tox/py27/*","tests/*"
+ coverage report --omit=".tox/py27/*","tests/*"
+
+For more details refer to coverage and sonar documentation:
+
+https://coverage.readthedocs.io/
+
+https://docs.sonarqube.org/display/PLUG/Python+Coverage+Results+Import
+
+:Template Names:
+
+ - {project-name}-tox-sonar
+ - gerrit-tox-sonar
+ - github-tox-sonar
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ get configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for the project.
+
+:Optional parameters:
+
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in seconds before aborting build. (default: 60)
+ :cron: Cron schedule when to trigger the job. This parameter also
+ supports multiline input via YAML pipe | character in cases where
+ one may want to provide more than 1 cron timer. (default: H 11 * * *
+ to run once a day)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :java-version: Version of Java to use for the build. (default: openjdk8)
+ :mvn-global-settings: The name of the Maven global settings to use for
+ Maven configuration. (default: global-settings)
+ :mvn-version: Version of maven to use. (default: mvn33)
+ :stream: Keyword used to represent a release code-name.
+ Often the same as the branch. (default: master)
+ :submodule-recursive: Whether to checkout submodules recursively.
+ (default: true)
+ :gerrit_sonar_triggers: Override Gerrit Triggers.
+
Tox Verify
----------
ReadTheDocs Merge
-----------------
-Merge job which triggers a POST of the docs project to readthedocs
+Merge job which triggers a POST of the docs project to readthedocs.
+
+To use this job first configure the ``Generic API incoming webhook`` in
+ReadTheDocs. To do that follow these steps:
+
+#. Browse to https://readthedocs.org/dashboard/PROJECT/integrations/
+#. Click on ``Generic API incoming webhook``
+
+ .. note::
+
+ If not available click on ``Add integration`` and add the
+ ``Generic API incoming webhook``.
+
+#. Copy the custom webhook URL, this is your ``rtd-build-url``
+
+ For example: https://readthedocs.org/api/v2/webhook/opendaylight/32321/
+
+#. Copy the token, this is your ``rtd-token``
:Template Names:
- {project-name}-rtd-merge-{stream}
:build-node: The node to run build on.
:jenkins-ssh-credential: Credential to use for SSH. (Generally set
in defaults.yaml)
- :rtd-project: This is the name of the project on ReadTheDocs.org.
+ :rtd-build-url: This is the generic webhook url from readthedocs.org. Refer
+ to the above instructions to generate one.
+ (Check Admin > Integrations > Generic API incoming webhook)
+ :rtd-token: The unique token for the project Generic webhook. Refer
+ to the above instructions to generate one.
+ (Check Admin > Integrations > Generic API incoming webhook)
:Optional parameters:
- job-group:
name: '{project-name}-packer-jobs'
- packer-version: 1.1.3
+ packer-version: 1.2.2
jobs:
- gerrit-packer-merge
- job-group:
name: '{project-name}-github-packer-jobs'
- packer-version: 1.1.3
+ packer-version: 1.2.2
jobs:
- github-packer-merge
branch: master
build-timeout: 10
- jjb-version: 1.6.2
+ jjb-version: 2.0.5
stream: master
submodule-recursive: true
name: lf-rtd-trigger-build
builders:
- inject:
- properties-content: RTD_PROJECT={rtd-project}
+ properties-content: |
+ RTD_BUILD_URL={rtd-build-url}
+ RTD_TOKEN={rtd-token}
- shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
- builder:
- inject:
properties-content: 'CLM_PROJECT_NAME={clm-project-name}'
- shell: !include-raw-escape:
- - ../shell/sonar-cli.sh
+ - ../shell/nexus-iq-cli.sh
####################
# COMMON FUNCTIONS #
archive-artifacts: >
**/*.log
- **/hs_err_*.log
- **/target/**/feature.xml
- **/target/failsafe-reports/failsafe-summary.xml
- **/target/surefire-reports/*-output.txt
+ nexus-iq-cli-version: 1.44.0-01
#####################
# Job Configuration #
branch: '{branch}'
stream: '{stream}'
lftools-version: '{lftools-version}'
- - string:
- name: NEXUS_IQ_CLI_JAR
- default: nexus-iq-cli-1.44.0-01.jar
- description: Nexus IQ CLI package to download and use.
- - string:
- name: ARCHIVE_ARTIFACTS
- default: '{archive-artifacts}'
- description: Artifacts to archive to the logs server.
wrappers:
- lf-infra-wrappers:
gerrit_clm_triggers:
- comment-added-contains-event:
- comment-contains-value: run-xc-clm$
+ comment-contains-value: run-clm$
#####################
# Job Configuration #
#####################
+ parameters:
+ - string:
+ name: NEXUS_IQ_CLI_VERSION
+ default: '{nexus-iq-cli-version}'
+ description: Nexus IQ CLI package to download and use.
+
triggers:
# Build weekly on Saturdays
- timed: 'H H * * 6'
wrappers:
- credentials-binding:
- username-password-separated:
- credential-id: sonar-xc-clm
+ credential-id: nexus-iq-xc-clm
username: CLM_USER
password: CLM_PASSWORD
builders:
triggers:
- lf-infra-github-pr-trigger:
- trigger-phrase: '^run-xc-clm$'
+ trigger-phrase: '^run-clm$'
only-trigger-phrase: false
status-context: 'CLM'
permit-all: true
github_pr_admin_list:
- ''
+########################
+# Python Sonar with Tox #
+########################
+
+- lf_tox_sonar: &lf_tox_sonar
+ name: lf-tox_sonar
+
+ ######################
+ # Default parameters #
+ ######################
+
+ branch: master # Sonar should always be run on master branch
+ build-days-to-keep: 7
+ build-timeout: 60
+ cron: 'H H * * *' # run daily
+ git-url: '$GIT_URL/$PROJECT'
+ java-version: openjdk8
+ python-version: python2
+ mvn-global-settings: global-settings
+ mvn-settings: '{mvn-settings}'
+ mvn-version: mvn33
+ sonar-mvn-goal: 'sonar:sonar'
+ stream: master
+ submodule-recursive: true
+
+ gerrit_sonar_triggers:
+ - comment-added-contains-event:
+ comment-contains-value: run-sonar$
+
+ #####################
+ # Job Configuration #
+ #####################
+
+ parameters:
+ - lf-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ stream: '{stream}'
+ lftools-version: '{lftools-version}'
+ - string:
+ name: ARCHIVE_ARTIFACTS
+ default: '{archive-artifacts}'
+ description: Artifacts to archive to the logs server.
+ - string:
+ name: MVN
+ # Sets an env var for shell scripts to be able to call the dynamically
+ # installed maven without having to calculate the path themselves.
+ # yamllint disable-line rule:line-length
+ default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
+ description: 'Maven selector to be used by shell scripts'
+ - string:
+ name: SONAR_MAVEN_GOAL
+ default: '{sonar-mvn-goal}'
+ description: |
+ Maven goals to pass to the Sonar call. Typically sonar:sonar
+ however to use a specific version of the sonar-maven-plugin we
+ can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
+
+ triggers:
+ - timed: '{obj:cron}'
+ - gerrit:
+ server-name: '{gerrit-server-name}'
+ trigger-on: '{obj:gerrit_sonar_triggers}'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/master'
+ skip-vote:
+ successful: true
+ failed: true
+ unstable: true
+ notbuilt: true
+
+ builders:
+ - shell: !include-raw-escape:
+ # Workaround issue where the tox run later breaks the lftools virtualenv.
+ # Without running the install first the run in the publisher will fail
+ # due to missing lftools because it gets installed into a tox venv.
+ - ../shell/lftools-install.sh
+ - lf-infra-tox-install:
+ python-version: '{python-version}'
+ - shell: !include-raw-escape: ../shell/tox-run.sh
+ - lf-provide-maven-settings:
+ global-settings-file: '{mvn-global-settings}'
+ settings-file: '{mvn-settings}'
+ - lf-infra-tox-sonar:
+ java-version: '{java-version}'
+ mvn-settings: '{mvn-settings}'
+ mvn-version: '{mvn-version}'
+
+ publishers:
+ - lf-infra-publish
+
+- builder:
+ name: lf-infra-tox-sonar
+ # Run a Sonar build with Maven
+ builders:
+ - lf-maven-install:
+ mvn-version: '{mvn-version}'
+ - lf-update-java-alternatives:
+ java-version: '{java-version}'
+ - inject:
+ # TODO: Switch this to the sonar wrapper when JJB 2.0 is available
+ properties-content: SONAR_HOST_URL=$SONAR_URL
+ - shell: !include-raw-escape:
+ - ../shell/common-variables.sh
+ - ../shell/maven-sonar.sh
+ - lf-provide-maven-settings-cleanup
+
+- job-template:
+ name: '{project-name}-tox-sonar'
+ id: gerrit-tox-sonar
+ <<: *lf_python_common
+ # yamllint disable-line rule:key-duplicates
+ <<: *lf_tox_sonar
+
+ scm:
+ - lf-infra-gerrit-scm:
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+ git-url: '{git-url}'
+ refspec: $GERRIT_REFSPEC
+ branch: $GERRIT_BRANCH
+ submodule-recursive: '{submodule-recursive}'
+ choosing-strategy: default
+
+- job-template:
+ name: '{project-name}-tox-sonar'
+ id: github-tox-sonar
+ <<: *lf_python_common
+ # yamllint disable-line rule:key-duplicates
+ <<: *lf_tox_sonar
+
+ properties:
+ - github:
+ url: '{git-url}/{github-org}/{project}'
+
+ scm:
+ - lf-infra-github-scm:
+ url: '{git-clone-url}{github-org}/{project}'
+ refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
+ branch: '$sha1'
+ submodule-recursive: '{submodule-recursive}'
+ choosing-strategy: default
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ triggers:
+ - lf-infra-github-pr-trigger:
+ trigger-phrase: '^run-sonar$'
+ only-trigger-phrase: false
+ status-context: 'Python Sonar'
+ permit-all: true
+ github-hooks: true
+ github-org: ''
+ github_pr_whitelist:
+ - ''
+ github_pr_admin_list:
+ - ''
+
##############
# Tox Verify #
##############
builders:
- lf-rtd-trigger-build:
- rtd-project: '{rtd-project}'
+ rtd-build-url: '{rtd-build-url}'
+ rtd-token: '{rtd-token}'
- job-template:
name: '{project-name}-rtd-merge-{stream}'
--- /dev/null
+global-jjb v0.18.0 Release Notes
+================================
+
+Thanks to Anil, Jeremy, Jessica, Ry, and Thanh for contributing to this release.
+
+
+Upgrade considerations
+----------------------
+
+1. PostBuildScript 2.x support
+
+This release updates some macros that requires the PostBuildScript 2.0 plugin
+or newer to be installed in Jenkins and JJB 2.0.3 or newer to be installed for
+the jjb-verify and jjb-merge jobs.
+
+2. ReadTheDocs (RTD) merge job updated for RTD v2 API
+
+The rtd-merge now replaces the previous ``rtd-project`` parameter with 2 new
+parameters ``rtd-build-url`` and ``rtd-token``. This is to support the newer
+RTD v2 API which no longer allows anonymous triggering of builds in RTD.
+
+Refer to the rtd-merge job documentation for details:
+http://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/jjb/lf-rtd-jobs.html#readthedocs-merge
+
+
+Notable changes since v0.17.0
+-----------------------------
+
+f76c82a Thanh Ha Support PostBuildScript 2.x
+PostBuildScript 2.x in Jenkins is now supported by global-jjb allowing us to
+move off of the older and no longer supported 1.x release of the plugin.
+
+841f374 Thanh Ha Add support for VolumeFromImage boot source
+The OpenStack cloud plugin version 2.32 adds support for allowing us to set
+the volume size of a minion from the plugin. global-jjb now supports this as
+well via the jenkins-cfg job.
+
+Refer to the jenkins-cfg job documentation for full details:
+http://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/jjb/lf-ci-jobs.html#jenkins-configuration-merge
+
+ad0ee7c Ry Jones Fix pip version to 9.0.3
+We now pin all global-jjb pip dependencies to version 9.0.3 as upstream's
+latest 10.0.0 release is a major change that breaks several of our jobs.
+
+b020128 Jeremy Phelps Update RTD to use Generic API v2 webhook
+Adds support for RTD's Generic API v2 which no longer allows anonymous build
+triggering and requires a build url + token for each project.
+
+d859830 Jessica Wagantall Add lf_tox_sonar job
+Adds a python-sonar job that can be used by Python projects to generate sonar
+reports.
+
+379003e Jessica Wagantall Update comment triggers XC CLM
+Python CLM triggers were changed to "run-clm" to match existing similar jobs.
+
+
+Full Change Log
+---------------
+
+4e5067d Anil Belur Update packer version to 1.2.2
+379003e Jessica Wagantall Update comment triggers XC CLM
+536325e Thanh Ha Add new odl- flavors to cloud list
+eaa48f8 Anil Belur Update JJB version 2.0.5
+9f237eb Thanh Ha Replace pipdeptree with pip freeze
+a434075 Thanh Ha Pin pip to 9.0.3
+d859830 Jessica Wagantall Add lf_tox_sonar job
+be6ec04 Jeremy Phelps Update default jjb version
+b020128 Jeremy Phelps Update RTD to use Generic API v2 webhook
+d0059ff Thanh Ha Force rm for cleanup macro
+f1fe473 Thanh Ha Fix pipconf name to the default one
+ad0ee7c Ry Jones Fix pip version
+81a5e9d Anil Belur Validate packer version before install
+edf56a1 Jeremy Phelps Pin tox to <3.0.0 as it breaks detox
+7f88f16 Thanh Ha Revert "Update RTD to use custom trigger url"
+12d6179 Jeremy Phelps Update RTD to use custom trigger url
+3ea6a67 Thanh Ha Add link to release notes
+4d3e0b4 Thanh Ha Quit build if submodule not found
+aa20551 Thanh Ha Ensure setuptools is updated
+841f374 Thanh Ha Add support for VolumeFromImage boot source
+f77ecf8 Anil Belur Export packer binary dir in $PATH
+f76c82a Thanh Ha Support PostBuildScript 2.x
+b7aabb1 Thanh Ha Document job-group defaults order of priority
virtualenv --quiet "/tmp/v/git-review"
# shellcheck source=/tmp/v/git-review/bin/activate disable=SC1091
source "/tmp/v/git-review/bin/activate"
-pip install --quiet --upgrade pip setuptools
+pip install --quiet --upgrade "pip==9.0.3" setuptools
pip install --quiet --upgrade git-review
set -u
# End git-review workaround
flavors["v2-highcpu-8"]="221de281-95ec-414f-8e42-c86c9e0b318d"
flavors["v2-highcpu-16"]="ddd6863a-ef4f-475c-9aee-61d46898651d"
flavors["v2-highcpu-32"]="21dfb8a3-c472-4a2c-a8e1-4da8de415ff8"
+ flavors["odl-highcpu-2"]="def1b86f-b7f8-4943-b430-4a0599170006"
+ flavors["odl-highcpu-4"]="0c8ec795-2ff8-4623-98cf-b4c1d92bb37c"
+ flavors["odl-highcpu-8"]="458d6499-e2c8-4580-aa88-a4a04a33ee25"
+ flavors["odl-standard-1"]="35800a3f-0c69-428d-b5cb-136d17d46c48"
+ flavors["odl-standard-2"]="8ead227a-acfe-4290-be70-fbab92e6dd2f"
+ flavors["odl-standard-4"]="f76fb18d-d5fb-4175-95c1-b29d8039d102"
+ flavors["odl-standard-8"]="ba38b1af-4f87-4e4e-860e-94e8329d0d78"
image_name=$(get_cfg "$cfg_file" IMAGE_NAME "")
volume_size=$(get_cfg "$cfg_file" VOLUME_SIZE "")
# shellcheck source=/tmp/v/jjb/bin/activate disable=SC1091
source "/tmp/v/jjb/bin/activate"
pip install --quiet --upgrade "pip==9.0.3" setuptools
-pip install --quiet --upgrade pipdeptree
pip install --quiet --upgrade "jenkins-job-builder==$JJB_VERSION"
-echo "----> Pip Dependency Tree"
-pipdeptree
+echo "----> pip freeze"
+pip freeze
virtualenv --quiet "/tmp/v/lftools"
# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
source "/tmp/v/lftools/bin/activate"
-pip install --quiet --upgrade pip setuptools
+pip install --quiet --upgrade "pip==9.0.3" setuptools
case $LFTOOLS_MODE in
gerrit)
# the repo
set +x
-wget -nv https://download.sonatype.com/clm/scanner/${NEXUS_IQ_CLI_JAR} -O /tmp/${NEXUS_IQ_CLI_JAR}
+CLI_LOCATION="/tmp/nexus-iq-cli-${NEXUS_IQ_CLI_VERSION}.jar"
+wget -nv https://download.sonatype.com/clm/scanner/nexus-iq-cli-${NEXUS_IQ_CLI_VERSION}.jar -O ${CLI_LOCATION}
echo "-a" > cli-auth.txt
echo "${CLM_USER}:${CLM_PASSWORD}" >> cli-auth.txt
-java -jar /tmp/${NEXUS_IQ_CLI_JAR} @cli-auth.txt -xc -i ${CLM_PROJECT_NAME} -s https://nexus-iq.wl.linuxfoundation.org -t build .
+java -jar ${CLI_LOCATION} @cli-auth.txt -xc -i ${CLM_PROJECT_NAME} -s https://nexus-iq.wl.linuxfoundation.org -t build .
rm cli-auth.txt
+rm ${CLI_LOCATION}
# shellcheck source=/tmp/v/node/bin/activate disable=SC1091
source "/tmp/v/python/bin/activate"
pip install --quiet --upgrade "pip==9.0.3" setuptools
-pip install --quiet --upgrade pipdeptree
pip install --quiet --upgrade nodeenv
-echo "----> Pip Dependency Tree"
-pipdeptree
+echo "----> pip freeze"
+pip freeze
set -eu -o pipefail
# $PACKER_VERSION : Define a packer version passed as job paramter
-PACKER_VERSION="${PACKER_VERSION:-1.1.3}"
+PACKER_VERSION="${PACKER_VERSION:-1.2.2}"
export PATH="${WORKSPACE}/bin:$PATH"
packer_install() {
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
+# Call cURL to trigger a build in RTD via the Generic API
+#
+# Paramters:
+# RTD_BUILD_URL: The unique build URL for the project.
+# Check Admin > Integrations > Generic API incoming webhook.
+#
+# RTD_TOKEN: The unique token for the project Generic webhook.
+# Check Admin > Integrations > Generic API incoming webhook.
+
echo "---> rtd-trigger-build.sh"
# Ensure we fail the job if any steps fail.
-# DO NOT set -u
-set -xe -o pipefail
+# DO NOT set -u as we depend on unbound variables being passed by Jenkins.
+set -e -o pipefail
+
+# Ensure RTD_BUILD_URL retains the trailing slash as it is needed for the API
+last_char=${RTD_BUILD_URL:length-1:1}
+[[ $last_char != "/" ]] && RTD_BUILD_URL="$RTD_BUILD_URL/"; :
+
+json=$(curl -X POST -d "branches=${GERRIT_BRANCH}" -d "token=$RTD_TOKEN" "$RTD_BUILD_URL")
+build_triggered=$(echo $json | jq -r .build_triggered)
-if [ "$GERRIT_BRANCH" == "master" ]; then
- RTD_BUILD_VERSION=latest
-else
- RTD_BUILD_VERSION="${GERRIT_BRANCH/\//-}"
+if [ "$build_triggered" != "true" ]; then
+ echo "ERROR: Build was not triggered."
+ echo "$json" | jq -r
+ exit 1
fi
-curl -X POST --data "version_slug=$RTD_BUILD_VERSION" "https://readthedocs.org/build/$RTD_PROJECT"
+echo "Build triggered for $GERRIT_PROJECT in ReadTheDocs."
# shellcheck source=/tmp/v/tox/bin/activate disable=SC1091
source "/tmp/v/tox/bin/activate"
pip install --quiet --upgrade "pip==9.0.3" setuptools
-pip install --quiet --upgrade pipdeptree
pip install --quiet --upgrade argparse detox "tox<3.0.0" tox-pyenv
-echo "----> Pip Dependency Tree"
-pipdeptree
+echo "----> pip freeze"
+pip freeze
[testenv:docs]
deps = -rrequirements.txt
commands =
- sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+ sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
echo "Generated docs available in {toxinidir}/docs/_build/html"
whitelist_externals = echo
[testenv:jjb]
deps =
- jenkins-job-builder>=2.0.3
+ jenkins-job-builder>=2.0.5
commands =
jenkins-jobs -l DEBUG test --recursive -o {toxinidir}/archives/job-configs {toxinidir}/jjb:{toxinidir}/.jjb-test