1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-07-15 01:34:38 +02:00

Modification to documentation of cnbBuild. (#3222)

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Jan von Löwenstein <jan.von.loewenstein@sap.com>
This commit is contained in:
Ralf Pannemans
2021-10-28 13:52:21 +02:00
committed by GitHub
parent adcc0447ba
commit 9a60143153
4 changed files with 59 additions and 34 deletions

View File

@ -2,18 +2,36 @@
## ${docGenDescription}
see [Examples](#examples)
## Prerequisites
When pushing to a container registry, you need to maintain the respective credentials in your Jenkins credentials store:
`cnbBuild` expects a Docker `config.json` file containing the credential information for registries.
You can create it like explained in the [protocodeExecuteScan Prerequisites section](https://www.project-piper.io/steps/protecodeExecuteScan/#prerequisites).
Please copy this file and upload it to your Jenkins for example<br />
via _Jenkins_ -> _Credentials_ -> _System_ -> _Global credentials (unrestricted)_ -> _Add Credentials_ ->
* Kind: _Secret file_
* File: upload your `config.json` file
* ID: specify id which you then use for the configuration of `dockerConfigJsonCredentialsId` (see below)
## ${docGenParameters}
### Additional hints
To run the `cnbBuild` with a different builder, you can specify the `dockerImage` parameter.
Without specifying it, the step will run with the `paketobuildpacks/builder:full` builder.
## ${docGenParameters}
## ${docGenConfiguration}
## ${docJenkinsPluginDependencies}
## Example 1
## Examples
### Example 1: simple usage
```groovy
cnbBuild(
@ -25,7 +43,7 @@ cnbBuild(
)
```
## Example 2: User provided builder
### Example 2: User provided builder
```groovy
cnbBuild(
@ -38,7 +56,7 @@ cnbBuild(
)
```
## Example 3: User provided buildpacks
### Example 3: User provided buildpacks
```groovy
cnbBuild(