mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-11-28 08:49:44 +02:00
add new configuration documentation
This commit is contained in:
parent
6a223f5392
commit
fe6cc8867a
@ -22,6 +22,7 @@ none
|
||||
| parameter | mandatory | default | possible values |
|
||||
| ----------|-----------|---------|-----------------|
|
||||
| script | no | empty `commonPipelineEnvironment` | |
|
||||
| artifactType | no | | 'appContainer' |
|
||||
| buildTool | no | maven | maven, docker |
|
||||
| commitVersion | no | `true` | `true`, `false` |
|
||||
| dockerVersionSource | no | `''` | FROM, (ENV name),appVersion |
|
||||
@ -37,6 +38,7 @@ none
|
||||
| versioningTemplate | no | depending on `buildTool`<br />maven: `${version}-${timestamp}${commitId?"_"+commitId:""}` | |
|
||||
|
||||
* `script` defines the global script environment of the Jenkinsfile run. Typically `this` is passed to this parameter. This allows the function to access the [`commonPipelineEnvironment`](commonPipelineEnvironment.md) for retrieving e.g. configuration parameters.
|
||||
* `artifactType` defines the type of the artifact.
|
||||
* `buildTool` defines the tool which is used for building the artifact.
|
||||
* `commitVersion` controls if the changed version is committed and pushed to the git repository. If this is enabled (which is the default), you need to provide `gitCredentialsId` and `gitSshUrl`.
|
||||
* `dockerVersionSource` specifies the source to be used for the main version which is used for generating the automatic version.
|
||||
@ -54,7 +56,7 @@ none
|
||||
* `timestamp` defines the timestamp to be used in the automatic version string. You could overwrite the default behavior by explicitly setting this string.
|
||||
|
||||
## Step configuration
|
||||
Following parameters can also be specified as step parameters using the global configuration file:
|
||||
The following parameters can also be specified as step parameters using the global configuration file:
|
||||
|
||||
* `artifactType`
|
||||
* `buildTool`
|
||||
@ -70,9 +72,7 @@ Following parameters can also be specified as step parameters using the global c
|
||||
* `timestampTemplate`
|
||||
* `versioningTemplate`
|
||||
|
||||
## Explanation of pipeline step
|
||||
|
||||
Pipeline step:
|
||||
## Example
|
||||
|
||||
```groovy
|
||||
artifactSetVersion script: this, buildTool: 'maven'
|
||||
|
@ -102,6 +102,19 @@ Each of the parameters `aggregation`, `tasks`, `pmd`, `cpd`, `findbugs`, `checks
|
||||
| archive | no | `true` | `true`, `false` |
|
||||
| thresholds | no | none | see [thresholds](#thresholds) |
|
||||
|
||||
## Step configuration
|
||||
Following parameters can also be specified as step parameters using the global configuration file:
|
||||
|
||||
* `aggregation`
|
||||
* `tasks`
|
||||
* `pmd`
|
||||
* `cpd`
|
||||
* `findbugs`
|
||||
* `checkstyle`
|
||||
* `eslint`
|
||||
* `pylint`
|
||||
* `archive`
|
||||
|
||||
### Thresholds
|
||||
|
||||
It is possible to define thresholds to fail the build on a certain count of findings. To achive this, just define your thresholds a followed for the specific check tool:
|
||||
|
@ -20,6 +20,9 @@ Proxy environment variables defined on the Jenkins machine are also available in
|
||||
* `dockerOptions` Docker options to be set when starting the container.
|
||||
* `dockerVolumeBind` Volumes that should be mounted into the container.
|
||||
|
||||
## Step configuration
|
||||
None
|
||||
|
||||
## Exceptions
|
||||
|
||||
None
|
||||
|
@ -14,16 +14,7 @@ none
|
||||
## Pipeline configuration
|
||||
none
|
||||
|
||||
## Explanation of pipeline step
|
||||
Usage of pipeline step:
|
||||
|
||||
```groovy
|
||||
durationMeasure (script: this, measurementName: 'build_duration') {
|
||||
//execute your build
|
||||
}
|
||||
```
|
||||
|
||||
Available parameters:
|
||||
## Parameters
|
||||
|
||||
| parameter | mandatory | default | possible values |
|
||||
| ----------|-----------|---------|-----------------|
|
||||
@ -35,3 +26,13 @@ Details:
|
||||
* `script` defines the global script environment of the Jenkinsfile run. Typically `this` is passed to this parameter. This allows the function to access the [`commonPipelineEnvironment`](commonPipelineEnvironment.md) for storing the measured duration.
|
||||
* `measurementName` defines the name of the measurement which is written to the Influx database.
|
||||
|
||||
## Step configuration
|
||||
none
|
||||
|
||||
## Example
|
||||
|
||||
```groovy
|
||||
durationMeasure (script: this, measurementName: 'build_duration') {
|
||||
//execute your build
|
||||
}
|
||||
```
|
||||
|
@ -38,6 +38,9 @@ none
|
||||
----------------------------------------------------------
|
||||
```
|
||||
|
||||
## Step configuration
|
||||
none
|
||||
|
||||
## Return value
|
||||
none
|
||||
|
||||
|
@ -80,16 +80,7 @@ You need to define the influxDB server in your pipeline as it is defined in the
|
||||
influxDBServer=jenkins
|
||||
```
|
||||
|
||||
## Explanation of pipeline step
|
||||
|
||||
Example usage of pipeline step:
|
||||
|
||||
```groovy
|
||||
influxWriteData script: this
|
||||
```
|
||||
|
||||
Available parameters:
|
||||
|
||||
## Parameters
|
||||
|
||||
| parameter | mandatory | default | possible values |
|
||||
| ----------|-----------|---------|-----------------|
|
||||
@ -98,6 +89,17 @@ Available parameters:
|
||||
| influxServer | no | `jenkins` | |
|
||||
| influxPrefix | no | `null` | |
|
||||
|
||||
## Step configuration
|
||||
The following parameters can also be specified as step parameters using the global configuration file:
|
||||
|
||||
* `influxServer`
|
||||
* `influxPrefix`
|
||||
|
||||
## Example
|
||||
|
||||
```groovy
|
||||
influxWriteData script: this
|
||||
```
|
||||
|
||||
## Work with InfluxDB and Grafana
|
||||
|
||||
|
@ -26,8 +26,9 @@ Executes a maven command inside a Docker container.
|
||||
* `m2Path` Path to the location of the local repository that should be used.
|
||||
* `defines` Additional properties.
|
||||
|
||||
## Global Configuration
|
||||
The following parameters can also be specified using the global configuration file:
|
||||
## Step configuration
|
||||
The following parameters can also be specified as step parameters using the global configuration file:
|
||||
|
||||
* `dockerImage`
|
||||
* `globalSettingsFile`
|
||||
* `projectSettingsFile`
|
||||
|
@ -19,6 +19,12 @@ Executes the SAP MTA Archive Builder to create an mtar archive of the applicatio
|
||||
* `buildTarget` - The target platform to which the mtar can be deployed.
|
||||
* `mtaJarLocation` - The path of the `mta.jar` file. If no parameter is provided, neither at the level of the method call nor via step configuration, the path is retrieved from the Jenkins environment variables using `env.MTA_JAR_LOCATION`. If the Jenkins environment variable is not set it is assumed that `mta.jar` is located in the current working directory.
|
||||
|
||||
## Step configuration
|
||||
The following parameters can also be specified as step parameters using the global configuration file:
|
||||
|
||||
* `buildTarget`
|
||||
* `mtaJarLocation`
|
||||
|
||||
## Return value
|
||||
The file name of the resulting archive is returned with this step. The file name is extracted from the key `ID` defined in `mta.yaml`.
|
||||
|
||||
|
@ -77,6 +77,17 @@ needs to be extracted into the folder provided by `neoHome`. In case this parame
|
||||
|
||||
The step is prepared for being executed in docker. The corresponding parameters can be applied. See step `dockerExecute` for details.
|
||||
|
||||
## Step configuration
|
||||
The following parameters can also be specified as step parameters using the global configuration file:
|
||||
|
||||
* `account`
|
||||
* `dockerEnvVars`
|
||||
* `dockerImage`
|
||||
* `dockerOptions`
|
||||
* `host`
|
||||
* `neoCredentialsId`
|
||||
* `neoHome`
|
||||
|
||||
## Return value
|
||||
none
|
||||
|
||||
|
@ -25,6 +25,10 @@ none
|
||||
* `path` The path to the Jenkinsfile, inside the repository, to be loaded.
|
||||
* `credentialsId` The Jenkins credentials containing user and password needed to access a private git repository.
|
||||
|
||||
## Step configuration
|
||||
|
||||
none
|
||||
|
||||
## Return value
|
||||
|
||||
none
|
||||
|
@ -9,6 +9,10 @@ Afterwards the values can be loaded by the method: `ConfigurationLoader.defaultS
|
||||
|
||||
None
|
||||
|
||||
## Step configuration
|
||||
|
||||
None
|
||||
|
||||
## Exceptions
|
||||
|
||||
None
|
||||
|
@ -20,6 +20,9 @@ Initializes the [`commonPipelineEnvironment`](commonPipelineEnvironment.md), whi
|
||||
* `script` - The reference to the pipeline script (Jenkinsfile). Normally `this` needs to be provided.
|
||||
* `configFile` - Property file defining project specific settings.
|
||||
|
||||
## Step configuration
|
||||
none
|
||||
|
||||
## Return value
|
||||
none
|
||||
|
||||
|
@ -16,6 +16,9 @@ none
|
||||
* `tool` The tool that is checked for existence and compatible version.
|
||||
* `home` The location in the file system where Jenkins can access the tool.
|
||||
|
||||
## Step configuration
|
||||
none
|
||||
|
||||
## Return value
|
||||
none
|
||||
|
||||
@ -33,6 +36,3 @@ none
|
||||
toolValidate tool: 'neo', home:'/path/to/neo-java-web-sdk'
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -13,6 +13,11 @@ Brief description.
|
||||
|
||||
* `<parameter>` - Detailed description of each parameter.
|
||||
|
||||
## Step configuration
|
||||
The following parameters can also be specified as step parameters using the global configuration file:
|
||||
|
||||
* `<parameter>`
|
||||
|
||||
## Return value
|
||||
none
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user