---
# System prepended metadata

title: Jenkins DSL

---

# Jenkins DSL

```groovy
buildpacks {
    
    /* 
    
        PHASE - 1
        
    */
    
    builder = "some/builder" // builder image 
    path = "some/directory" // path to source
    imageName = "an-image-name" // Image name
      
    /* 
    
        PHASE - 2
        
    */
    
    
    env = ["FOO=BAR"] // build-time environment variable(s)
    envFile = "./some-file" // file containing build-time environment variable(s)
    defaultProcess = "procType" // set the default process type
    version = "0.1.0" // build version
    tag = "" // additional tags to push the output image to
    dockerHost = "" // address to docker daemon that will be exposed to the build container
    buildpack = "<buildpack>@<version>"|"<hostname>/<repo>[:<tag>]"|"hostname/buildpack.(tar|tgz)" // buildpack(s)
    buildpackRegistry = "" // buildpack registry by name
    cacheImage = "registry.io/some-pack:tag" // cache build layers in remote registry
    clearCache // clear image's associated cache before building
    publish // publish to registry
    network = "" // connect detect and build containers to network
    
    noColor // disable color output
    quiet // show less output
    timestamps // ??? already showed in Jenkins, i think it is unnecessary
    verbose // show more output
    
    sourceURL = "" // a git repo url which include source code
    userId = "1000" // default 1000
    groupId = "1000" // default 1000
    trustBuilder = true|false // default false
    
    /* 
    
        PHASE - 3
    
    */
    
    descriptor = "some/<project-descriptor-file.toml>" // path to the project descriptor file  
    lifecycleImage = "some-image" // custom lifecycle image to use for analysis, restore, and export when builder is untrusted.
    pullPolicy = "" // pull policy to use
    runImage = "" // run image (defaults to default stack's run image)
    trustBuilder // trust the provided builder
    volume = ["<host path>:<target path>[:<options>]", ...] // mount host volume into the build container
    workspace = "" // location at which to mount the app dir in the build image  
    sourceReference = "" // default ""
    sourceSubpath = "" //
    
    // MORE OPTIONS, see:
    //  - https://buildpacks.io/docs/tools/pack/cli/pack_build/#options
    //  - https://github.com/buildpacks/tekton-integration/tree/main/pipeline/buildpacks/0.1#parameters
}
```