From 391e8138f528a720604ed9da7bda949b5e56fbec Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Sun, 15 Oct 2017 16:44:08 -0400 Subject: [PATCH] Migrate Global JJB docs to RST This moves Global JJB documentation into RST docs and adds a new checker which parses YAML files for items that are missing documentation to ensure that every new template addition comes with supporting documentation. Tried to update documentation where it made sense too but we should probably go back later and review all the items to make sure they are all sufficiently documented. Especially macros which in many places are lacking in required parameter documentation. Change-Id: I6551e14f934a904378771262d1491cb5b3df5854 Signed-off-by: Thanh Ha --- docs/index.rst | 16 +- docs/jjb/lf-ci-jobs.rst | 270 ++++++++++++++++++++++++++++++++++ docs/jjb/lf-macros.rst | 225 ++++++++++++++++++++++++++++ docs/jjb/lf-maven-jobs.rst | 350 ++++++++++++++++++++++++++++++++++++++++++++ docs/jjb/lf-node-jobs.rst | 63 ++++++++ docs/jjb/lf-python-jobs.rst | 60 ++++++++ docs/jjb/lf-rtd-jobs.rst | 121 +++++++++++++++ ensure-documented.sh | 41 ++++++ jjb/lf-ci-jobs.yaml | 145 ------------------ jjb/lf-macros.yaml | 48 ------ jjb/lf-maven-jobs.yaml | 232 ----------------------------- jjb/lf-node-jobs.yaml | 27 ---- jjb/lf-python-jobs.yaml | 26 ---- jjb/lf-rtd-jobs.yaml | 65 -------- tox.ini | 4 + 15 files changed, 1149 insertions(+), 544 deletions(-) create mode 100644 docs/jjb/lf-ci-jobs.rst create mode 100644 docs/jjb/lf-macros.rst create mode 100644 docs/jjb/lf-maven-jobs.rst create mode 100644 docs/jjb/lf-node-jobs.rst create mode 100644 docs/jjb/lf-python-jobs.rst create mode 100644 docs/jjb/lf-rtd-jobs.rst create mode 100755 ensure-documented.sh diff --git a/docs/index.rst b/docs/index.rst index 40a45904..c1d16db8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,13 +8,27 @@ Documentation. 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 ================== diff --git a/docs/jjb/lf-ci-jobs.rst b/docs/jjb/lf-ci-jobs.rst new file mode 100644 index 00000000..49fb4678 --- /dev/null +++ b/docs/jjb/lf-ci-jobs.rst @@ -0,0 +1,270 @@ +####### +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. diff --git a/docs/jjb/lf-macros.rst b/docs/jjb/lf-macros.rst new file mode 100644 index 00000000..d6e5f143 --- /dev/null +++ b/docs/jjb/lf-macros.rst @@ -0,0 +1,225 @@ +############# +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 ` 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 `. + +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. diff --git a/docs/jjb/lf-maven-jobs.rst b/docs/jjb/lf-maven-jobs.rst new file mode 100644 index 00000000..9c4d6ca1 --- /dev/null +++ b/docs/jjb/lf-maven-jobs.rst @@ -0,0 +1,350 @@ +########## +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. diff --git a/docs/jjb/lf-node-jobs.rst b/docs/jjb/lf-node-jobs.rst new file mode 100644 index 00000000..028bae94 --- /dev/null +++ b/docs/jjb/lf-node-jobs.rst @@ -0,0 +1,63 @@ +########### +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. diff --git a/docs/jjb/lf-python-jobs.rst b/docs/jjb/lf-python-jobs.rst new file mode 100644 index 00000000..02fff2b3 --- /dev/null +++ b/docs/jjb/lf-python-jobs.rst @@ -0,0 +1,60 @@ +########### +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: '') diff --git a/docs/jjb/lf-rtd-jobs.rst b/docs/jjb/lf-rtd-jobs.rst new file mode 100644 index 00000000..66181a47 --- /dev/null +++ b/docs/jjb/lf-rtd-jobs.rst @@ -0,0 +1,121 @@ +################ +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' diff --git a/ensure-documented.sh b/ensure-documented.sh new file mode 100755 index 00000000..a2ca0721 --- /dev/null +++ b/ensure-documented.sh @@ -0,0 +1,41 @@ +#!/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 diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index a83d87a0..026dbf01 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -2,9 +2,6 @@ - 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: @@ -15,9 +12,6 @@ - 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: @@ -25,13 +19,9 @@ - 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: @@ -42,9 +32,6 @@ - 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: @@ -270,28 +257,6 @@ - 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 # ###################### @@ -400,32 +365,6 @@ - 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 # ###################### @@ -516,32 +455,6 @@ - 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 # ###################### @@ -640,36 +553,6 @@ - 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 # ###################### @@ -766,34 +649,6 @@ - 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 # ###################### diff --git a/jjb/lf-macros.yaml b/jjb/lf-macros.yaml index 54a547db..562168ac 100644 --- a/jjb/lf-macros.yaml +++ b/jjb/lf-macros.yaml @@ -5,13 +5,6 @@ - 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: @@ -19,9 +12,6 @@ - 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}' @@ -29,25 +19,6 @@ - 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}' @@ -57,10 +28,6 @@ - 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 @@ -132,12 +99,6 @@ - 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}' @@ -158,8 +119,6 @@ - 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"' @@ -170,7 +129,6 @@ - builder: name: lf-provide-maven-settings - # Push a global settings and user settings maven files builders: - config-file-provider: files: @@ -181,8 +139,6 @@ - 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} @@ -190,7 +146,6 @@ - builder: name: lf-provide-maven-settings-cleanup - # Clear maven settings files after we are done using them builders: - shell: | #!/bin/bash @@ -322,7 +277,6 @@ - parameter: name: lf-infra-node-parameters - # Parameters for NodeJS parameters: - string: name: NODE_DIR @@ -335,8 +289,6 @@ - parameter: name: lf-infra-tox-parameters - # Useful parameters when working with TOX - # https://tox.readthedocs.io/ parameters: - string: name: TOX_DIR diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 44b3470f..0191c842 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -91,34 +91,6 @@ - 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 # ###################### @@ -201,40 +173,6 @@ - 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 # ###################### @@ -348,37 +286,6 @@ - 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 # ###################### @@ -487,45 +394,6 @@ - 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 # ###################### @@ -637,38 +505,6 @@ - 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 # ###################### @@ -796,37 +632,6 @@ - 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 # ###################### @@ -948,43 +753,6 @@ - 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 # ###################### diff --git a/jjb/lf-node-jobs.yaml b/jjb/lf-node-jobs.yaml index 46eb3a9c..f992d34c 100644 --- a/jjb/lf-node-jobs.yaml +++ b/jjb/lf-node-jobs.yaml @@ -26,33 +26,6 @@ - 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 # ###################### diff --git a/jjb/lf-python-jobs.yaml b/jjb/lf-python-jobs.yaml index 904a3f16..c37fab32 100644 --- a/jjb/lf-python-jobs.yaml +++ b/jjb/lf-python-jobs.yaml @@ -24,32 +24,6 @@ - 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 # ###################### diff --git a/jjb/lf-rtd-jobs.yaml b/jjb/lf-rtd-jobs.yaml index 8e9def99..b7ff603c 100644 --- a/jjb/lf-rtd-jobs.yaml +++ b/jjb/lf-rtd-jobs.yaml @@ -2,8 +2,6 @@ - job-group: name: '{project-name}-rtd-jobs' - # This job group contains all the ReadTheDocs jobs - jobs: - gerrit-rtd-merge - gerrit-rtd-verify @@ -11,8 +9,6 @@ - job-group: name: '{project-name}-github-rtd-jobs' - # This job group contains all the ReadTheDocs jobs - jobs: - github-rtd-merge - github-rtd-verify @@ -23,8 +19,6 @@ - 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 # @@ -70,35 +64,6 @@ - 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 # ###################### @@ -174,36 +139,6 @@ - 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 # diff --git a/tox.ini b/tox.ini index 0eff0210..41eb7b69 100644 --- a/tox.ini +++ b/tox.ini @@ -23,6 +23,10 @@ commands = 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 -- 2.16.6