The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

CMake plugin

cmake: Run cmake with arbitrary arguments

Runs the tool and returns the exit code of the process.
  • installation
    • Type: String
  • arguments (optional)
    • Type: String
  • ignoredExitCodes (optional)
    • Type: String
  • workingDir (optional)
    • Type: String

cmakeBuild: Generate build-scripts with cmake and run the build tool

Uses CMake to generate build-scripts and can run these.
This causes Jenkins to invoke cmake -G with the given options.
Any non-zero exit code during build-script generation causes Jenkins to mark the build as a failure.
Use the build tool invocation steps below to perform the actual build.
  • installation
    • Type: String
  • buildDir (optional)
    • Type: String
  • buildType (optional)
    • Type: String
  • cleanBuild (optional)
    • Type: boolean
  • cmakeArgs (optional)
    • Type: String
  • generator (optional)
    • Type: String
  • preloadScript (optional)
    • Type: String
  • sourceDir (optional)
    • Type: String
  • steps (optional)
      Array/List
      Nested Object
    • args (optional)
      Specify arguments to pass to the build tool or cmake (separated by spaces). Arguments may contain spaces if they are enclosed in double quotes (will be handled like a Unix shell does),
      HINT: If you plan to archive the artifacts, specify DESTDIR=${WORKSPACE}/artifacts all install here to instruct the tool to copy the artifacts to DESTDIR. At least the make and the ninja tool allow overriding the installation directory that way.
      • Type: String
    • envVars (optional)
      Specify extra environment variables to pass to the build tool as key-value pairs here.
      Each entry must be on its own line, for example:
      DESTDIR=${WORKSPACE}/artifacts/dir
      KEY=VALUE

      Please note that macros (e.g. ${WORKSPACE}) will not be resolved by a pipeline script.

      • Type: String
    • withCmake (optional)
      Whether to run the actual build tool directly (by expanding $CMAKE_BUILD_TOOL) or to have cmake run the build tool (by invoking cmake --build <dir>).
      • Leave unchecked for minimal performance overhead.
      • Check this, if you selected one of the Visual Studio or Xcode generators above AND if you run CMake v. 2.8.11 or newer.
      • Type: boolean

cpack: Run cpack

Runs the tool and returns the exit code of the process.
  • installation
    • Type: String
  • arguments (optional)
    • Type: String
  • ignoredExitCodes (optional)
    • Type: String
  • workingDir (optional)
    • Type: String

ctest: Run ctest

Runs the tool and returns the exit code of the process.
  • installation
    • Type: String
  • arguments (optional)
    • Type: String
  • ignoredExitCodes (optional)
    • Type: String
  • workingDir (optional)
    • Type: String

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.