2021-08-18 12:10:55 +02:00
metadata :
name : cnbBuild
description : Executes a Cloud Native Buildpacks build for creating a Docker container.
longDescription : Executes a Cloud Native Buildpacks build for creating a Docker container.
spec :
inputs :
secrets :
- name : dockerConfigJsonCredentialsId
2021-10-01 14:24:59 +02:00
description : |
Jenkins 'Secret file' credentials ID containing Docker config.json (with registry credential(s)) in the following format :
```json
{
"auths": {
"$server": {
"auth": "base64($username + ':' + $password)"
}
}
}
```
Example :
```json
{
"auths": {
"example.com": {
"auth": "dXNlcm5hbWU6cGFzc3dvcmQ="
}
}
}
```
2021-08-18 12:10:55 +02:00
type : jenkins
params :
- name : containerImageName
aliases :
- name : dockerImageName
type : string
2021-08-26 14:26:54 +02:00
mandatory : true
description : Name of the container which will be built
2021-08-18 12:10:55 +02:00
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
- name : containerImageTag
aliases :
- name : artifactVersion
type : string
2021-08-26 14:26:54 +02:00
mandatory : true
description : Tag of the container which will be built
2021-08-18 12:10:55 +02:00
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
resourceRef :
- name : commonPipelineEnvironment
param : artifactVersion
- name : containerRegistryUrl
aliases :
- name : dockerRegistryUrl
type : string
2021-08-26 14:26:54 +02:00
mandatory : true
description : Container registry where the image should be pushed to
2021-08-18 12:10:55 +02:00
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
resourceRef :
- name : commonPipelineEnvironment
param : container/registryUrl
2021-09-14 16:14:50 +02:00
- name : buildpacks
type : "[]string"
2021-10-28 13:52:21 +02:00
description : List of custom buildpacks to use in the form of '$HOSTNAME/$REPO[:$TAG]'.
2021-09-14 16:14:50 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-09-29 18:21:13 +02:00
- name : buildEnvVars
type : "[]string"
description : List of custom environment variables used during a build in the form of 'KEY=VALUE'.
scope :
- PARAMETERS
- STAGES
- STEPS
2021-08-18 12:10:55 +02:00
- name : path
type : string
2021-10-28 13:52:21 +02:00
description : |
The path should either point to a directory with your sources or an artifact in zip format.
This property determines the input to the buildpack.
2021-08-18 12:10:55 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-10-11 11:10:21 +02:00
- name : projectDescriptor
type : string
2021-10-28 13:52:21 +02:00
description : |
Path to the project.toml file.
See [buildpacks.io](https://buildpacks.io/docs/reference/config/project-descriptor/) for the reference.
Parameters passed to the cnbBuild step will take precedence over the parameters set in the project.toml file.
Note : Inline buildpacks (see [specification](https://buildpacks.io/docs/reference/config/project-descriptor/#build-_table-optional_)) are not supported yet.
2021-10-11 11:10:21 +02:00
default : project.toml
scope :
- PARAMETERS
- STAGES
- STEPS
2021-08-18 12:10:55 +02:00
- name : dockerConfigJSON
type : string
description : Path to the file `.docker/config.json` - this is typically provided by your CI/CD system. You can find more details about the Docker credentials in the [Docker documentation](https://docs.docker.com/engine/reference/commandline/login/).
scope :
- PARAMETERS
secret : true
resourceRef :
- name : commonPipelineEnvironment
param : custom/dockerConfigJSON
- name : dockerConfigJsonCredentialsId
type : secret
- type : vaultSecretFile
2021-10-13 16:28:51 +02:00
name : dockerConfigFileVaultSecretName
default : docker-config
2021-10-01 13:48:24 +02:00
- name : customTlsCertificateLinks
type : "[]string"
description : List containing download links of custom TLS certificates. This is required to ensure trusted connections to registries with custom certificates.
scope :
- PARAMETERS
- STAGES
- STEPS
2021-10-08 11:20:05 +02:00
- name : additionalTags
type : "[]string"
2021-10-28 13:52:21 +02:00
description : List of tags which will be pushed to the registry (additionally to the provided `containerImageTag`), e.g. "latest".
2021-10-08 11:20:05 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-11-03 13:37:26 +02:00
- name : bindings
type : "map[string]interface{}"
description : |
Map of bindings that should be offered to the buildpack. The type of bindings depend on the buildpack. For documentation about bindings in general see [the paketo documentation](https://paketo.io/docs/howto/configuration/#bindings).
Example : Custom maven settings.xml for the Java Buildpack
```yaml
bindings :
maven-settings :
type : maven
key : settings.xml
file : path/to/settings.xml
```
or inline
```yaml
bindings :
maven-settings :
type : maven
key : settings.xml
content : "inline settings.xml"
```
scope :
- PARAMETERS
- STAGES
- STEPS
2021-08-18 12:10:55 +02:00
outputs :
resources :
- name : commonPipelineEnvironment
type : piperEnvironment
params :
- name : container/registryUrl
- name : container/imageNameTag
containers :
- image : "paketobuildpacks/builder:full"