1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/documentation/docs/steps/cnbBuild.md
Pavel Busko cba94dcb35
Cnb build custom buildpacks (#3090)
* [WIP] cnbBuild custom buildpacks draft

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* Store custom buildpacks in the dedicated tmp folder

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>

* added test

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* updated documentation

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>

* use Files for toml files cleanup

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* Add missing function to the FileUtils interface

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2021-09-14 16:14:50 +02:00

1.2 KiB

${docGenStepName}

${docGenDescription}

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

cnbBuild(
    script: script,
    dockerConfigJsonCredentialsId: 'DOCKER_REGISTRY_CREDS',
    containerImageName: 'images/example',
    containerImageTag: 'v0.0.1',
    containerImageRegistryUrl: 'gcr.io'
)

Example 2: User provided builder

cnbBuild(
    script: script,
    dockerConfigJsonCredentialsId: 'DOCKER_REGISTRY_CREDS',
    dockerImage: 'paketobuildpacks/builder:base',
    containerImageName: 'images/example',
    containerImageTag: 'v0.0.1',
    containerImageRegistryUrl: 'gcr.io'
)

Example 3: User provided buildpacks

cnbBuild(
    script: script,
    dockerConfigJsonCredentialsId: 'DOCKER_REGISTRY_CREDS',
    containerImageName: 'images/example',
    containerImageTag: 'v0.0.1',
    containerImageRegistryUrl: 'gcr.io',
    buildpacks: ['gcr.io/paketo-buildpacks/nodejs', 'paketo-community/build-plan']
)