A collection of documentation for Linux Foundation JJB Templates.
-Guides:
+Guides
+------
.. toctree::
:maxdepth: 2
best-practices
+Global JJB Templates
+--------------------
+
+Job templates are designed in the `jjb/` directory but documentation is located
+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`
+
Indices and tables
==================
--- /dev/null
+#######
+CI Jobs
+#######
+
+Job Groups
+==========
+
+{project-name}-ci-jobs
+----------------------
+
+Recommended jobs that should be deployed for CI using Gerrit.
+
+:Includes:
+
+ - gerrit-jjb-deploy-job
+ - gerrit-jjb-merge
+ - gerrit-jjb-verify
+
+{project-name}-github-ci-jobs
+-----------------------------
+
+Recommended jobs that should be deployed CI using GitHub.
+
+:Includes:
+
+ - github-jjb-deploy-job
+ - github-jjb-merge
+ - github-jjb-verify
+
+{project-name}-packer-jobs
+--------------------------
+
+Jobs related to Packer builds for CI using Gerrit.
+
+:Includes:
+
+ - gerrit-packer-merge
+ - gerrit-packer-verify
+
+{project-name}-github-packer-jobs
+---------------------------------
+
+Jobs related to Packer builds for CI using GitHub.
+
+:Includes:
+
+ - github-packer-merge
+ - github-packer-verify
+
+Macros
+======
+
+lf-infra-jjbini
+---------------
+
+Provides jenkins_jobs.ini configuration for Jenkins.
+
+lf-infra-jjbini-sandbox
+-----------------------
+
+Provides jenkins_jobs.ini configuration for Jenkins sandbox.
+
+.. todo:: This needs to be consolidated into lf-infra-jjbini when JJB 2.0 is available
+
+lf-packer-verify-file-paths
+---------------------------
+
+Gerrit file-paths for packer verify jobs.
+
+lf-packer-file-paths
+--------------------
+
+Gerrit file-paths for packer jobs.
+
+lf-packer-common
+----------------
+
+Common packer configuration.
+
+Job Templates
+=============
+
+Gerrit Branch Lock
+------------------
+
+Job submits a patch to lock or unlock a project's branch.
+
+:Template Names:
+ - {project-name}-gerrit-branch-lock-{stream}
+ - gerrit-branch-lock
+
+
+JJB Deploy Job
+--------------
+
+Deploy jobs to jenkins-sandbox system via code review comment
+
+This job checks out the current code review patch and then runs a
+`jenkins-jobs update` to push a patch defined by the comment.
+
+:Template names:
+
+ - {project-name}-jjb-deploy-job
+ - gerrit-jjb-deploy-job
+ - github-jjb-deploy-job
+
+:Comment Trigger: jjb-deploy JOB_NAME
+
+ .. note::
+
+ JOB_NAME can include the * wildcard character to push multiple jobs
+ matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
+ all builder-jjb-* jobs to the sandbox system.
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally
+ should be configured in defaults.yaml)
+
+:Optional parameters:
+
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
+
+
+JJB Merge
+---------
+
+Runs `jenkins-jobs update` to update production job configuration
+
+:Template Names:
+ - {project-name}-jjb-merge
+ - gerrit-jjb-merge
+ - github-jjb-merge
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for
+ the project.
+
+:Optional parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in seconds before aborting build. (default: 10)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :stream: Keyword that can be 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_merge_triggers: Override Gerrit Triggers.
+ :gerrit_trigger_file_paths: Override file paths which can be used to
+ filter which file modifications will trigger a build.
+ (default defined by lf_jjb_common)
+
+
+JJB Verify
+----------
+
+Runs `jenkins-jobs test` to validate JJB syntax
+
+:Template Names:
+ - {project-name}-jjb-verify
+ - gerrit-jjb-verify
+ - github-jjb-verify
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for
+ the project.
+
+:Optional parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in seconds before aborting build. (default: 10)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
+ :gerrit_trigger_file_paths: Override file paths which can be used to
+ filter which file modifications will trigger a build.
+ (default defined by lf_jjb_common)
+
+
+Packer Merge
+------------
+
+Packer Merge job runs `packer build` to build system images in the cloud.
+
+:Template Names:
+ - {project-name}-packer-merge-{platforms}-{templates}
+ - gerrit-packer-merge
+ - github-packer-merge
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for
+ the project.
+ :platforms: Platform or distribution to build. Typically json file
+ found in the packer/vars directory. (Example: centos)
+ :template: System template to build. Typically shell script found in
+ the packer/provision directory. (Example: java-builder)
+
+:Optional parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in seconds before aborting build. (default: 10)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :packer-cloud-settings: Name of settings file containing credentials
+ for the cloud that packer will build on. (default: packer-cloud-env)
+ :packer-version: Version of packer to install / use in build. (default: 1.0.2)
+ :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
+
+
+Packer Verify
+-------------
+
+Packer Verify job runs `packer validate` to verify packer configuration.
+
+:Template Names:
+ - {project-name}-packer-verify
+ - gerrit-packer-verify
+ - github-packer-verify
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for
+ the project.
+
+:Optional parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in seconds before aborting build. (default: 10)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :packer-cloud-settings: Name of settings file containing credentials
+ for the cloud that packer will build on. (default: packer-cloud-env)
+ :packer-version: Version of packer to install / use in build. (default: 1.0.2)
+ :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
+ :gerrit_trigger_file_paths: Override file paths which can be used to
+ filter which file modifications will trigger a build.
--- /dev/null
+#############
+Global Macros
+#############
+
+Builders
+========
+
+lf-fetch-dependent-patches
+--------------------------
+
+Fetch all patches provided via comment trigger
+
+This macro will fetch all patches provided via comment trigger and will
+create a list of projects from those patches via environment variable
+called DEPENDENCY_BUILD_ORDER which can be used if necessary to build
+projects in the specified order. The order is determined by first patch
+instance for a project in the patch list.
+
+lf-infra-create-netrc
+---------------------
+
+Create a ~/.netrc file from a Maven settings.xml
+
+:Required parameters:
+
+ :server-id: The id of a server as defined in settings.xml.
+
+lf-infra-deploy-maven-file
+--------------------------
+
+Deploy files to a repository.
+
+:Required parameters:
+
+ :global-settings-file: Global settings file to use.
+ :group-id: Group ID of the repository.
+ :maven-repo-url: URL of a Maven repository to upload to.
+ :mvn-version: Version of Maven to use.
+ :repo-id: Repository ID
+ :settings-file: Maven settings file to use.
+ :upload-files-dir: Path to directory containing one or more files
+
+lf-infra-docker-login
+---------------------
+
+Login into a custom hosted docker registry and / or docker.io
+
+The Jenkins system should have the following global variables defined
+
+:Environment variables:
+
+ :DOCKER_REGISTRY: The DNS address of the registry (IP or FQDN)
+ ex: nexus3.example.com (GLOBAL variable)
+
+ :REGISTRY_PORTS: Required if DOCKER_REGISTRY is set. Space separated list
+ of the registry ports to login to. ex: 10001 10002 10003 10004
+ (GLOBAL variable)
+
+ :DOCKERHUB_EMAIL: If this variable is set then an attempt to login to
+ DockerHub (docker.io) will be also made. It should be set to the email
+ address for the credentials that will get looked up. Only _one_
+ credential will ever be found in the maven settings file for DockerHub.
+ (GLOBAL variable)
+
+lf-infra-gpg-verify-git-signature
+---------------------------------
+
+Verify gpg signature of the latest commit message in $WORKSPACE.
+This command assumes that $WORKSPACE is a git repo.
+
+lf-infra-packer-build
+---------------------
+
+Run `packer build` to build system images.
+
+lf-infra-packer-validate
+------------------------
+
+Run `packer validate` to verify packer configuration.
+
+:Required parameters:
+
+ :packer-cloud-settings: Cloud configuration file. Loaded on the build
+ server as CLOUDENV environment variable.
+ :packer-version: Version of packer to use.
+
+lf-infra-ship-logs
+------------------
+
+Gather and deploy logs to a log server.
+
+lf-infra-sysstat
+----------------
+
+Retrieves system stats.
+
+lf-jacoco-nojava-workaround
+---------------------------
+
+Workaround for Jenkins not able to find Java in JaCoCo runs.
+
+lf-maven-install
+----------------
+
+Call maven-target builder with a goal of --version to force Jenkins to
+install the need provided version of Maven. This is needed for any shell scripts
+that want to use Maven.
+
+:Required parameters:
+
+ :mvn-version: Version of Maven to install.
+
+lf-pip-install
+--------------
+
+Call pip install to install packages into a virtualenv located in
+/tmp/v/VENV
+
+.. note:: The first package listed in PIP_PACKAGES is used as the VENV name.
+
+.. _lf-provide-maven-settings
+
+lf-provide-maven-settings
+-------------------------
+
+Push a global settings and user settings maven files to the build node.
+
+lf-provide-maven-settings-cleanup
+---------------------------------
+
+Cleanup maven settings.xml configuration. This should be called at the end of
+any macros that calles the
+:ref:`lf-provide-maven-settings <lf-provide-maven-settings>` macro.
+
+lf-rtd-trigger-build
+--------------------
+
+Script to trigger a build on http://readthedocs.org
+
+lf-rtd-verify
+-------------
+
+ReadTheDocs verify script.
+
+Parameters
+==========
+
+lf-infra-maven-parameters
+-------------------------
+
+Provides parameters needed by Maven. Should be used by any jobs that need to
+call the mvn cli.
+
+lf-infra-parameters
+-------------------
+
+Standard parameters used in the LF CI environments. Gerrit variables are
+not used by GitHub projects, but defining them is not harmful. Should be used
+in every job template.
+
+lf-infra-node-parameters
+------------------------
+
+Provides parameters needed by NodeJS and NPM. Should be used by any jobs that
+need to run NodeJS or NPM.
+
+lf-infra-tox-parameters
+-----------------------
+
+Provides parameters needed by python-tox. Should be used by any jobs that need
+to run `tox <https://tox.readthedocs.io>`.
+
+Properties
+==========
+
+lf-infra-properties
+-------------------
+
+Configures the build-discarder plugin for Jenkins with the recommended lf-infra
+settings. Should be used in all job-templates.
+
+Publishers
+==========
+
+lf-jacoco-report
+----------------
+
+Provides basic configuration for the JaCoCo plugin.
+
+lf-infra-publish
+----------------
+
+Provides basic lf-infra recommended publisher configurations which should be
+used in all job templates. This primary objective of this trigger is to
+gather build logs and copy them to a log server.
+
+SCM
+===
+
+lf-infra-gerrit-scm
+-------------------
+
+Basic SCM configuration for Gerrit based projects.
+
+lf-infra-github-scm
+-------------------
+
+Basic SCM configuration for GitHub based projects.
+
+Triggers
+========
+
+lf-infra-github-pr-trigger
+--------------------------
+
+Provides configuration for a GitHub PR Trigger.
+
+Wrappers
+========
+
+lf-infra-wrappers
+-----------------
+
+Provides lf-infra recommended wrappers which should be used in every
+job-template.
--- /dev/null
+##########
+Maven Jobs
+##########
+
+Job Groups
+==========
+
+{project-name}-maven-jobs
+-------------------------
+
+Jobs for Maven projects using Gerrit.
+
+:Includes:
+
+ - gerrit-maven-clm
+ - gerrit-maven-release
+ - gerrit-maven-verify
+ - gerrit-maven-verify-dependencies
+
+{project-name}-github-maven-jobs
+--------------------------------
+
+Jobs for Maven projects using GitHub.
+
+:Includes:
+
+ - github-maven-clm
+ - github-maven-release
+ - github-maven-verify
+
+{project-name}-maven-javadoc-jobs
+---------------------------------
+
+Jobs for Maven projects to generate javadoc using Gerrit.
+
+:Includes:
+
+ - gerrit-maven-javadoc-publish
+ - gerrit-maven-javadoc-verify
+
+{project-name}-github-maven-javadoc-jobs
+----------------------------------------
+
+Jobs for Maven projects to generate javadoc using GitHub.
+
+:Includes:
+
+ - github-maven-javadoc-publish
+ - github-maven-javadoc-verify
+
+
+Macros
+======
+
+lf-maven-common
+---------------
+
+Common Jenkins configuration for Maven jobs.
+
+
+Job Templates
+=============
+
+Maven CLM
+---------
+
+Produces a CLM scan of the code into Nexus IQ Server.
+
+:Template Names:
+
+ - {project-name}-maven-clm-{stream}
+ - gerrit-maven-clm
+ - github-maven-clm
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for the project.
+
+:Optional parameters:
+
+ :branch: The branch to build against. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :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)
+ :mvn-global-settings: The name of the Maven global settings to use for
+ Maven configuration. (default: global-settings)
+ :mvn-opts: Sets MAVEN_OPTS. (default: '')
+ :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
+ :mvn-version: Version of maven to use. (default: mvn33)
+ :stream: Keyword that can be 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_merge_triggers: Override Gerrit Triggers.
+
+Maven JavaDoc Publish
+---------------------
+
+Produces and publishes javadocs for a Maven project.
+
+Expects javadocs to be available in $WORKSPACE/target/site/apidocs
+
+:Template Names:
+
+ - {project-name}-maven-javadoc-publish-{stream}
+ - gerrit-maven-javadoc-publish
+ - github-maven-javadoc-publish
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :javadoc-path: The path in Nexus to deploy javadoc to.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for the project.
+ :mvn-site-id: Maven Server ID from settings.xml to pull credentials from.
+ (Note: This setting should be configured in defaults.yaml.)
+
+:Optional parameters:
+
+ :branch: The branch to build against. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :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)
+ :mvn-global-settings: The name of the Maven global settings to use for
+ Maven configuration. (default: global-settings)
+ :mvn-opts: Sets MAVEN_OPTS. (default: '')
+ :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
+ :mvn-version: Version of maven to use. (default: mvn33)
+ :stream: Keyword that can be 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_merge_triggers: Override Gerrit Triggers.
+
+Maven JavaDoc Verify
+--------------------
+
+Produces javadocs for a Maven project.
+
+Expects javadocs to be available in $WORKSPACE/target/site/apidocs
+
+:Template Names:
+
+ - {project-name}-maven-javadoc-verify-{stream}
+ - gerrit-maven-javadoc-verify
+ - github-maven-javadoc-verify
+
+:Required parameters:
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for the project.
+
+:Optional parameters:
+
+ :branch: The branch to build against. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in seconds before aborting build. (default: 60)
+ :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
+ :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-opts: Sets MAVEN_OPTS. (default: '')
+ :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
+ :mvn-version: Version of maven to use. (default: mvn33)
+ :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
+
+Maven Release
+-------------
+
+Produces a release candidate by creating a staging repo in Nexus.
+
+Runs a Maven build and deploys to $WORKSPACE/m2repo directory. This
+directory can then be reused later to deploy to Nexus.
+
+:Template Names:
+
+ - {project-name}-maven-release-{stream}
+ - gerrit-maven-release
+ - github-maven-release
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for the project.
+ :mvn-staging-id: Maven Server ID from settings.xml to pull credentials from.
+ (Note: This setting should be configured in defaults.yaml.)
+ :staging-profile-id: Profile ID of the project's Nexus staging profile.
+
+:Optional parameters:
+
+ :branch: The branch to build against. (default: master)
+ :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: '')
+ :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
+ :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-opts: Sets MAVEN_OPTS. (default: '')
+ :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
+ :mvn-version: Version of maven to use. (default: mvn33)
+ :stream: Keyword that can be 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_release_triggers: Override Gerrit Triggers.
+
+Maven Sonar
+-----------
+
+Sonar job which runs mvn clean install then publishes to Sonar.
+
+This job purposely only runs on the master branch as there are Additional
+configuration needed to support multiple branches and there's not much
+interest in that kind of support.
+
+:Template Names:
+
+ - {project-name}-sonar
+ - gerrit-maven-sonar
+ - github-maven-sonar
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be 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)
+ :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-opts: Sets MAVEN_OPTS. (default: '')
+ :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
+ :mvn-version: Version of maven to use. (default: mvn33)
+ :stream: Keyword that can be 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.
+
+Maven Verify
+------------
+
+Verify job which runs mvn clean install to test a project build..
+
+:Template Names:
+
+ - {project-name}-maven-verify-{stream}-{mvn-version}-{java-version}
+ - gerrit-maven-verify
+ - github-maven-verify
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for the project.
+
+:Optional parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :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)
+ :mvn-global-settings: The name of the Maven global settings to use for
+ Maven configuration. (default: global-settings)
+ :mvn-opts: Sets MAVEN_OPTS. (default: '')
+ :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
+ :mvn-version: Version of maven to use. (default: mvn33)
+ :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
+ :gerrit_trigger_file_paths: Override file paths which can be used to
+ filter which file modifications will trigger a build.
+
+Maven Verify /w Dependencies
+----------------------------
+
+Verify job which runs mvn clean install to test a project build /w deps
+
+This job can be used to verify a patch in conjunction to all of the
+upstream patches it depends on. The user of this job can provide a list
+via comment trigger.
+
+:Template Names:
+
+ - {project-name}-maven-verify-deps-{stream}-{mvn-version}-{java-version}
+ - gerrit-maven-verify-dependencies
+
+:Comment Trigger: recheck: SPACE_SEPERATED_LIST_OF_PATCHES
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :mvn-settings: The name of settings file containing credentials for the project.
+
+:Optional parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :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)
+ :mvn-global-settings: The name of the Maven global settings to use for
+ Maven configuration. (default: global-settings)
+ :mvn-opts: Sets MAVEN_OPTS. (default: '')
+ :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
+ :mvn-version: Version of maven to use. (default: mvn33)
+ :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
+ :gerrit_trigger_file_paths: Override file paths which can be used to
+ filter which file modifications will trigger a build.
--- /dev/null
+###########
+NodeJS Jobs
+###########
+
+Job Groups
+==========
+
+{project-name}-node-jobs
+--------------------------
+
+Jobs for NodeJS projects using Gerrit.
+
+:Includes:
+
+ - gerrit-node-verify
+
+{project-name}-github-node-jobs
+---------------------------------
+
+Jobs for NodeJS projects using GitHub.
+
+:Includes:
+
+ - github-node-verify
+
+Job Templates
+=============
+
+Node Verify
+----------
+
+Verify job for NodeJS projects
+
+:Template Names:
+
+ - {project-name}-node-verify-{stream}
+ - gerrit-node-verify
+ - github-node-verify
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :node-version: Version of NodeJS to install. A default is configured
+ via the job-group if a job-group is used.
+
+:Optional parameters:
+
+ :branch: The branch to build against. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in seconds before aborting build. (default: 10)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :node-dir: Path to a NodeJS project to run node test against
+ (default: '')
+ :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
+ :gerrit_trigger_file_paths: Override file paths which can be used to
+ filter which file modifications will trigger a build.
--- /dev/null
+###########
+Python Jobs
+###########
+
+Job Groups
+==========
+
+{project-name}-python-jobs
+--------------------------
+
+Jobs for Python projects using Gerrit.
+
+:Includes:
+
+ - gerrit-tox-verify
+
+{project-name}-github-python-jobs
+---------------------------------
+
+Jobs for Python projects using GitHub.
+
+:Includes:
+
+ - github-tox-verify
+
+Job Templates
+=============
+
+Tox Verify
+----------
+
+Tox runner to verify a project
+
+:Template Names:
+
+ - {project-name}-tox-verify-{stream}
+ - gerrit-tox-verify
+ - github-tox-verify
+
+:Required Parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+
+:Optional Parameters:
+
+ :branch: The branch to build against. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in seconds before aborting build. (default: 10)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :stream: Keyword that can be used to represent a release code-name.
+ Often the same as the branch. (default: master)
+ :submodule-recursive: Whether to checkout submodules recursively.
+ (default: true)
+ :tox-dir: Directory containing the project's tox.ini relative to
+ the workspace. Empty works if tox.ini is at project root.
+ (default: '')
+ :tox-envs: Tox environments to run. If blank run everything described
+ in tox.ini. (default: '')
--- /dev/null
+################
+ReadTheDocs Jobs
+################
+
+Job Groups
+==========
+
+{project-name}-rtd-jobs
+----------------------
+
+Jobs that should be deployed for a project producing ReadTheDocs using Gerrit.
+
+:Includes:
+
+ - gerrit-rtd-merge
+ - gerrit-rtd-verify
+
+{project-name}-github-rtd-jobs
+-----------------------------
+
+Jobs that should be deployed for a project producing ReadTheDocs using GitHub.
+
+:Includes:
+
+ - github-rtd-merge
+ - github-rtd-verify
+
+
+Macros
+======
+
+lf-rtd-common
+-------------
+
+RTD verify and merge jobs are the same except for their scm, trigger, and
+builders definition. This anchor is the common template.
+
+
+Job Templates
+=============
+
+ReadTheDocs Merge
+-----------------
+
+Merge job which triggers a POST of the docs project to readthedocs
+
+:Template Names:
+ - {project-name}-rtd-merge-{stream}
+ - gerrit-rtd-merge
+ - github-rtd-merge
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+ :rtd-project: This is the name of the project on ReadTheDocs.org.
+
+:Optional parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in seconds before aborting build. (default: 15)
+ :git-url: base URL of git project. (default: https://github.com)
+ :project-pattern: Project to trigger build against. (default: **)
+ :stream: Keyword that can be 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_merge_triggers: Override Gerrit Triggers.
+ :gerrit_trigger_file_paths: Override file paths which can be used to
+ filter which file modifications will trigger a build.
+ **default**::
+
+ - compare-type: ANT
+ pattern: '**/*.rst'
+ - compare-type: ANT
+ pattern: '**/conf.py'
+
+
+ReadTheDocs Verify
+------------------
+
+Verify job which runs a tox build of the docs project
+
+:Template Names:
+ - {project-name}-rtd-verify-{stream}
+ - gerrit-rtd-verify
+ - github-rtd-verify
+
+:Required Parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+
+:Optional Parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-node: The node to run build on.
+ :build-timeout: Timeout in seconds before aborting build. (default: 15)
+ :doc-dir: Directory where tox will place built docs.
+ as defined in the tox.ini (default: docs/_build/html)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :project-pattern: Project to trigger build against. (default: **)
+ :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
+ :gerrit_trigger_file_paths: Override file paths which can be used to
+ filter which file modifications will trigger a build.
+ **default**::
+
+ - compare-type: ANT
+ pattern: '**/*.rst'
+ - compare-type: ANT
+ pattern: '**/conf.py'
--- /dev/null
+#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2017 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
+##############################################################################
+
+# Checks for JJB documentation interest points and ensures they are documented.
+
+jjb_files=($(find jjb -name "*.yaml"))
+
+undocumented_count=0
+for file in "${jjb_files[@]}"; do
+ docs_interests=$(grep -e '\- builder:' \
+ -e '\- job-group:' \
+ -e '\- job-template:' \
+ -e '\- parameter:' \
+ -e '\- property:' \
+ -e '\- publisher:' \
+ -e '\- scm:' \
+ -e '\- trigger:' \
+ -e '\- wrapper:' \
+ -A1 "$file" \
+ | grep 'name: ' | awk -F': ' '{print $2}' | awk -F"'" '{print $2}' | sort | uniq)
+
+ for item in "${docs_interests[@]}"; do
+ if ! grep -q "$item" "docs/${file//.yaml/.rst}"; then
+ echo "$item"
+ let "undocumented_count++"
+ fi
+ done
+done
+
+if [ $undocumented_count -gt 0 ]; then
+ echo "Number of undocumented items: $undocumented_count"
+ exit 1
+fi
- job-group:
name: '{project-name}-ci-jobs'
- # This job group contains all the recommended jobs that should be deployed
- # for any project ci.
-
jjb-version: 1.6.2
jobs:
- job-group:
name: '{project-name}-github-ci-jobs'
- # This job group contains all the recommended jobs that should be deployed
- # for any project ci that is using github.
-
jjb-version: 1.6.2
jobs:
- github-jjb-merge
- github-jjb-verify
-
- job-group:
name: '{project-name}-packer-jobs'
- # This job group contains all the recommended jobs that should be deployed
- # for any project ci that is using packer.
-
packer-version: 1.0.2
jobs:
- job-group:
name: '{project-name}-github-packer-jobs'
- # This job group contains all the recommended jobs that should be deployed
- # for any project ci that is using packer.
-
packer-version: 1.0.2
jobs:
- lf_jjb_deploy_job: &lf_jjb_deploy_job
name: lf-jjb-deploy-job
- # Deploy jobs to jenkins-sandbox system via code review comment
- #
- # This job checks out the current code review patch and then runs a
- # `jenkins-jobs update` to push a patch defined by the comment.
- #
- # Comment Trigger: jjb-deploy JOB_NAME
- #
- # JOB_NAME can include the * wildcard character to push multiple jobs
- # matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
- # all builder-jjb-* jobs to the sandbox system.
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- #
- # Optional parameters:
- #
- # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
- # :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
-
######################
# Default parameters #
######################
- lf_jjb_merge: &lf_jjb_merge
name: lf-jjb-merge
- # JJB Merge job runs `jenkins-jobs update` to update production job configuration
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :mvn-settings: The name of settings file containing credentials for
- # the project.
- #
- # Optional parameters:
- #
- # :branch: Git branch to fetch for the build. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-timeout: Timeout in seconds before aborting build. (default: 10)
- # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
- # :stream: Keyword that can be 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_merge_triggers: Override Gerrit Triggers.
- # :gerrit_trigger_file_paths: Override file paths which can be used to
- # filter which file modifications will trigger a build.
- # (default defined by lf_jjb_common)
-
######################
# Default parameters #
######################
- lf_jjb_verify: &lf_jjb_verify
name: lf-jjb-verify
- # JJB Verify job runs `jenkins-jobs test` to validate JJB syntax
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :mvn-settings: The name of settings file containing credentials for
- # the project.
- #
- # Optional parameters:
- #
- # :branch: Git branch to fetch for the build. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-timeout: Timeout in seconds before aborting build. (default: 10)
- # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
- # :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
- # :gerrit_trigger_file_paths: Override file paths which can be used to
- # filter which file modifications will trigger a build.
- # (default defined by lf_jjb_common)
-
######################
# Default parameters #
######################
- lf_packer_merge: &lf_packer_merge
name: lf-packer-merge
- # Packer Merge job runs `packer build` to build system images in the cloud.
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :mvn-settings: The name of settings file containing credentials for
- # the project.
- # :platforms: Platform or distribution to build. Typically json file
- # found in the packer/vars directory. (Example: centos)
- # :template: System template to build. Typically shell script found in
- # the packer/provision directory. (Example: java-builder)
- #
- # Optional parameters:
- #
- # :branch: Git branch to fetch for the build. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-timeout: Timeout in seconds before aborting build. (default: 10)
- # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
- # :packer-cloud-settings: Name of settings file containing credentials
- # for the cloud that packer will build on. (default: packer-cloud-env)
- # :packer-version: Version of packer to install / use in build. (default: 1.0.2)
- # :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
-
######################
# Default parameters #
######################
- lf_packer_verify: &lf_packer_verify
name: lf-packer-verify
- # Packer Verify job runs `packer validate` to verify packer configuration.
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :mvn-settings: The name of settings file containing credentials for
- # the project.
- #
- # Optional parameters:
- #
- # :branch: Git branch to fetch for the build. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-timeout: Timeout in seconds before aborting build. (default: 10)
- # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
- # :packer-cloud-settings: Name of settings file containing credentials
- # for the cloud that packer will build on. (default: packer-cloud-env)
- # :packer-version: Version of packer to install / use in build. (default: 1.0.2)
- # :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
- # :gerrit_trigger_file_paths: Override file paths which can be used to
- # filter which file modifications will trigger a build.
-
######################
# Default parameters #
######################
- builder:
name: lf-fetch-dependent-patches
- # Fetches all patches provided via comment trigger
- #
- # This macro will fetch all patches provided via comment trigger and will
- # create a list of projects from those patches via environment variable
- # called DEPENDENCY_BUILD_ORDER which can be used if necessary to build
- # projects in the specified order. The order is determined by first patch
- # instance for a project in the patch list.
builders:
- shell: !include-raw: ../shell/gerrit-fetch-dependencies.sh
- inject:
- builder:
name: lf-infra-create-netrc
- # Macro to create a ~/.netrc file from a Maven settings.xml
- # Parameters:
- # {server-id} The id of a server as defined in settings.xml
builders:
- inject:
properties-content: 'SERVER_ID={server-id}'
- builder:
name: lf-infra-docker-login
- # Login into a custom hosted docker registry and / or docker.io
- #
- # The Jenkins system should have the following global variables defined
- #
- # DOCKER_REGISTRY : Optional
- # The DNS address of the registry (IP or FQDN)
- # ex: nexus3.example.com
- #
- # REGISTRY_PORTS : Required if DOCKER_REGISTRY is set
- # Space separated listing of the registry ports to login
- # to
- # ex: 10001 10002 10003 10004
- #
- # DOCKERHUB_EMAIL : Optional
- # If this variable is set then an attempt to login to
- # DockerHub (docker.io) will be also made. It should be
- # set to the email address for the credentials that will
- # get looked up. Only _one_ credential will ever be found
- # in the maven settings file for DockerHub
builders:
- lf-provide-maven-settings:
global-settings-file: '{global-settings-file}'
- builder:
name: lf-infra-gpg-verify-git-signature
- # Verify gpg signature of the latest commit message in $WORKSPACE
- #
- # This command assumes that $WORKSPACE is a git repo.
- #
# TODO: Verify signature after downloading users public key from a locally
# created repository instead of the public keymesh. This requires a process
# in place to get ODL developers public keys into a local repository without
- builder:
name: lf-infra-deploy-maven-file
- # Deploy files to a repository.
- #
- # The builder requires passing the following parameters
- # REPO_ID: Repository ID
- # GROUP_ID: Group ID of the repository
- # UPLOAD_FILES_PATH: Path to directory containing one or more files
builders:
- lf-maven-install:
mvn-version: '{mvn-version}'
- builder:
name: lf-maven-install
- # call maven-target builder with a goal of --version to force Jenkins to
- # install the needed maven version
builders:
# Create a $HOME/.wgetrc to make the Maven download quiet.
- shell: 'echo "quiet=on" > "$HOME/.wgetrc"'
- builder:
name: lf-provide-maven-settings
- # Push a global settings and user settings maven files
builders:
- config-file-provider:
files:
- builder:
name: lf-pip-install
- # Call pip install to install packages into a virtualenv
- # The first package listed in PIP_PACKAGES is used as the virtualenv name.
builders:
- inject:
properties-content: PIP_PACKAGES={pip-packages}
- builder:
name: lf-provide-maven-settings-cleanup
- # Clear maven settings files after we are done using them
builders:
- shell: |
#!/bin/bash
- parameter:
name: lf-infra-node-parameters
- # Parameters for NodeJS
parameters:
- string:
name: NODE_DIR
- parameter:
name: lf-infra-tox-parameters
- # Useful parameters when working with TOX
- # https://tox.readthedocs.io/
parameters:
- string:
name: TOX_DIR
- lf_maven_clm: &lf_maven_clm
name: lf-maven-clm
- # Produces a CLM scan of the code into Nexus IQ Server.
- #
- # Required parameters:
- # build-node: The node to run build on.
- # jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # mvn-settings: The name of settings file containing credentials for
- # the project.
- #
- # Optional parameters:
- #
- # :branch: The branch to build against. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :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)
- # :mvn-global-settings: The name of the Maven global settings to use for
- # Maven configuration. (default: global-settings)
- # :mvn-opts: Sets MAVEN_OPTS. (default: '')
- # :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
- # :mvn-version: Version of maven to use. (default: mvn33)
- # :stream: Keyword that can be 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_merge_triggers: Override Gerrit Triggers.
-
######################
# Default parameters #
######################
- lf_maven_javadoc_publish: &lf_maven_javadoc_publish
name: lf-maven-javadoc-publish
- # Produces and publishes javadocs for a Maven project.
- #
- # Expects javadocs to be available in $WORKSPACE/target/site/apidocs
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :javadoc-path: The path in Nexus to deploy javadoc to.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :mvn-settings: The name of settings file containing credentials for
- # the project.
- # :mvn-site-id: Maven Server ID from settings.xml to pull credentials from.
- # (Note: This setting should be configured in defaults.yaml.)
- #
- # Optional parameters:
- #
- # :branch: The branch to build against. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :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)
- # :mvn-global-settings: The name of the Maven global settings to use for
- # Maven configuration. (default: global-settings)
- # :mvn-opts: Sets MAVEN_OPTS. (default: '')
- # :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
- # :mvn-version: Version of maven to use. (default: mvn33)
- # :stream: Keyword that can be 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_merge_triggers: Override Gerrit Triggers.
-
######################
# Default parameters #
######################
- lf_maven_javadoc_verify: &lf_maven_javadoc_verify
name: lf-maven-javadoc-verify
- # Produces javadocs for a Maven project.
- #
- # Expects javadocs to be available in $WORKSPACE/target/site/apidocs
- #
- # Required parameters:
- # build-node: The node to run build on.
- # jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # mvn-settings: The name of settings file containing credentials for
- # the project.
- #
- # Optional parameters:
- #
- # :branch: The branch to build against. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-timeout: Timeout in seconds before aborting build. (default: 60)
- # :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
- # :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-opts: Sets MAVEN_OPTS. (default: '')
- # :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
- # :mvn-version: Version of maven to use. (default: mvn33)
- # :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
-
######################
# Default parameters #
######################
- lf_maven_release: &lf_maven_release
name: lf-maven-release
- # Produces a release candidate by creating a staging repo in Nexus.
- #
- # Runs a Maven build and deploys to $WORKSPACE/m2repo directory. This
- # directory can then be reused later to deploy to Nexus.
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :mvn-settings: The name of settings file containing credentials for
- # the project.
- # :mvn-staging-id: Maven Server ID from settings.xml to pull credentials from.
- # (Note: This setting should be configured in defaults.yaml.)
- # :staging-profile-id: Profile ID of the project's Nexus staging profile.
- #
- # Optional parameters:
- #
- # :branch: The branch to build against. (default: master)
- # :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: '')
- # :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
- # :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-opts: Sets MAVEN_OPTS. (default: '')
- # :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
- # :mvn-version: Version of maven to use. (default: mvn33)
- # :stream: Keyword that can be 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_release_triggers: Override Gerrit Triggers.
-
######################
# Default parameters #
######################
- lf_maven_sonar: &lf_maven_sonar
name: lf-maven-sonar
- # Sonar job which runs mvn clean install then publishes to Sonar.
- #
- # This job purposely only runs on the master branch as there are Additional
- # configuration needed to support multiple branches and there's not much
- # interest in that kind of support.
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be 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)
- # :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-opts: Sets MAVEN_OPTS. (default: '')
- # :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
- # :mvn-version: Version of maven to use. (default: mvn33)
- # :stream: Keyword that can be 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.
-
######################
# Default parameters #
######################
- lf_maven_verify: &lf_maven_verify
name: lf-maven-verify
- # Verify job which runs mvn clean install to test a project build..
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :mvn-settings: The name of settings file containing credentials for
- # the project.
- #
- # Optional parameters:
- #
- # :branch: Git branch to fetch for the build. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :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)
- # :mvn-global-settings: The name of the Maven global settings to use for
- # Maven configuration. (default: global-settings)
- # :mvn-opts: Sets MAVEN_OPTS. (default: '')
- # :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
- # :mvn-version: Version of maven to use. (default: mvn33)
- # :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
- # :gerrit_trigger_file_paths: Override file paths which can be used to
- # filter which file modifications will trigger a build.
-
######################
# Default parameters #
######################
- lf_maven_verify_dependencies: &lf_maven_verify_dependencies
name: lf-maven-verify-dependencies
- # Verify job which runs mvn clean install to test a project build /w deps
- #
- # This job can be used to verify a patch in conjunction to all of the
- # upstream patches it depends on. The user of this job can provide a list
- # via comment trigger. The trigger is:
- #
- # 'recheck: SPACE_SEPERATED_LIST_OF_PATCHES'
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :mvn-settings: The name of settings file containing credentials for
- # the project.
- #
- # Optional parameters:
- #
- # :branch: Git branch to fetch for the build. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :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)
- # :mvn-global-settings: The name of the Maven global settings to use for
- # Maven configuration. (default: global-settings)
- # :mvn-opts: Sets MAVEN_OPTS. (default: '')
- # :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
- # :mvn-version: Version of maven to use. (default: mvn33)
- # :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
- # :gerrit_trigger_file_paths: Override file paths which can be used to
- # filter which file modifications will trigger a build.
-
######################
# Default parameters #
######################
- lf_node_verify: &lf_node_verify
name: lf-node-verify
- # Verify job for NodeJS projects
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :node-version: Version of NodeJS to install. A default is configured
- # via the job-group if a job-group is used.
- #
- # Optional parameters:
- #
- # :branch: The branch to build against. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-timeout: Timeout in seconds before aborting build. (default: 10)
- # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
- # :node-dir: Path to a NodeJS project to run node test against
- # (default: '')
- # :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
- # :gerrit_trigger_file_paths: Override file paths which can be used to
- # filter which file modifications will trigger a build.
-
######################
# Default parameters #
######################
- lf_tox_verify: &lf_tox_verify
name: lf-tox-verify
- # Tox runner to verify a project
- #
- # Runs tox to verify a project.
- #
- # Required Parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- #
- # Optional Parameters:
- #
- # :branch: The branch to build against. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-timeout: Timeout in seconds before aborting build. (default: 10)
- # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
- # :stream: Keyword that can be used to represent a release code-name.
- # Often the same as the branch. (default: master)
- # :submodule-recursive: Whether to checkout submodules recursively.
- # (default: true)
- # :tox-dir: Directory containing the project's tox.ini relative to
- # the workspace. Empty works if tox.ini is at project root.
- # (default: '')
- # :tox-envs: Tox environments to run. If blank run everything described
- # in tox.ini. (default: '')
-
######################
# Default parameters #
######################
- job-group:
name: '{project-name}-rtd-jobs'
- # This job group contains all the ReadTheDocs jobs
-
jobs:
- gerrit-rtd-merge
- gerrit-rtd-verify
- job-group:
name: '{project-name}-github-rtd-jobs'
- # This job group contains all the ReadTheDocs jobs
-
jobs:
- github-rtd-merge
- github-rtd-verify
- lf_rtd_common: &lf_rtd_common
name: lf-rtd-common
- # RTD verify and merge jobs are the same except for their scm, trigger, and
- # builders definition. This anchor is the common template.
######################
# Default parameters #
- lf_rtd_merge: &lf_rtd_merge
name: lf-rtd-merge
- # Merge job which triggers a POST of the docs project to readthedocs
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :rtd-project: This is the name of the project on ReadTheDocs.org.
- #
- # Optional parameters:
- #
- # :branch: Git branch to fetch for the build. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-timeout: Timeout in seconds before aborting build. (default: 15)
- # :git-url: base URL of git project. (default: https://github.com)
- # :project-pattern: Project to trigger build against. (default: **)
- # :stream: Keyword that can be 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_merge_triggers: Override Gerrit Triggers.
- # :gerrit_trigger_file_paths: Override file paths which can be used to
- # filter which file modifications will trigger a build.
- # (default: - compare-type: ANT
- # pattern: '**/*.rst'
- # - compare-type: ANT
- # pattern: '**/conf.py')
-
######################
# Default parameters #
######################
- lf_rtd_verify: &lf_rtd_verify
name: lf-rtd-verify
- # Verify job which runs a tox build of the docs project
- #
- # Required Parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- #
- # Optional Parameters:
- #
- # :branch: Git branch to fetch for the build. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-node: The node to run build on.
- # :build-timeout: Timeout in seconds before aborting build. (default: 15)
- # :doc-dir: Directory where tox will place built docs.
- # as defined in the tox.ini (default: docs/_build/html)
- # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
- # :project-pattern: Project to trigger build against. (default: **)
- # :stream: Keyword that can be 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_verify_triggers: Override Gerrit Triggers.
- # :gerrit_trigger_file_paths: Override file paths which can be used to
- # filter which file modifications will trigger a build.
- # (default: - compare-type: ANT
- # pattern: '**/*.rst'
- # - compare-type: ANT
- # pattern: '**/conf.py')
######################
# Default parameters #
echo "Generated docs available in {toxinidir}/docs/_build/html"
whitelist_externals = echo
+[testenv:ensure-documented]
+commands =
+ ./ensure-documented.sh
+
[testenv:jjb]
deps =
jenkins-job-builder