X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=docs%2Fjjb%2Flf-c-cpp-jobs.rst;h=302fe03f32ef4d520c99b9cfd78c7ea3880554b8;hb=4289661f9299da56de34e5ccfe2a6732eb565889;hp=4d6d4cec04ab444ed04c34c3cbbaea735629d1cf;hpb=78f0bd978eeadea71fdc31e16de4cc4b8e769b48;p=releng%2Fglobal-jjb.git diff --git a/docs/jjb/lf-c-cpp-jobs.rst b/docs/jjb/lf-c-cpp-jobs.rst index 4d6d4cec..302fe03f 100644 --- a/docs/jjb/lf-c-cpp-jobs.rst +++ b/docs/jjb/lf-c-cpp-jobs.rst @@ -5,6 +5,60 @@ C/C++ Jobs Job Templates ============= +CMake Sonar +----------- + +The Sonar job installs the SonarQube CXX build wrapper and scanner tools, +uses the build wrapper to invoke cmake && make, runs the scanner to +analyze code files, and publishes the results to SonarCloud. Does not +support reporting of code coverage. Optionally runs a shell script before +the build to install prerequisites. + +This job purposely runs on the master branch because the basic SonarCloud +configuration does not support multi-branch. + +:Template Names: + + - {project-name}-cmake-sonar + - gerrit-cmake-sonar + - github-cmake-sonar + +:Comment Trigger: run-sonar + +:Required parameters: + + :build-node: The node to run build on. + :jenkins-ssh-credential: Credential to use for SSH. (Configure in + defaults.yaml) + :sonarcloud-api-token: SonarCloud API Token. + :sonarcloud-organization: SonarCloud project organization. + :sonarcloud-project-key: SonarCloud project key. + +:Optional parameters: + + :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7) + :build-timeout: Timeout in minutes before aborting build. (default: 15) + :cmake-opts: Parameters to pass to cmake. (default: '') + :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: '@daily') + :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) + :install-prefix: CMAKE_INSTALL_PREFIX to use for install. + (default: $BUILD_DIR/output) + :make-opts: Parameters to pass to make. (default: '') + :pre-build: Shell script to run before performing build. Useful for + setting up dependencies. (default: '') + :sonar-scanner-version: Version of sonar-scanner to install. + (see YAML for default value; e.g., 3.3.0.1492) + :submodule-recursive: Whether to checkout submodules recursively. + (default: true) + :submodule-timeout: Timeout (in minutes) for checkout operation. + (default: 10) + :submodule-disable: Disable submodule checkout operation. + (default: false) + + :gerrit_sonar_triggers: Override Gerrit Triggers. + CMake Stage ----------- @@ -39,14 +93,6 @@ project into a tar.xz tarball to produce a release candidate. :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) :install-prefix: CMAKE_INSTALL_PREFIX to use for install. (default: $BUILD_DIR/output) - - .. code-block:: bash - :caption: Example - - install-prefix: | - #!/bin/bash - echo "Hello World." - :make-opts: Parameters to pass to make. (default: '') :pre-build: Shell script to run before performing build. Useful for setting up dependencies. (default: '') @@ -54,6 +100,10 @@ project into a tar.xz tarball to produce a release candidate. Often the same as the branch. (default: master) :submodule-recursive: Whether to checkout submodules recursively. (default: true) + :submodule-timeout: Timeout (in minutes) for checkout operation. + (default: 10) + :submodule-disable: Disable submodule checkout operation. + (default: false) :version: (default: '') Project version to stage release as. There are 2 methods for using this value: @@ -101,14 +151,6 @@ Verify job which runs cmake && make && make install to test a project build.. :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) :install-prefix: CMAKE_INSTALL_PREFIX to use for install. (default: $BUILD_DIR/output) - - .. code-block:: bash - :caption: Example - - install-prefix: | - #!/bin/bash - echo "Hello World." - :make-opts: Parameters to pass to make. (default: '') :pre-build: Shell script to run before performing build. Useful for setting up dependencies. (default: '') @@ -116,6 +158,10 @@ Verify job which runs cmake && make && make install to test a project build.. Often the same as the branch. (default: master) :submodule-recursive: Whether to checkout submodules recursively. (default: true) + :submodule-timeout: Timeout (in minutes) for checkout operation. + (default: 10) + :submodule-disable: Disable submodule checkout operation. + (default: false) :gerrit_verify_triggers: Override Gerrit Triggers. :gerrit_trigger_file_paths: Override file paths which to filter which file