Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

96 lines (93 sloc) 2.51 KB
---
apiVersion: build.knative.dev/v1alpha1
kind: BuildTemplate
metadata:
name: buildpacks-cnb
spec:
parameters:
- name: IMAGE
description: The image you wish to create. For example, "repo/example", or "example.com/repo/image".
- name: RUN_IMAGE
description: The run image buildpacks will use as the base for IMAGE.
default: packs/run:v3alpha2
- name: BUILDER_IMAGE
description: The builder image (must include v3 lifecycle and compatible buildpacks).
default: packs/samples:v3alpha2
- name: USE_CRED_HELPERS
description: Use Docker credential helpers for Google's GCR, Amazon's ECR, or Microsoft's ACR.
default: 'true'
- name: CACHE
description: The name of the persistent app cache volume
default: empty-dir
- name: USER_ID
description: The user ID of the builder image user
default: "1000"
- name: GROUP_ID
description: The group ID of the builder image user
default: "1000"
steps:
- name: prepare
image: alpine
command: ["/bin/sh"]
args:
- "-c"
- >
chown -R "${USER_ID}:${GROUP_ID}" "/builder/home" &&
chown -R "${USER_ID}:${GROUP_ID}" /layers &&
chown -R "${USER_ID}:${GROUP_ID}" /workspace
volumeMounts:
- name: "${CACHE}"
mountPath: /layers
imagePullPolicy: Always
- name: detect
image: ${BUILDER_IMAGE}
command: ["/lifecycle/detector"]
args:
- "-app=/workspace"
- "-group=/layers/group.toml"
- "-plan=/layers/plan.toml"
volumeMounts:
- name: "${CACHE}"
mountPath: /layers
imagePullPolicy: Always
- name: analyze
image: ${BUILDER_IMAGE}
command: ["/lifecycle/analyzer"]
args:
- "-layers=/layers"
- "-helpers=${USE_CRED_HELPERS}"
- "-group=/layers/group.toml"
- "${IMAGE}"
volumeMounts:
- name: "${CACHE}"
mountPath: /layers
imagePullPolicy: Always
- name: build
image: ${BUILDER_IMAGE}
command: ["/lifecycle/builder"]
args:
- "-layers=/layers"
- "-app=/workspace"
- "-group=/layers/group.toml"
- "-plan=/layers/plan.toml"
volumeMounts:
- name: "${CACHE}"
mountPath: /layers
imagePullPolicy: Always
- name: export
image: ${BUILDER_IMAGE}
command: ["/lifecycle/exporter"]
args:
- "-layers=/layers"
- "-helpers=${USE_CRED_HELPERS}"
- "-app=/workspace"
- "-image=${RUN_IMAGE}"
- "-group=/layers/group.toml"
- "${IMAGE}"
volumeMounts:
- name: "${CACHE}"
mountPath: /layers
imagePullPolicy: Always
volumes:
- name: empty-dir
emptyDir: {}
You can’t perform that action at this time.