diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 349d799..b504349 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -1,3 +1,41 @@ +## Samples + +Samples require some bootstraping hence there are two scripts to assist in executing the samples. + +##### Prerequisites + +- `kubectl` + - ... with configured context +- [Tekton Pipelines][tekton-install] +- Docker Registry + - ... learn how to use a [local registry](./DEVELOPMENT.md#docker-registry) + - ... other registries may require additional [auth configuration][tekton-docker-auth] + +[tekton-install]: https://github.com/tektoncd/pipeline/blob/master/docs/install.md#installing-tekton-pipelines-on-kubernetes +[tekton-docker-auth]: https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#configuring-authentication-for-docker + +##### Run + +``` +./scripts/sample-run.sh +``` + +Additional options (using `tkn`): + +- To rerun a pipeline with the same parameters: + ``` + tkn pipeline start buildpacks --last --showlog + ``` +- To rerun a pipeline while overriding last paramters (ie. `TRUST_BUILDER`): + ``` + tkn pipeline start buildpacks --last --showlog -p TRUST_BUILDER=false + ``` + +##### Cleanup + +``` +./scripts/sample-cleanup.sh +``` ## Linting diff --git a/README.md b/README.md index 36cec10..94a2c67 100644 --- a/README.md +++ b/README.md @@ -1,78 +1,26 @@ # Tekton Integration -The purpose of this repository is to provide the means for testing and developing the integration between [Tekton][tekton] and Cloud Native Buildpack's [Lifecycle][lifecycle]. +> The purpose of this repository is to provide tooling to help test and release the integration between [Tekton][tekton] and Cloud Native Buildpack's [Lifecycle][lifecycle]. +> +> **The actual pipeline and tasks are maintained on the official [tektoncd/catalog][catalog]**. :smile_cat: -## Pipeline - -| Pipeline | Source | Description -|--- |--- |--- -| buildpacks | [next (dev)](pipeline/buildpacks) · catalog (TBD) | Builds an application image from source stored in `git`. - - -## Tasks - -| Task | Source | Description -|--- |--- |--- -| buildpacks | [next (dev)](task/buildpacks) · [catalog][task-buildpacks] | Improved performance by executing entire build in the least amount of containers. -| buildpacks-phases | [next (dev)](task/buildpacks-phases) · [catalog][task-buildpacks-phases] | Improved security by isolating build phases to individual containers. +[catalog]: https://github.com/tektoncd/catalog [lifecycle]: https://buildpacks.io/docs/concepts/components/lifecycle/ -[task-buildpacks]: https://github.com/tektoncd/catalog/tree/master/task/buildpacks -[task-buildpacks-phases]: https://github.com/tektoncd/catalog/tree/master/task/buildpacks-phases [tekton]: https://tekton.dev/ - -## Samples - -There are a few samples through out this repo. Most require some bootstraping hence there are two scripts to assist in executing the samples. - -##### Prerequisites - -- `kubectl` - - ... with configured context -- [Tekton Pipelines][tekton-install] -- Docker Registry - - ... learn how to use a [local registry](./DEVELOPMENT.md#docker-registry) - - ... other registries may require additional [auth configuration][tekton-docker-auth] - -[tekton-install]: https://github.com/tektoncd/pipeline/blob/master/docs/install.md#installing-tekton-pipelines-on-kubernetes -[tekton-docker-auth]: https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#configuring-authentication-for-docker - -##### Run - -``` -./scripts/sample-run.sh -``` - -Additional options (using `tkn`): - -- To rerun a pipeline with the same parameters: - ``` - tkn pipeline start buildpacks --last --showlog - ``` -- To rerun a pipeline while overriding last paramters (ie. `TRUST_BUILDER`): - ``` - tkn pipeline start buildpacks --last --showlog -p TRUST_BUILDER=false - ``` - -##### Cleanup - -``` -./scripts/sample-cleanup.sh -``` - ## Support The [Buildpacks Community](http://buildpacks.io/community/) is always here to help. -We can be found in our [discussion board][discussion-board] or [slack][slack] (`#tekton`). +We can be found in our [discussion board][discussion-board] or [slack][slack] (`#buildpacks-tekton`). [discussion-board]: https://github.com/buildpacks/community/discussions -[slack]: https://slack.buildpacks.io +[slack]: https://slack.cncf.io/ ## Contributing -We ❤ contributions. +We :heart: contributions. - [CONTRIBUTING](https://github.com/buildpacks/.github/blob/main/CONTRIBUTING.md) - Learn what's necessary to start contributing. - [DEVELOPMENT](DEVELOPMENT.md) - Get details to help you during development within this specific repo. diff --git a/pipeline/buildpacks/0.1/README.md b/pipeline/buildpacks/0.1/README.md deleted file mode 100644 index 9f22d10..0000000 --- a/pipeline/buildpacks/0.1/README.md +++ /dev/null @@ -1,100 +0,0 @@ - -# Buildpacks - -This pipeline builds source into a container image using [Cloud Native Buildpacks](https://buildpacks.io). To do that, it uses [builders](https://buildpacks.io/docs/concepts/components/builder/#what-is-a-builder) to run buildpacks against your application source. - -> _**What are Cloud Native Buildpacks?**_ -> -> _Cloud Native Buildpacks are pluggable, modular tools that transform application source code into OCI images. They replace Dockerfiles in the app development lifecycle, and enable for swift rebasing of images and modular control over images (through the use of builders), among other benefits._ - -## Dependencies - -- [`git-clone` task](https://github.com/tektoncd/catalog/tree/master/task/git-clone) 0.3 or newer -- [`buildpacks` task](https://github.com/buildpacks/tekton-integration/tree/main/task/buildpacks/) 0.3 or newer -- [`buildpacks-phases` task](https://github.com/buildpacks/tekton-integration/tree/main/task/buildpacks-phases/) 0.2 or newer - -## Compatibility - -- **Tekton** v0.17.0 and above -- **[Platform API][platform-api]** 0.4 - -[platform-api]: https://buildpacks.io/docs/reference/spec/platform-api/ - -## Install - -#### Install dependencies (if missing) - -```shell -kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/git-clone/0.3/git-clone.yaml -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/task/buildpacks/0.3/buildpacks.yaml -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/task/buildpacks-phases/0.2/buildpacks-phases.yaml -``` - -#### Install pipeline - -```shell -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/pipeline/buildpacks/0.1/buildpacks.yaml -``` - -## Workspaces - - - **`source-ws`**: Location where source is stored. _(REQUIRED)_ - - **`cache-ws`**: Location where cache is stored if CACHE_IMAGE is not provided. _(optional)_ - -## Parameters - - - **`BUILDER_IMAGE`**: The image on which builds will run (must include lifecycle and compatible buildpacks). _(REQUIRED)_ - - **`TRUST_BUILDER`**: Whether the builder image is trusted. When false, each build phase is executed in isolation and credentials are only shared with trusted images. _(optional, default: "false")_ - - **`APP_IMAGE`**: The name of where to store the app image. _(REQUIRED)_ - - **`SOURCE_URL`**: A git repo url where the source code resides. _(REQUIRED)_ - - **`SOURCE_REFERENCE`**: The branch, tag or SHA to checkout. _(optional, default: "")_ - - **`SOURCE_SUBPATH`**: A subpath within checked out source where the source to build is located. _(optional, default: "")_ - - **`ENV_VARS`**: Environment variables to set during _build-time_. _(optional, default: [])_ - - **`PROCESS_TYPE`**: The default process type to set on the image. _(optional, default: "web")_ - - **`RUN_IMAGE`**: The name of the run image to use (defaults to image specified in builder). _(optional, default: "")_ - - **`CACHE_IMAGE`**: The name of the persistent cache image. _(optional, default: "")_ - - **`USER_ID`**: The user ID of the builder image user. _(optional, default: "1000")_ - - **`GROUP_ID`**: The group ID of the builder image user. _(optional, default: "1000")_ - -## Builders - -_The following are the suggested [builders][builders] from the [Cloud Native Buildpacks][buildpacks-io] project. This is only a subset of builders available._ - - - **`gcr.io/buildpacks/builder:v1`**: Ubuntu 18 base image with buildpacks for .NET, Go, Java, Node.js, and Python - - **`heroku/buildpacks:18`**: Base builder for Heroku-18 stack, based on ubuntu:18.04 base image - - **`heroku/buildpacks:20`**: Base builder for Heroku-20 stack, based on ubuntu:20.04 base image - - **`paketobuildpacks/builder:base`**: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Ruby, NGINX and Procfile - - **`paketobuildpacks/builder:full`**: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, PHP, Ruby, Apache HTTPD, NGINX and Procfile - - **`paketobuildpacks/builder:tiny`**: Tiny base image (bionic build image, distroless-like run image) with buildpacks for Java Native Image and Go - -[builders]: (https://buildpacks.io/docs/concepts/components/builder/) -[buildpacks-io]: (https://buildpacks.io) - -## Usage - -See the following samples for usage: - - - **[`cache-image.yaml`](samples/cache-image.yaml)**: A PipelineRun configured to cache build artifacts in an image. - - **[`cache-volume.yaml`](samples/cache-volume.yaml)**: A PipelineRun configured to cache build artifacts in a volume. - - **[`env-vars.yaml`](samples/env-vars.yaml)**: A PipelineRun configured to provide _build-time_ environment variables. - - **[`run-image.yaml`](samples/run-image.yaml)**: A PipelineRun configured to specify an explicit run image. - -## Support - -The [Buildpacks Community](http://buildpacks.io/community/) is always here to help. - -We can be found in our [discussion board][discussion-board] or [slack][slack] (`#tekton`). - -[discussion-board]: https://github.com/buildpacks/community/discussions -[slack]: https://slack.buildpacks.io - -## Contributing - -We ❤ contributions. - -This pipeline is maintained at [buildpacks/tekton-integration](https://github.com/buildpacks/tekton-integration). Issues, pull requests and other contributions can be made there. - -To learn more, read the [CONTRIBUTING][contributing] and [DEVELOPMENT][development] documents. - -[contributing]: https://github.com/buildpacks/.github/blob/main/CONTRIBUTING.md -[development]: https://github.com/buildpacks/tekton-integration/blob/main/DEVELOPMENT.md diff --git a/pipeline/buildpacks/0.1/README.tpl.md b/pipeline/buildpacks/0.1/README.tpl.md deleted file mode 100644 index d06542e..0000000 --- a/pipeline/buildpacks/0.1/README.tpl.md +++ /dev/null @@ -1,56 +0,0 @@ -# ${DISPLAY_NAME} - -${SUMMARY} - -## Dependencies - -- [`git-clone` task](https://github.com/tektoncd/catalog/tree/master/task/git-clone) 0.3 or newer -- [`buildpacks` task](https://github.com/buildpacks/tekton-integration/tree/main/task/buildpacks/) 0.3 or newer -- [`buildpacks-phases` task](https://github.com/buildpacks/tekton-integration/tree/main/task/buildpacks-phases/) 0.2 or newer - -## Compatibility - -- **Tekton** v${TEKTON_MIN_VERSION} and above -- **[Platform API][platform-api]** ${PLATFORM_API_VERSION} - -[platform-api]: https://buildpacks.io/docs/reference/spec/platform-api/ - -## Install - -#### Install dependencies (if missing) - -```shell -kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/git-clone/0.3/git-clone.yaml -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/task/buildpacks/0.3/buildpacks.yaml -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/task/buildpacks-phases/0.2/buildpacks-phases.yaml -``` - -#### Install pipeline - -```shell -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/${TYPE}/${NAME}/${VERSION}/${NAME}.yaml -``` - -## Workspaces - -${WORKSPACES} - -## Parameters - -${PARAMETERS} - -## Builders - -${BUILDERS} - -## Usage - -${SAMPLES} - -## Support - -${SUPPORT} - -## Contributing - -${CONTRIBUTING} diff --git a/pipeline/buildpacks/0.1/buildpacks.yaml b/pipeline/buildpacks/0.1/buildpacks.yaml deleted file mode 100644 index faba25a..0000000 --- a/pipeline/buildpacks/0.1/buildpacks.yaml +++ /dev/null @@ -1,140 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: buildpacks - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/categories: Image Build - tekton.dev/pipelines.minVersion: "0.17.0" - tekton.dev/tags: image-build - tekton.dev/displayName: "Buildpacks" - tekton.dev/platforms: "linux/amd64" -spec: - description: >- - The Buildpacks pipeline builds source from a Git repository into a container image and pushes it to a registry, using Cloud Native Buildpacks. - - workspaces: - - name: source-ws - description: Location where source is stored. - - name: cache-ws - description: Location where cache is stored if CACHE_IMAGE is not provided. - optional: true - - params: - - name: BUILDER_IMAGE - description: The image on which builds will run (must include lifecycle and compatible buildpacks). - - name: TRUST_BUILDER - description: >- - Whether the builder image is trusted. - When false, each build phase is executed in isolation and credentials are only shared with trusted images. - default: "false" - - name: APP_IMAGE - description: The name of where to store the app image. - - name: SOURCE_URL - description: A git repo url where the source code resides. - - name: SOURCE_REFERENCE - description: The branch, tag or SHA to checkout. - default: "" - - name: SOURCE_SUBPATH - description: A subpath within checked out source where the source to build is located. - default: "" - - name: ENV_VARS - type: array - description: Environment variables to set during _build-time_. - default: [] - - name: PROCESS_TYPE - description: The default process type to set on the image. - default: "web" - - name: RUN_IMAGE - description: The name of the run image to use (defaults to image specified in builder). - default: "" - - name: CACHE_IMAGE - description: The name of the persistent cache image. - default: "" - - 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" - - tasks: - - name: fetch-from-git - taskRef: - name: git-clone - params: - - name: url - value: $(params.SOURCE_URL) - - name: revision - value: $(params.SOURCE_REFERENCE) - workspaces: - - name: output - workspace: source-ws - - name: build-trusted - runAfter: - - fetch-from-git - taskRef: - name: buildpacks - when: - - input: "$(params.TRUST_BUILDER)" - operator: in - values: ["true", "yes", "TRUE", "True"] - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: BUILDER_IMAGE - value: "$(params.BUILDER_IMAGE)" - - name: APP_IMAGE - value: "$(params.APP_IMAGE)" - - name: SOURCE_SUBPATH - value: "$(params.SOURCE_SUBPATH)" - - name: PROCESS_TYPE - value: "$(params.PROCESS_TYPE)" - - name: ENV_VARS - value: ["$(params.ENV_VARS)"] - - name: RUN_IMAGE - value: "$(params.RUN_IMAGE)" - - name: CACHE_IMAGE - value: "$(params.CACHE_IMAGE)" - - name: USER_ID - value: "$(params.USER_ID)" - - name: GROUP_ID - value: "$(params.GROUP_ID)" - - name: build-untrusted - runAfter: - - fetch-from-git - taskRef: - name: buildpacks-phases - when: - - input: "$(params.TRUST_BUILDER)" - operator: notin - values: ["true", "yes", "TRUE", "True"] - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: BUILDER_IMAGE - value: "$(params.BUILDER_IMAGE)" - - name: APP_IMAGE - value: "$(params.APP_IMAGE)" - - name: SOURCE_SUBPATH - value: "$(params.SOURCE_SUBPATH)" - - name: ENV_VARS - value: ["$(params.ENV_VARS)"] - - name: PROCESS_TYPE - value: "$(params.PROCESS_TYPE)" - - name: RUN_IMAGE - value: "$(params.RUN_IMAGE)" - - name: CACHE_IMAGE - value: "$(params.CACHE_IMAGE)" - - name: USER_ID - value: "$(params.USER_ID)" - - name: GROUP_ID - value: "$(params.GROUP_ID)" diff --git a/pipeline/buildpacks/0.1/samples/cache-image.yaml b/pipeline/buildpacks/0.1/samples/cache-image.yaml deleted file mode 100644 index d02ba02..0000000 --- a/pipeline/buildpacks/0.1/samples/cache-image.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: cache-image-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: cache-image-pipelinerun - labels: - app.kubernetes.io/description: A PipelineRun configured to cache build artifacts in an image. -spec: - pipelineRef: - name: buildpacks - params: - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:bionic@sha256:6c03dd604503b59820fd15adbc65c0a077a47e31d404a3dcad190f3179e920b5 - - name: TRUST_BUILDER - value: "true" - - name: APP_IMAGE - value: - - name: SOURCE_URL - value: https://github.com/buildpacks/samples - - name: SOURCE_SUBPATH - value: apps/ruby-bundler - - name: CACHE_IMAGE - value: -cache - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: cache-image-ws-pvc - # NOTE: Pipeline hangs if optional cache workspace is missing so we provide an empty directory - - name: cache-ws - emptyDir: {} diff --git a/pipeline/buildpacks/0.1/samples/cache-volume.yaml b/pipeline/buildpacks/0.1/samples/cache-volume.yaml deleted file mode 100644 index d071e8a..0000000 --- a/pipeline/buildpacks/0.1/samples/cache-volume.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: cache-volume-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: cache-volume-pipelinerun - labels: - app.kubernetes.io/description: A PipelineRun configured to cache build artifacts in a volume. -spec: - pipelineRef: - name: buildpacks - params: - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:bionic@sha256:6c03dd604503b59820fd15adbc65c0a077a47e31d404a3dcad190f3179e920b5 - - name: TRUST_BUILDER - value: "false" - - name: APP_IMAGE - value: - - name: SOURCE_URL - value: https://github.com/buildpacks/samples - - name: SOURCE_SUBPATH - value: apps/ruby-bundler - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: cache-volume-ws-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: cache-volume-ws-pvc diff --git a/pipeline/buildpacks/0.1/samples/env-vars.yaml b/pipeline/buildpacks/0.1/samples/env-vars.yaml deleted file mode 100644 index 47f5441..0000000 --- a/pipeline/buildpacks/0.1/samples/env-vars.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: env-var-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: env-var-pipelinerun - labels: - app.kubernetes.io/description: A PipelineRun configured to provide _build-time_ environment variables. -spec: - pipelineRef: - name: buildpacks - params: - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:bionic@sha256:6c03dd604503b59820fd15adbc65c0a077a47e31d404a3dcad190f3179e920b5 - - name: TRUST_BUILDER - value: "true" - - name: APP_IMAGE - value: - - name: SOURCE_URL - value: https://github.com/buildpacks/samples - - name: SOURCE_SUBPATH - value: apps - - name: PROCESS_TYPE - value: "" - - name: ENV_VARS - value: - - "ENV_VAR_1=VALUE_1" - - "ENV_VAR_2=VALUE 2" - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: env-var-ws-pvc - # NOTE: Pipeline hangs if optional cache workspace is missing so we provide an empty directory - - name: cache-ws - emptyDir: {} diff --git a/pipeline/buildpacks/0.1/samples/run-image.yaml b/pipeline/buildpacks/0.1/samples/run-image.yaml deleted file mode 100644 index d6c9569..0000000 --- a/pipeline/buildpacks/0.1/samples/run-image.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: run-image-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: run-image-pipelinerun - labels: - app.kubernetes.io/description: A PipelineRun configured to specify an explicit run image. -spec: - pipelineRef: - name: buildpacks - params: - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:bionic@sha256:6c03dd604503b59820fd15adbc65c0a077a47e31d404a3dcad190f3179e920b5 - - name: TRUST_BUILDER - value: "true" - - name: APP_IMAGE - value: - - name: SOURCE_URL - value: https://github.com/buildpacks/samples - - name: SOURCE_SUBPATH - value: apps/ruby-bundler - - name: RUN_IMAGE - value: docker.io/cnbs/sample-stack-run:bionic@sha256:766617895a96c9cdc58fa604468328f6918a13f5c225fbe267b37df9dce40fda - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: run-image-ws-pvc - # NOTE: Pipeline hangs if optional cache workspace is missing so we provide an empty directory - - name: cache-ws - emptyDir: {} diff --git a/pipeline/buildpacks/0.1/tests/pre-apply-task-hook.sh b/pipeline/buildpacks/0.1/tests/pre-apply-task-hook.sh deleted file mode 100755 index 45d567d..0000000 --- a/pipeline/buildpacks/0.1/tests/pre-apply-task-hook.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -# Add an internal registry as sidecar to the task so we can upload it directly -# from our tests without having to go to an external registry. -add_sidecar_registry ${TMPF} - -# Add dependency tasks -add_task git-clone latest -add_task buildpacks latest -add_task buildpacks-phases latest diff --git a/pipeline/buildpacks/0.1/tests/run.yaml b/pipeline/buildpacks/0.1/tests/run.yaml deleted file mode 100644 index eb03e59..0000000 --- a/pipeline/buildpacks/0.1/tests/run.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: buildpacks-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: buildpacks-pipelinerun - labels: - app.kubernetes.io/description: A PipelineRun configured to cache build artifacts in a volume. -spec: - pipelineRef: - name: buildpacks - params: - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:bionic@sha256:6c03dd604503b59820fd15adbc65c0a077a47e31d404a3dcad190f3179e920b5 - - name: TRUST_BUILDER - value: "false" - - name: APP_IMAGE - value: localhost:5000/buildpacks-app - - name: SOURCE_URL - value: https://github.com/buildpacks/samples - - name: SOURCE_SUBPATH - value: apps/ruby-bundler - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: buildpacks-ws-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: buildpacks-ws-pvc diff --git a/scripts/_common.sh b/scripts/_common.sh index f6b773c..2d786f7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -21,7 +21,7 @@ function get_tasks() { tasks=() for t in $(find ${1} -mindepth 2 -maxdepth 2 -type d); do parts=(${t//\// }) - tasks+=("${parts[-2]}:${parts[-1]}") + tasks+=("${parts[${#parts[@]}-2]}:${parts[${#parts[@]}-1]}") done echo "${tasks[@]}" fi @@ -35,7 +35,7 @@ function get_pipelines() { pipelines=() for t in $(find ${1} -mindepth 2 -maxdepth 2 -type d); do parts=(${t//\// }) - pipelines+=("${parts[-2]}:${parts[-1]}") + pipelines+=("${parts[${#parts[@]}-2]}:${parts[${#parts[@]}-1]}") done echo "${pipelines[@]}" fi diff --git a/scripts/diff.sh b/scripts/diff.sh index 0566205..085205e 100755 --- a/scripts/diff.sh +++ b/scripts/diff.sh @@ -8,8 +8,8 @@ DIR="$(dirname "${BASH_SOURCE[0]}")" source "${DIR}/_common.sh" # CONFIGURATION - -DIFFCMD=$(env_or_default DIFFCMD "git diff --no-index") + +DIFFCMD=$(env_or_default DIFFCMD "git diff --no-index --diff-filter=RM") # DEPENDENCIES @@ -31,7 +31,9 @@ function diff_resources() { new_resource_dir="${resources_dir}/${parts[0]}/${parts[1]}" echo "> Diffing $type '${parts[0]}/${parts[1]}'..." + echo "---> new: ${new_resource_dir}" old_resource_dir=$(find "${tmp_dir}/${type}/${parts[0]}" -maxdepth 1 -type d | sort | tail -1) + echo "---> old: ${old_resource_dir}" $DIFFCMD "${old_resource_dir}" "${new_resource_dir}" || true echo echo diff --git a/scripts/generate-docs.sh b/scripts/generate-docs.sh index 12064e7..41883b0 100755 --- a/scripts/generate-docs.sh +++ b/scripts/generate-docs.sh @@ -14,13 +14,12 @@ if [[ "$#" -ne 1 ]]; then exit 1 fi -RESOURCE_DIR=$(realpath "${DIR}/../$1") +RESOURCE_DIR=$(realpath "$1") # DEPENDENCIES require_command jq require_command yj -require_command yq require_command envsubst require_command pack require_command crane @@ -36,33 +35,12 @@ if [ ! -f "$DEFINITION" ]; then echo "${TYPE} definition '$DEFINITION' not found!" fi -BASE_TEMPLATE_FILE="${TYPE}/${NAME}/${VERSION}/README.tpl.md" -TEMPLATE_FILE="${DIR}/../${BASE_TEMPLATE_FILE}" +BASE_TEMPLATE_FILE="README.${TYPE}.tpl.md" +TEMPLATE_FILE="${DIR}/../templates/${BASE_TEMPLATE_FILE}" if [ ! -f "$TEMPLATE_FILE" ]; then echo "README template '$TEMPLATE_FILE' not found!" fi -echo "> Gathering suggested builders..." -BUILDERS="" -for builder in $(pack builder suggest --no-color --quiet | cut -d "'" -f2); do - description=$(crane config $builder | jq -r '.config.Labels["io.buildpacks.builder.metadata"] | fromjson | .description') - if [[ "$description" == "" ]]; then - BUILDERS+=" - **\`$builder\`**\n" - else - BUILDERS+=" - **\`$builder\`**: $description\n" - fi -done -BUILDERS=$(echo -e "$BUILDERS") -export BUILDERS=$(cat < Extracting workspaces..." export WORKSPACES=$(cat "$DEFINITION" | yj | jq -r '.spec.workspaces[] | . + {"note": (if .optional then "_(optional)_" else "_(REQUIRED)_" end) } | " - **`\(.name)`**: \(.description) \(.note)"') @@ -76,7 +54,7 @@ echo "> Collection samples for usage..." SAMPLES_DIR="${RESOURCE_DIR}/samples" SAMPLES="" for sample in $(ls -1 "$SAMPLES_DIR"); do - description=$(yq e 'select(.kind == "PipelineRun") | .metadata.labels["app.kubernetes.io/description"]' "${SAMPLES_DIR}/${sample}") + description=$(cat "${SAMPLES_DIR}/${sample}" | grep '^#' | sed 's/#[ \t]*//') url="samples/${sample}" if [[ "$description" == "" ]]; then SAMPLES+=" - **[\`$sample\`]($url)**\n" @@ -92,7 +70,6 @@ $SAMPLES EOF ) - echo "> Extracting metadata..." export TEKTON_MIN_VERSION=$(cat "$DEFINITION" | yj | jq -r '.metadata.annotations["tekton.dev/pipelines.minVersion"]') export DISPLAY_NAME=$(cat "$DEFINITION" | yj | jq -r '.metadata.annotations["tekton.dev/displayName"]') @@ -107,13 +84,28 @@ This $TYPE builds source into a container image using [Cloud Native Buildpacks]( EOF ) +if [ -z "${PLATFORM_API_VERSION}" ]; then + PLATFORM_API_VERSION="_(determined by buildpack tasks used)_" +fi + +export COMPATIBILITY=$(cat < Be sure to also supply a compatible builder image (\`BUILDER_IMAGE\` input) when running the task (i.e. one that has a lifecycle that supports the Platform APIs). +- **OS/Arch:** linux/amd64 + > Other platforms may be supported if compatible images are used. + +[platform-api]: https://buildpacks.io/docs/reference/spec/platform-api/ +EOF +) + export SUPPORT=$(cat <<'EOF' The [Buildpacks Community](http://buildpacks.io/community/) is always here to help. -We can be found in our [discussion board][discussion-board] or [slack][slack] (`#tekton`). +We can be found in our [discussion board][discussion-board] or [slack][slack] (`#buildpacks-tekton`). [discussion-board]: https://github.com/buildpacks/community/discussions -[slack]: https://slack.buildpacks.io +[slack]: https://slack.cncf.io EOF ) @@ -129,9 +121,29 @@ To learn more, read the [CONTRIBUTING][contributing] and [DEVELOPMENT][developme EOF ) -DOCS_FILE="${DIR}/../${TYPE}/${NAME}/${VERSION}/README.md" +echo "> Gathering suggested builders..." +BUILDERS="" +for builder in $(pack builder suggest --no-color --quiet | cut -d "'" -f2); do + description=$(crane config $builder | jq -r '.config.Labels["io.buildpacks.builder.metadata"] | fromjson | .description') + if [[ "$description" == "" ]]; then + BUILDERS+=" - **\`$builder\`**\n" + else + BUILDERS+=" - **\`$builder\`**: $description\n" + fi +done +BUILDERS=$(echo -e "$BUILDERS") +export BUILDERS=$(cat < Writing docs to: ${DOCS_FILE}" -echo "" > $DOCS_FILE -envsubst < "$TEMPLATE_FILE" >> "$DOCS_FILE" +envsubst < "$TEMPLATE_FILE" > "$DOCS_FILE" cat "$DOCS_FILE" \ No newline at end of file diff --git a/task/buildpacks-phases/0.2/README.md b/task/buildpacks-phases/0.2/README.md deleted file mode 100644 index 515c074..0000000 --- a/task/buildpacks-phases/0.2/README.md +++ /dev/null @@ -1,103 +0,0 @@ - -# Buildpacks (phases) - -This task builds source into a container image using [Cloud Native Buildpacks](https://buildpacks.io). To do that, it uses [builders](https://buildpacks.io/docs/concepts/components/builder/#what-is-a-builder) to run buildpacks against your application source. - -> _**What are Cloud Native Buildpacks?**_ -> -> _Cloud Native Buildpacks are pluggable, modular tools that transform application source code into OCI images. They replace Dockerfiles in the app development lifecycle, and enable for swift rebasing of images and modular control over images (through the use of builders), among other benefits._ - -The lifecycle phases are run in separate containers to enable better security for untrusted builders. Specifically, registry credentials are hidden from the detect and build phases of the lifecycle, and the analyze, restore, and export phases (which require credentials) are run in the lifecycle image published by the [Cloud Native Buildpacks project]( https://hub.docker.com/u/buildpacksio). - -See also [`buildpacks`](../../buildpacks) for the combined version of this task, which uses the [creator binary](https://github.com/buildpacks/spec/blob/platform/0.4/platform.md#operations), to run all of the [lifecycle phases](https://buildpacks.io/docs/concepts/components/lifecycle/#phases). This task, in contrast, runs all of the phases separately. - -## Compatibility - -- **Tekton** v0.17.0 and above -- **[Platform API][platform-api]** 0.4 - - For other versions, see [previous versions](#previous-versions). - -## Install - -``` -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/task/buildpacks-phases/0.2/buildpacks-phases.yaml -``` - -## Workspaces - - - **`source`**: Directory where application source is located. _(REQUIRED)_ - - **`cache`**: Directory where cache is stored (when no cache image is provided). _(optional)_ - -## Parameters - - - **`APP_IMAGE`**: The name of where to store the app image. _(REQUIRED)_ - - **`BUILDER_IMAGE`**: The image on which builds will run (must include lifecycle and compatible buildpacks). _(REQUIRED)_ - - **`SOURCE_SUBPATH`**: A subpath within the `source` input where the source to build is located. _(optional, default: "")_ - - **`ENV_VARS`**: Environment variables to set during _build-time_. _(optional, default: [])_ - - **`PROCESS_TYPE`**: The default process type to set on the image. _(optional, default: "web")_ - - **`RUN_IMAGE`**: Reference to a run image to use. _(optional, default: "")_ - - **`CACHE_IMAGE`**: The name of the persistent app cache image (if no cache workspace is provided). _(optional, default: "")_ - - **`USER_ID`**: The user ID of the builder image user. _(optional, default: "1000")_ - - **`GROUP_ID`**: The group ID of the builder image user. _(optional, default: "1000")_ - - **`PLATFORM_DIR`**: The name of the platform directory. _(optional, default: "empty-dir")_ - - **`LIFECYCLE_IMAGE`**: The image to use when executing sensitive phases. _(optional, default: "docker.io/buildpacksio/lifecycle:0.10.2@sha256:1bf8d3fc41d2fdf0ee4abdad50038ab8902ef58c74f5bcfc432c26767d889ed0")_ - - **`USER_HOME`**: Absolute path to the user's home directory. _(optional, default: "/tekton/home")_ - -## Builders - -_The following are the suggested [builders][builders] from the [Cloud Native Buildpacks][buildpacks-io] project. This is only a subset of builders available._ - - - **`gcr.io/buildpacks/builder:v1`**: Ubuntu 18 base image with buildpacks for .NET, Go, Java, Node.js, and Python - - **`heroku/buildpacks:18`**: Base builder for Heroku-18 stack, based on ubuntu:18.04 base image - - **`heroku/buildpacks:20`**: Base builder for Heroku-20 stack, based on ubuntu:20.04 base image - - **`paketobuildpacks/builder:base`**: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Python, Ruby, NGINX and Procfile - - **`paketobuildpacks/builder:full`**: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Python, PHP, Ruby, Apache HTTPD, NGINX and Procfile - - **`paketobuildpacks/builder:tiny`**: Tiny base image (bionic build image, distroless-like run image) with buildpacks for Java Native Image and Go - -[builders]: (https://buildpacks.io/docs/concepts/components/builder/) -[buildpacks-io]: (https://buildpacks.io) - -## Platforms - -The Task can be run on `linux/amd64` platform. - -## Usage - -See the following samples for usage: - - - **[`env-vars.yaml`](samples/env-vars.yaml)**: A PipelineRun configured to provide _build-time_ environment variables. - - **[`lifecycle-image.yaml`](samples/lifecycle-image.yaml)**: A PipelineRun configured to use a specific lifecycle image. - - **[`results.yaml`](samples/results.yaml)**: A PipelineRun configured to demonstrate usage of task results. - -## Support - -The [Buildpacks Community](http://buildpacks.io/community/) is always here to help. - -We can be found in our [discussion board][discussion-board] or [slack][slack] (`#tekton`). - -[discussion-board]: https://github.com/buildpacks/community/discussions -[slack]: https://slack.buildpacks.io - -## Contributing - -We ❤ contributions. - -This task is maintained at [buildpacks/tekton-integration](https://github.com/buildpacks/tekton-integration). Issues, pull requests and other contributions can be made there. - -To learn more, read the [CONTRIBUTING][contributing] and [DEVELOPMENT][development] documents. - -[contributing]: https://github.com/buildpacks/.github/blob/main/CONTRIBUTING.md -[development]: https://github.com/buildpacks/tekton-integration/blob/main/DEVELOPMENT.md - -## Previous Versions - -For support of previous [Platform API][platform-api]s use a previous version of this task. - -> Be sure to also supply a compatible builder image (`BUILDER_IMAGE` input) when running the task (i.e. one that has a lifecycle that supports the platform API). - -| Version | Platform API -|---- |----- -| [0.1](../0.1/) | [0.3][platform-api-0.3] - -[platform-api]: https://buildpacks.io/docs/reference/spec/platform-api/ -[platform-api-0.3]: https://github.com/buildpacks/spec/blob/platform/0.3/platform.md diff --git a/task/buildpacks-phases/0.2/README.tpl.md b/task/buildpacks-phases/0.2/README.tpl.md deleted file mode 100644 index 6e307a5..0000000 --- a/task/buildpacks-phases/0.2/README.tpl.md +++ /dev/null @@ -1,60 +0,0 @@ -# ${DISPLAY_NAME} - -${SUMMARY} - -The lifecycle phases are run in separate containers to enable better security for untrusted builders. Specifically, registry credentials are hidden from the detect and build phases of the lifecycle, and the analyze, restore, and export phases (which require credentials) are run in the lifecycle image published by the [Cloud Native Buildpacks project]( https://hub.docker.com/u/buildpacksio). - -See also [`buildpacks`](../../buildpacks) for the combined version of this task, which uses the [creator binary](https://github.com/buildpacks/spec/blob/platform/0.4/platform.md#operations), to run all of the [lifecycle phases](https://buildpacks.io/docs/concepts/components/lifecycle/#phases). This task, in contrast, runs all of the phases separately. - -## Compatibility - -- **Tekton** v${TEKTON_MIN_VERSION} and above -- **[Platform API][platform-api]** ${PLATFORM_API_VERSION} - - For other versions, see [previous versions](#previous-versions). - -## Install - -``` -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/${TYPE}/${NAME}/${VERSION}/${NAME}.yaml -``` - -## Workspaces - -${WORKSPACES} - -## Parameters - -${PARAMETERS} - -## Builders - -${BUILDERS} - -## Platforms - -The Task can be run on `linux/amd64` platform. - -## Usage - -${SAMPLES} - -## Support - -${SUPPORT} - -## Contributing - -${CONTRIBUTING} - -## Previous Versions - -For support of previous [Platform API][platform-api]s use a previous version of this task. - -> Be sure to also supply a compatible builder image (`BUILDER_IMAGE` input) when running the task (i.e. one that has a lifecycle that supports the platform API). - -| Version | Platform API -|---- |----- -| [0.1](../0.1/) | [0.3][platform-api-0.3] - -[platform-api]: https://buildpacks.io/docs/reference/spec/platform-api/ -[platform-api-0.3]: https://github.com/buildpacks/spec/blob/platform/0.3/platform.md diff --git a/task/buildpacks-phases/0.2/buildpacks-phases.yaml b/task/buildpacks-phases/0.2/buildpacks-phases.yaml deleted file mode 100644 index 0611bf0..0000000 --- a/task/buildpacks-phases/0.2/buildpacks-phases.yaml +++ /dev/null @@ -1,241 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: buildpacks-phases - labels: - app.kubernetes.io/version: "0.2" - annotations: - tekton.dev/categories: Image Build, Security - tekton.dev/pipelines.minVersion: "0.17.0" - tekton.dev/tags: image-build - tekton.dev/displayName: "Buildpacks (phases)" - tekton.dev/platforms: "linux/amd64" -spec: - description: >- - The Buildpacks-Phases task builds source into a container image and pushes it to - a registry, using Cloud Native Buildpacks. This task separately calls the aspects of the - Cloud Native Buildpacks lifecycle, to provide increased security via container isolation. - - workspaces: - - name: source - description: Directory where application source is located. - - name: cache - description: Directory where cache is stored (when no cache image is provided). - optional: true - - params: - - name: APP_IMAGE - description: The name of where to store the app image. - - name: BUILDER_IMAGE - description: The image on which builds will run (must include lifecycle and compatible buildpacks). - - name: SOURCE_SUBPATH - description: A subpath within the `source` input where the source to build is located. - default: "" - - name: ENV_VARS - type: array - description: Environment variables to set during _build-time_. - default: [] - - name: PROCESS_TYPE - description: The default process type to set on the image. - default: "web" - - name: RUN_IMAGE - description: Reference to a run image to use. - default: "" - - name: CACHE_IMAGE - description: The name of the persistent app cache image (if no cache workspace is provided). - default: "" - - 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" - - name: PLATFORM_DIR - description: The name of the platform directory. - default: empty-dir - - name: LIFECYCLE_IMAGE - description: The image to use when executing sensitive phases. - default: docker.io/buildpacksio/lifecycle:0.10.2@sha256:1bf8d3fc41d2fdf0ee4abdad50038ab8902ef58c74f5bcfc432c26767d889ed0 - - name: USER_HOME - description: Absolute path to the user's home directory. - default: /tekton/home - - results: - - name: APP_IMAGE_DIGEST - description: The digest of the built `APP_IMAGE`. - - stepTemplate: - env: - - name: CNB_PLATFORM_API - value: "0.4" - - name: HOME - value: $(params.USER_HOME) - - steps: - - name: prepare - image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 - args: - - "--env-vars" - - "$(params.ENV_VARS[*])" - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.cache.bound)" == "true" ]]; then - echo "> Setting permissions on '$(workspaces.cache.path)'..." - chown -R "$(params.USER_ID):$(params.GROUP_ID)" "$(workspaces.cache.path)" - fi - - for path in "/tekton/home" "/layers" "$(workspaces.source.path)"; do - echo "> Setting permissions on '$path'..." - chown -R "$(params.USER_ID):$(params.GROUP_ID)" "$path" - done - - echo "> Parsing additional configuration..." - parsing_flag="" - envs=() - for arg in "$@"; do - if [[ "$arg" == "--env-vars" ]]; then - echo "-> Parsing env variables..." - parsing_flag="env-vars" - elif [[ "$parsing_flag" == "env-vars" ]]; then - envs+=("$arg") - fi - done - - echo "> Processing any environment variables..." - ENV_DIR="/platform/env" - - echo "--> Creating 'env' directory: $ENV_DIR" - mkdir -p "$ENV_DIR" - - for env in "${envs[@]}"; do - IFS='=' read -r key value string <<< "$env" - if [[ "$key" != "" && "$value" != "" ]]; then - path="${ENV_DIR}/${key}" - echo "--> Writing ${path}..." - echo -n "$value" > "$path" - fi - done - volumeMounts: - - name: layers-dir - mountPath: /layers - - name: $(params.PLATFORM_DIR) - mountPath: /platform - securityContext: - privileged: true - - # Copy stack.toml so that it will be accessible to the exporter, since the lifecycle image will not contain it. - - name: copy-stack-toml - image: $(params.BUILDER_IMAGE) - imagePullPolicy: Always - command: ["/bin/sh"] - args: - - "-c" - - > - cp /cnb/stack.toml /layers/ - volumeMounts: - - name: layers-dir - mountPath: /layers - - - name: detect - image: $(params.BUILDER_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/detector"] - args: - - "-app=$(workspaces.source.path)/$(params.SOURCE_SUBPATH)" - - "-group=/layers/group.toml" - - "-plan=/layers/plan.toml" - volumeMounts: - - name: layers-dir - mountPath: /layers - - name: $(params.PLATFORM_DIR) - mountPath: /platform - - name: empty-dir - mountPath: /tekton/home - - - name: analyze - image: $(params.LIFECYCLE_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/analyzer"] - args: - - "-layers=/layers" - - "-group=/layers/group.toml" - - "-cache-dir=$(workspaces.cache.path)" - - "-cache-image=$(params.CACHE_IMAGE)" - - "-uid=$(params.USER_ID)" - - "-gid=$(params.GROUP_ID)" - - "$(params.APP_IMAGE)" - volumeMounts: - - name: layers-dir - mountPath: /layers - - - name: restore - image: $(params.LIFECYCLE_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/restorer"] - args: - - "-group=/layers/group.toml" - - "-layers=/layers" - - "-cache-dir=$(workspaces.cache.path)" - - "-cache-image=$(params.CACHE_IMAGE)" - - "-uid=$(params.USER_ID)" - - "-gid=$(params.GROUP_ID)" - volumeMounts: - - name: layers-dir - mountPath: /layers - - - name: build - image: $(params.BUILDER_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/builder"] - args: - - "-app=$(workspaces.source.path)/$(params.SOURCE_SUBPATH)" - - "-layers=/layers" - - "-group=/layers/group.toml" - - "-plan=/layers/plan.toml" - volumeMounts: - - name: layers-dir - mountPath: /layers - - name: $(params.PLATFORM_DIR) - mountPath: /platform - - name: empty-dir - mountPath: /tekton/home - - - name: export - image: $(params.LIFECYCLE_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/exporter"] - args: - - "-app=$(workspaces.source.path)/$(params.SOURCE_SUBPATH)" - - "-layers=/layers" - - "-group=/layers/group.toml" - - "-cache-dir=$(workspaces.cache.path)" - - "-cache-image=$(params.CACHE_IMAGE)" - - "-report=/layers/report.toml" - - "-process-type=$(params.PROCESS_TYPE)" - - "-uid=$(params.USER_ID)" - - "-gid=$(params.GROUP_ID)" - - "-stack=/layers/stack.toml" - - "-run-image=$(params.RUN_IMAGE)" - - "$(params.APP_IMAGE)" - volumeMounts: - - name: layers-dir - mountPath: /layers - - - name: results - image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 - script: | - #!/usr/bin/env bash - set -e - cat /layers/report.toml | grep "digest" | cut -d'"' -f2 | cut -d'"' -f2 | tr -d '\n' | tee $(results.APP_IMAGE_DIGEST.path) - volumeMounts: - - name: layers-dir - mountPath: /layers - - volumes: - - name: empty-dir - emptyDir: {} - - name: layers-dir - emptyDir: {} diff --git a/task/buildpacks-phases/0.2/samples/env-vars.yaml b/task/buildpacks-phases/0.2/samples/env-vars.yaml deleted file mode 100644 index 96241ba..0000000 --- a/task/buildpacks-phases/0.2/samples/env-vars.yaml +++ /dev/null @@ -1,69 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: env-vars-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: env-vars-pipeline-run - labels: - app.kubernetes.io/description: A PipelineRun configured to provide _build-time_ environment variables. -spec: - pipelineSpec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks - taskRef: - name: buildpacks-phases - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: - - name: SOURCE_SUBPATH - value: apps - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:alpine@sha256:b51367258b3b6fff1fe8f375ecca79dab4339b177efb791e131417a5a4357f42 - - name: ENV_VARS - value: - - "ENV_VAR_1=VALUE_1" - - "ENV_VAR_2=VALUE 2" - - name: PROCESS_TYPE - value: "" - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: env-vars-ws-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: env-vars-ws-pvc diff --git a/task/buildpacks-phases/0.2/samples/lifecycle-image.yaml b/task/buildpacks-phases/0.2/samples/lifecycle-image.yaml deleted file mode 100644 index e748ac0..0000000 --- a/task/buildpacks-phases/0.2/samples/lifecycle-image.yaml +++ /dev/null @@ -1,65 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: lifecycle-image-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: lifecycle-image-pipeline-run - labels: - app.kubernetes.io/description: A PipelineRun configured to use a specific lifecycle image. -spec: - pipelineSpec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks-phases - taskRef: - name: buildpacks-phases - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: - - name: SOURCE_SUBPATH - value: apps/java-maven - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:alpine@sha256:b51367258b3b6fff1fe8f375ecca79dab4339b177efb791e131417a5a4357f42 - - name: LIFECYCLE_IMAGE - value: docker.io/buildpacksio/lifecycle:0.10.1@sha256:1bf8d3fc41d2fdf0ee4abdad50038ab8902ef58c74f5bcfc432c26767d889ed0 - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: lifecycle-image-ws-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: lifecycle-image-ws-pvc diff --git a/task/buildpacks-phases/0.2/samples/results.yaml b/task/buildpacks-phases/0.2/samples/results.yaml deleted file mode 100644 index cba630a..0000000 --- a/task/buildpacks-phases/0.2/samples/results.yaml +++ /dev/null @@ -1,79 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: results-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: results-pipeline-run - labels: - app.kubernetes.io/description: A PipelineRun configured to demonstrate usage of task results. -spec: - pipelineSpec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks-phases - taskRef: - name: buildpacks-phases - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: - - name: SOURCE_SUBPATH - value: apps/ruby-bundler - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:bionic@sha256:6c03dd604503b59820fd15adbc65c0a077a47e31d404a3dcad190f3179e920b5 - - name: display-results - runAfter: - - buildpacks-phases - taskSpec: - steps: - - name: print - image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 - script: | - #!/usr/bin/env bash - set -e - echo "Digest of created app image: $(params.DIGEST)" - params: - - name: DIGEST - params: - - name: DIGEST - value: $(tasks.buildpacks-phases.results.APP_IMAGE_DIGEST) - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: results-ws-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: results-ws-pvc diff --git a/task/buildpacks-phases/0.2/tests/pre-apply-task-hook.sh b/task/buildpacks-phases/0.2/tests/pre-apply-task-hook.sh deleted file mode 100755 index 219a9a4..0000000 --- a/task/buildpacks-phases/0.2/tests/pre-apply-task-hook.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -# Add an internal registry as sidecar to the task so we can upload it directly -# from our tests without having to go to an external registry. -add_sidecar_registry ${TMPF} - -# Add git-clone -add_task git-clone latest diff --git a/task/buildpacks-phases/0.2/tests/resources.yaml b/task/buildpacks-phases/0.2/tests/resources.yaml deleted file mode 100644 index 30e9d9c..0000000 --- a/task/buildpacks-phases/0.2/tests/resources.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: buildpacks-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi diff --git a/task/buildpacks-phases/0.2/tests/run.yaml b/task/buildpacks-phases/0.2/tests/run.yaml deleted file mode 100644 index b33af27..0000000 --- a/task/buildpacks-phases/0.2/tests/run.yaml +++ /dev/null @@ -1,58 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: buildpacks-phases-test-pipeline -spec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks-phases - taskRef: - name: buildpacks-phases - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: localhost:5000/buildpacks-app - - name: SOURCE_SUBPATH - value: apps/java-maven - - name: BUILDER_IMAGE - value: cnbs/sample-builder:alpine@sha256:b51367258b3b6fff1fe8f375ecca79dab4339b177efb791e131417a5a4357f42 ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: buildpacks-phases-test-pipeline-run -spec: - pipelineRef: - name: buildpacks-phases-test-pipeline - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: buildpacks-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: buildpacks-pvc ---- diff --git a/task/buildpacks/0.3/README.md b/task/buildpacks/0.3/README.md deleted file mode 100644 index 2b1617d..0000000 --- a/task/buildpacks/0.3/README.md +++ /dev/null @@ -1,103 +0,0 @@ - -# Buildpacks - -This task builds source into a container image using [Cloud Native Buildpacks](https://buildpacks.io). To do that, it uses [builders](https://buildpacks.io/docs/concepts/components/builder/#what-is-a-builder) to run buildpacks against your application source. - -> _**What are Cloud Native Buildpacks?**_ -> -> _Cloud Native Buildpacks are pluggable, modular tools that transform application source code into OCI images. They replace Dockerfiles in the app development lifecycle, and enable for swift rebasing of images and modular control over images (through the use of builders), among other benefits._ - -See also [`buildpacks-phases`](../../buildpacks-phases) for the deconstructed version of this task, which runs each of the [lifecycle phases](https://buildpacks.io/docs/concepts/components/lifecycle/#phases) individually. This task uses the [creator binary](https://github.com/buildpacks/spec/blob/platform/0.4/platform.md#operations), which coordinates and runs all of the phases. - -## Compatibility - -- **Tekton** v0.17.0 and above -- **[Platform API][platform-api]** 0.4 - - For other versions, see [previous versions](#previous-versions). - -## Install - -``` -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/task/buildpacks/0.3/buildpacks.yaml -``` - -## Workspaces - - - **`source`**: Directory where application source is located. _(REQUIRED)_ - - **`cache`**: Directory where cache is stored (when no cache image is provided). _(optional)_ - -## Parameters - - - **`APP_IMAGE`**: The name of where to store the app image. _(REQUIRED)_ - - **`BUILDER_IMAGE`**: The image on which builds will run (must include lifecycle and compatible buildpacks). _(REQUIRED)_ - - **`SOURCE_SUBPATH`**: A subpath within the `source` input where the source to build is located. _(optional, default: "")_ - - **`ENV_VARS`**: Environment variables to set during _build-time_. _(optional, default: [])_ - - **`PROCESS_TYPE`**: The default process type to set on the image. _(optional, default: "web")_ - - **`RUN_IMAGE`**: Reference to a run image to use. _(optional, default: "")_ - - **`CACHE_IMAGE`**: The name of the persistent app cache image (if no cache workspace is provided). _(optional, default: "")_ - - **`SKIP_RESTORE`**: Do not write layer metadata or restore cached layers. _(optional, default: "false")_ - - **`USER_ID`**: The user ID of the builder image user. _(optional, default: "1000")_ - - **`GROUP_ID`**: The group ID of the builder image user. _(optional, default: "1000")_ - - **`PLATFORM_DIR`**: The name of the platform directory. _(optional, default: "empty-dir")_ - -## Results - - - **`APP_IMAGE_DIGEST`**: The digest of the built `APP_IMAGE`. - -## Builders - -_The following are the suggested [builders][builders] from the [Cloud Native Buildpacks][buildpacks-io] project. This is only a subset of builders available._ - - - **`gcr.io/buildpacks/builder:v1`**: Ubuntu 18 base image with buildpacks for .NET, Go, Java, Node.js, and Python - - **`heroku/buildpacks:18`**: Base builder for Heroku-18 stack, based on ubuntu:18.04 base image - - **`heroku/buildpacks:20`**: Base builder for Heroku-20 stack, based on ubuntu:20.04 base image - - **`paketobuildpacks/builder:base`**: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Python, Ruby, NGINX and Procfile - - **`paketobuildpacks/builder:full`**: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Python, PHP, Ruby, Apache HTTPD, NGINX and Procfile - - **`paketobuildpacks/builder:tiny`**: Tiny base image (bionic build image, distroless-like run image) with buildpacks for Java Native Image and Go - -[builders]: (https://buildpacks.io/docs/concepts/components/builder/) -[buildpacks-io]: (https://buildpacks.io) - -## Platforms - -The Task can be run on `linux/amd64` platform. - -## Usage - -See the following samples for usage: - - - **[`env-vars.yaml`](samples/env-vars.yaml)**: A PipelineRun configured to provide _build-time_ environment variables. - - **[`results.yaml`](samples/results.yaml)**: A PipelineRun configured to demonstrate usage of task results. - -## Support - -The [Buildpacks Community](http://buildpacks.io/community/) is always here to help. - -We can be found in our [discussion board][discussion-board] or [slack][slack] (`#tekton`). - -[discussion-board]: https://github.com/buildpacks/community/discussions -[slack]: https://slack.buildpacks.io - -## Contributing - -We ❤ contributions. - -This task is maintained at [buildpacks/tekton-integration](https://github.com/buildpacks/tekton-integration). Issues, pull requests and other contributions can be made there. - -To learn more, read the [CONTRIBUTING][contributing] and [DEVELOPMENT][development] documents. - -[contributing]: https://github.com/buildpacks/.github/blob/main/CONTRIBUTING.md -[development]: https://github.com/buildpacks/tekton-integration/blob/main/DEVELOPMENT.md - -## Previous Versions - -For support of previous [Platform API][platform-api]s use a previous version of this task. - -> Be sure to also supply a compatible builder image (`BUILDER_IMAGE` input) when running the task (i.e. one that has a lifecycle that supports the platform API). - -| Version | Platform API -|---- |----- -| [0.2](../0.2/) | [0.3][platform-api-0.3] - -[platform-api]: https://buildpacks.io/docs/reference/spec/platform-api/ -[platform-api-0.3]: https://github.com/buildpacks/spec/blob/platform/0.3/platform.md \ No newline at end of file diff --git a/task/buildpacks/0.3/README.tpl.md b/task/buildpacks/0.3/README.tpl.md deleted file mode 100644 index f20a8da..0000000 --- a/task/buildpacks/0.3/README.tpl.md +++ /dev/null @@ -1,62 +0,0 @@ -# ${DISPLAY_NAME} - -${SUMMARY} - -See also [`buildpacks-phases`](../../buildpacks-phases) for the deconstructed version of this task, which runs each of the [lifecycle phases](https://buildpacks.io/docs/concepts/components/lifecycle/#phases) individually. This task uses the [creator binary](https://github.com/buildpacks/spec/blob/platform/0.4/platform.md#operations), which coordinates and runs all of the phases. - -## Compatibility - -- **Tekton** v${TEKTON_MIN_VERSION} and above -- **[Platform API][platform-api]** ${PLATFORM_API_VERSION} - - For other versions, see [previous versions](#previous-versions). - -## Install - -``` -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/${TYPE}/${NAME}/${VERSION}/${NAME}.yaml -``` - -## Workspaces - -${WORKSPACES} - -## Parameters - -${PARAMETERS} - -## Results - -${RESULTS} - -## Builders - -${BUILDERS} - -## Platforms - -The Task can be run on `linux/amd64` platform. - -## Usage - -${SAMPLES} - -## Support - -${SUPPORT} - -## Contributing - -${CONTRIBUTING} - -## Previous Versions - -For support of previous [Platform API][platform-api]s use a previous version of this task. - -> Be sure to also supply a compatible builder image (`BUILDER_IMAGE` input) when running the task (i.e. one that has a lifecycle that supports the platform API). - -| Version | Platform API -|---- |----- -| [0.2](../0.2/) | [0.3][platform-api-0.3] - -[platform-api]: https://buildpacks.io/docs/reference/spec/platform-api/ -[platform-api-0.3]: https://github.com/buildpacks/spec/blob/platform/0.3/platform.md \ No newline at end of file diff --git a/task/buildpacks/0.3/buildpacks.yaml b/task/buildpacks/0.3/buildpacks.yaml deleted file mode 100644 index 4ccc867..0000000 --- a/task/buildpacks/0.3/buildpacks.yaml +++ /dev/null @@ -1,164 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: buildpacks - labels: - app.kubernetes.io/version: "0.3" - annotations: - tekton.dev/categories: Image Build - tekton.dev/pipelines.minVersion: "0.17.0" - tekton.dev/tags: image-build - tekton.dev/displayName: "Buildpacks" - tekton.dev/platforms: "linux/amd64" -spec: - description: >- - The Buildpacks task builds source into a container image and pushes it to a registry, - using Cloud Native Buildpacks. - - workspaces: - - name: source - description: Directory where application source is located. - - name: cache - description: Directory where cache is stored (when no cache image is provided). - optional: true - - params: - - name: APP_IMAGE - description: The name of where to store the app image. - - name: BUILDER_IMAGE - description: The image on which builds will run (must include lifecycle and compatible buildpacks). - - name: SOURCE_SUBPATH - description: A subpath within the `source` input where the source to build is located. - default: "" - - name: ENV_VARS - type: array - description: Environment variables to set during _build-time_. - default: [] - - name: PROCESS_TYPE - description: The default process type to set on the image. - default: "web" - - name: RUN_IMAGE - description: Reference to a run image to use. - default: "" - - name: CACHE_IMAGE - description: The name of the persistent app cache image (if no cache workspace is provided). - default: "" - - name: SKIP_RESTORE - description: Do not write layer metadata or restore cached layers. - default: "false" - - 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" - - name: PLATFORM_DIR - description: The name of the platform directory. - default: empty-dir - - results: - - name: APP_IMAGE_DIGEST - description: The digest of the built `APP_IMAGE`. - - stepTemplate: - env: - - name: CNB_PLATFORM_API - value: "0.4" - - steps: - - name: prepare - image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 - args: - - "--env-vars" - - "$(params.ENV_VARS[*])" - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.cache.bound)" == "true" ]]; then - echo "> Setting permissions on '$(workspaces.cache.path)'..." - chown -R "$(params.USER_ID):$(params.GROUP_ID)" "$(workspaces.cache.path)" - fi - - for path in "/tekton/home" "/layers" "$(workspaces.source.path)"; do - echo "> Setting permissions on '$path'..." - chown -R "$(params.USER_ID):$(params.GROUP_ID)" "$path" - done - - echo "> Parsing additional configuration..." - parsing_flag="" - envs=() - for arg in "$@"; do - if [[ "$arg" == "--env-vars" ]]; then - echo "-> Parsing env variables..." - parsing_flag="env-vars" - elif [[ "$parsing_flag" == "env-vars" ]]; then - envs+=("$arg") - fi - done - - echo "> Processing any environment variables..." - ENV_DIR="/platform/env" - - echo "--> Creating 'env' directory: $ENV_DIR" - mkdir -p "$ENV_DIR" - - for env in "${envs[@]}"; do - IFS='=' read -r key value string <<< "$env" - if [[ "$key" != "" && "$value" != "" ]]; then - path="${ENV_DIR}/${key}" - echo "--> Writing ${path}..." - echo -n "$value" > "$path" - fi - done - volumeMounts: - - name: layers-dir - mountPath: /layers - - name: $(params.PLATFORM_DIR) - mountPath: /platform - securityContext: - privileged: true - - - name: create - image: $(params.BUILDER_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/creator"] - args: - - "-app=$(workspaces.source.path)/$(params.SOURCE_SUBPATH)" - - "-cache-dir=$(workspaces.cache.path)" - - "-cache-image=$(params.CACHE_IMAGE)" - - "-uid=$(params.USER_ID)" - - "-gid=$(params.GROUP_ID)" - - "-layers=/layers" - - "-platform=/platform" - - "-report=/layers/report.toml" - - "-process-type=$(params.PROCESS_TYPE)" - - "-skip-restore=$(params.SKIP_RESTORE)" - - "-previous-image=$(params.APP_IMAGE)" - - "-run-image=$(params.RUN_IMAGE)" - - "$(params.APP_IMAGE)" - volumeMounts: - - name: layers-dir - mountPath: /layers - - name: $(params.PLATFORM_DIR) - mountPath: /platform - securityContext: - runAsUser: 1000 - runAsGroup: 1000 - - - name: results - image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 - script: | - #!/usr/bin/env bash - set -e - cat /layers/report.toml | grep "digest" | cut -d'"' -f2 | cut -d'"' -f2 | tr -d '\n' | tee $(results.APP_IMAGE_DIGEST.path) - volumeMounts: - - name: layers-dir - mountPath: /layers - - volumes: - - name: empty-dir - emptyDir: {} - - name: layers-dir - emptyDir: {} diff --git a/task/buildpacks/0.3/samples/env-vars.yaml b/task/buildpacks/0.3/samples/env-vars.yaml deleted file mode 100644 index 6c6f220..0000000 --- a/task/buildpacks/0.3/samples/env-vars.yaml +++ /dev/null @@ -1,69 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: env-vars-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: env-vars-pipeline-run - labels: - description: A PipelineRun configured to provide _build-time_ environment variables. -spec: - pipelineSpec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks - taskRef: - name: buildpacks - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: - - name: SOURCE_SUBPATH - value: apps - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:alpine@sha256:b51367258b3b6fff1fe8f375ecca79dab4339b177efb791e131417a5a4357f42 - - name: ENV_VARS - value: - - "ENV_VAR_1=VALUE_1" - - "ENV_VAR_2=VALUE 2" - - name: PROCESS_TYPE - value: "" - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: env-vars-ws-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: env-vars-ws-pvc diff --git a/task/buildpacks/0.3/samples/results.yaml b/task/buildpacks/0.3/samples/results.yaml deleted file mode 100644 index 6f0389d..0000000 --- a/task/buildpacks/0.3/samples/results.yaml +++ /dev/null @@ -1,79 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: results-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: results-pipeline-run - labels: - app.kubernetes.io/description: A PipelineRun configured to demonstrate usage of task results. -spec: - pipelineSpec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks - taskRef: - name: buildpacks - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: - - name: SOURCE_SUBPATH - value: apps/ruby-bundler - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:bionic@sha256:6c03dd604503b59820fd15adbc65c0a077a47e31d404a3dcad190f3179e920b5 - - name: display-results - runAfter: - - buildpacks - taskSpec: - steps: - - name: print - image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 - script: | - #!/usr/bin/env bash - set -e - echo "Digest of created app image: $(params.DIGEST)" - params: - - name: DIGEST - params: - - name: DIGEST - value: $(tasks.buildpacks.results.APP_IMAGE_DIGEST) - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: results-ws-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: results-ws-pvc diff --git a/task/buildpacks/0.3/tests/pre-apply-task-hook.sh b/task/buildpacks/0.3/tests/pre-apply-task-hook.sh deleted file mode 100755 index 219a9a4..0000000 --- a/task/buildpacks/0.3/tests/pre-apply-task-hook.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -# Add an internal registry as sidecar to the task so we can upload it directly -# from our tests without having to go to an external registry. -add_sidecar_registry ${TMPF} - -# Add git-clone -add_task git-clone latest diff --git a/task/buildpacks/0.3/tests/resources.yaml b/task/buildpacks/0.3/tests/resources.yaml deleted file mode 100644 index 30e9d9c..0000000 --- a/task/buildpacks/0.3/tests/resources.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: buildpacks-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi diff --git a/task/buildpacks/0.3/tests/run.yaml b/task/buildpacks/0.3/tests/run.yaml deleted file mode 100644 index b71069b..0000000 --- a/task/buildpacks/0.3/tests/run.yaml +++ /dev/null @@ -1,58 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: buildpacks-test-pipeline -spec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks - taskRef: - name: buildpacks - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: localhost:5000/buildpacks-app - - name: SOURCE_SUBPATH - value: apps/java-maven - - name: BUILDER_IMAGE - value: cnbs/sample-builder:alpine@sha256:b51367258b3b6fff1fe8f375ecca79dab4339b177efb791e131417a5a4357f42 ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: buildpacks-test-pipeline-run -spec: - pipelineRef: - name: buildpacks-test-pipeline - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: buildpacks-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: buildpacks-pvc ---- diff --git a/task/buildpacks/0.4/README.md b/task/buildpacks/0.4/README.md deleted file mode 100644 index ac1b11e..0000000 --- a/task/buildpacks/0.4/README.md +++ /dev/null @@ -1,104 +0,0 @@ - -# Buildpacks - -This task builds source into a container image using [Cloud Native Buildpacks](https://buildpacks.io). To do that, it uses [builders](https://buildpacks.io/docs/concepts/components/builder/#what-is-a-builder) to run buildpacks against your application source. - -> _**What are Cloud Native Buildpacks?**_ -> -> _Cloud Native Buildpacks are pluggable, modular tools that transform application source code into OCI images. They replace Dockerfiles in the app development lifecycle, and enable for swift rebasing of images and modular control over images (through the use of builders), among other benefits._ - -See also [`buildpacks-phases`](../../buildpacks-phases) for the deconstructed version of this task, which runs each of the [lifecycle phases](https://buildpacks.io/docs/concepts/components/lifecycle/#phases) individually. This task uses the [creator binary](https://github.com/buildpacks/spec/blob/platform/0.4/platform.md#operations), which coordinates and runs all of the phases. - -## Compatibility - -- **Tekton** v0.17.0 and above -- **[Platform API][platform-api]** 0.4 - - For other versions, see [previous versions](#previous-versions). - -## Install - -``` -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/task/buildpacks/0.4/buildpacks.yaml -``` - -## Workspaces - - - **`source`**: Directory where application source is located. _(REQUIRED)_ - - **`cache`**: Directory where cache is stored (when no cache image is provided). _(optional)_ - -## Parameters - - - **`APP_IMAGE`**: The name of where to store the app image. _(REQUIRED)_ - - **`BUILDER_IMAGE`**: The image on which builds will run (must include lifecycle and compatible buildpacks). _(REQUIRED)_ - - **`SOURCE_SUBPATH`**: A subpath within the `source` input where the source to build is located. _(optional, default: "")_ - - **`ENV_VARS`**: Environment variables to set during _build-time_. _(optional, default: [])_ - - **`PROCESS_TYPE`**: The default process type to set on the image. _(optional, default: "web")_ - - **`RUN_IMAGE`**: Reference to a run image to use. _(optional, default: "")_ - - **`CACHE_IMAGE`**: The name of the persistent app cache image (if no cache workspace is provided). _(optional, default: "")_ - - **`SKIP_RESTORE`**: Do not write layer metadata or restore cached layers. _(optional, default: "false")_ - - **`USER_ID`**: The user ID of the builder image user. _(optional, default: "1000")_ - - **`GROUP_ID`**: The group ID of the builder image user. _(optional, default: "1000")_ - - **`PLATFORM_DIR`**: The name of the platform directory. _(optional, default: "empty-dir")_ - -## Results - - - **`APP_IMAGE_DIGEST`**: The digest of the built `APP_IMAGE`. - - **`APP_IMAGE_URL`**: The URL of the built `APP_IMAGE`. - -## Builders - -_The following are the suggested [builders][builders] from the [Cloud Native Buildpacks][buildpacks-io] project. This is only a subset of builders available._ - - - **`gcr.io/buildpacks/builder:v1`**: Ubuntu 18 base image with buildpacks for .NET, Go, Java, Node.js, and Python - - **`heroku/buildpacks:18`**: Base builder for Heroku-18 stack, based on ubuntu:18.04 base image - - **`heroku/buildpacks:20`**: Base builder for Heroku-20 stack, based on ubuntu:20.04 base image - - **`paketobuildpacks/builder:base`**: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Python, Ruby, NGINX and Procfile - - **`paketobuildpacks/builder:full`**: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Python, PHP, Ruby, Apache HTTPD, NGINX and Procfile - - **`paketobuildpacks/builder:tiny`**: Tiny base image (bionic build image, distroless-like run image) with buildpacks for Java Native Image and Go - -[builders]: (https://buildpacks.io/docs/concepts/components/builder/) -[buildpacks-io]: (https://buildpacks.io) - -## Platforms - -The Task can be run on `linux/amd64` platform. - -## Usage - -See the following samples for usage: - - - **[`env-vars.yaml`](samples/env-vars.yaml)**: A PipelineRun configured to provide _build-time_ environment variables. - - **[`results.yaml`](samples/results.yaml)**: A PipelineRun configured to demonstrate usage of task results. - -## Support - -The [Buildpacks Community](http://buildpacks.io/community/) is always here to help. - -We can be found in our [discussion board][discussion-board] or [slack][slack] (`#tekton`). - -[discussion-board]: https://github.com/buildpacks/community/discussions -[slack]: https://slack.buildpacks.io - -## Contributing - -We ❤ contributions. - -This task is maintained at [buildpacks/tekton-integration](https://github.com/buildpacks/tekton-integration). Issues, pull requests and other contributions can be made there. - -To learn more, read the [CONTRIBUTING][contributing] and [DEVELOPMENT][development] documents. - -[contributing]: https://github.com/buildpacks/.github/blob/main/CONTRIBUTING.md -[development]: https://github.com/buildpacks/tekton-integration/blob/main/DEVELOPMENT.md - -## Previous Versions - -For support of previous [Platform API][platform-api]s use a previous version of this task. - -> Be sure to also supply a compatible builder image (`BUILDER_IMAGE` input) when running the task (i.e. one that has a lifecycle that supports the platform API). - -| Version | Platform API -|---- |----- -| [0.2](../0.2/) | [0.3][platform-api-0.3] - -[platform-api]: https://buildpacks.io/docs/reference/spec/platform-api/ -[platform-api-0.3]: https://github.com/buildpacks/spec/blob/platform/0.3/platform.md diff --git a/task/buildpacks/0.4/README.tpl.md b/task/buildpacks/0.4/README.tpl.md deleted file mode 100644 index 44283de..0000000 --- a/task/buildpacks/0.4/README.tpl.md +++ /dev/null @@ -1,62 +0,0 @@ -# ${DISPLAY_NAME} - -${SUMMARY} - -See also [`buildpacks-phases`](../../buildpacks-phases) for the deconstructed version of this task, which runs each of the [lifecycle phases](https://buildpacks.io/docs/concepts/components/lifecycle/#phases) individually. This task uses the [creator binary](https://github.com/buildpacks/spec/blob/platform/0.4/platform.md#operations), which coordinates and runs all of the phases. - -## Compatibility - -- **Tekton** v${TEKTON_MIN_VERSION} and above -- **[Platform API][platform-api]** ${PLATFORM_API_VERSION} - - For other versions, see [previous versions](#previous-versions). - -## Install - -``` -kubectl apply -f https://raw.githubusercontent.com/buildpacks/tekton-integration/main/${TYPE}/${NAME}/${VERSION}/${NAME}.yaml -``` - -## Workspaces - -${WORKSPACES} - -## Parameters - -${PARAMETERS} - -## Results - -${RESULTS} - -## Builders - -${BUILDERS} - -## Platforms - -The Task can be run on `linux/amd64` platform. - -## Usage - -${SAMPLES} - -## Support - -${SUPPORT} - -## Contributing - -${CONTRIBUTING} - -## Previous Versions - -For support of previous [Platform API][platform-api]s use a previous version of this task. - -> Be sure to also supply a compatible builder image (`BUILDER_IMAGE` input) when running the task (i.e. one that has a lifecycle that supports the platform API). - -| Version | Platform API -|---- |----- -| [0.2](../0.2/) | [0.3][platform-api-0.3] - -[platform-api]: https://buildpacks.io/docs/reference/spec/platform-api/ -[platform-api-0.3]: https://github.com/buildpacks/spec/blob/platform/0.3/platform.md diff --git a/task/buildpacks/0.4/buildpacks.yaml b/task/buildpacks/0.4/buildpacks.yaml deleted file mode 100644 index b919360..0000000 --- a/task/buildpacks/0.4/buildpacks.yaml +++ /dev/null @@ -1,170 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: buildpacks - labels: - app.kubernetes.io/version: "0.4" - annotations: - tekton.dev/categories: Image Build - tekton.dev/pipelines.minVersion: "0.17.0" - tekton.dev/tags: image-build - tekton.dev/displayName: "Buildpacks" - tekton.dev/platforms: "linux/amd64" -spec: - description: >- - The Buildpacks task builds source into a container image and pushes it to a registry, - using Cloud Native Buildpacks. - - workspaces: - - name: source - description: Directory where application source is located. - - name: cache - description: Directory where cache is stored (when no cache image is provided). - optional: true - - params: - - name: APP_IMAGE - description: The name of where to store the app image. - - name: BUILDER_IMAGE - description: The image on which builds will run (must include lifecycle and compatible buildpacks). - - name: SOURCE_SUBPATH - description: A subpath within the `source` input where the source to build is located. - default: "" - - name: ENV_VARS - type: array - description: Environment variables to set during _build-time_. - default: [] - - name: PROCESS_TYPE - description: The default process type to set on the image. - default: "web" - - name: RUN_IMAGE - description: Reference to a run image to use. - default: "" - - name: CACHE_IMAGE - description: The name of the persistent app cache image (if no cache workspace is provided). - default: "" - - name: SKIP_RESTORE - description: Do not write layer metadata or restore cached layers. - default: "false" - - 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" - - name: PLATFORM_DIR - description: The name of the platform directory. - default: empty-dir - - results: - - name: APP_IMAGE_DIGEST - description: The digest of the built `APP_IMAGE`. - - name: APP_IMAGE_URL - description: The URL of the built `APP_IMAGE`. - - stepTemplate: - env: - - name: CNB_PLATFORM_API - value: "0.4" - - steps: - - name: prepare - image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 - args: - - "--env-vars" - - "$(params.ENV_VARS[*])" - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.cache.bound)" == "true" ]]; then - echo "> Setting permissions on '$(workspaces.cache.path)'..." - chown -R "$(params.USER_ID):$(params.GROUP_ID)" "$(workspaces.cache.path)" - fi - - for path in "/tekton/home" "/layers" "$(workspaces.source.path)"; do - echo "> Setting permissions on '$path'..." - chown -R "$(params.USER_ID):$(params.GROUP_ID)" "$path" - done - - echo "> Parsing additional configuration..." - parsing_flag="" - envs=() - for arg in "$@"; do - if [[ "$arg" == "--env-vars" ]]; then - echo "-> Parsing env variables..." - parsing_flag="env-vars" - elif [[ "$parsing_flag" == "env-vars" ]]; then - envs+=("$arg") - fi - done - - echo "> Processing any environment variables..." - ENV_DIR="/platform/env" - - echo "--> Creating 'env' directory: $ENV_DIR" - mkdir -p "$ENV_DIR" - - for env in "${envs[@]}"; do - IFS='=' read -r key value <<< "$env" - if [[ "$key" != "" && "$value" != "" ]]; then - path="${ENV_DIR}/${key}" - echo "--> Writing ${path}..." - echo -n "$value" > "$path" - fi - done - volumeMounts: - - name: layers-dir - mountPath: /layers - - name: $(params.PLATFORM_DIR) - mountPath: /platform - securityContext: - privileged: true - - - name: create - image: $(params.BUILDER_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/creator"] - args: - - "-app=$(workspaces.source.path)/$(params.SOURCE_SUBPATH)" - - "-cache-dir=$(workspaces.cache.path)" - - "-cache-image=$(params.CACHE_IMAGE)" - - "-uid=$(params.USER_ID)" - - "-gid=$(params.GROUP_ID)" - - "-layers=/layers" - - "-platform=/platform" - - "-report=/layers/report.toml" - - "-process-type=$(params.PROCESS_TYPE)" - - "-skip-restore=$(params.SKIP_RESTORE)" - - "-previous-image=$(params.APP_IMAGE)" - - "-run-image=$(params.RUN_IMAGE)" - - "$(params.APP_IMAGE)" - volumeMounts: - - name: layers-dir - mountPath: /layers - - name: $(params.PLATFORM_DIR) - mountPath: /platform - securityContext: - runAsUser: 1000 - runAsGroup: 1000 - - - name: results - image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 - script: | - #!/usr/bin/env bash - set -e - grep "digest" /layers/report.toml | cut -d'"' -f2 | cut -d'"' -f2 | tr -d '\n' | tee "$(results.APP_IMAGE_DIGEST.path)" - - # Disable shellcheck here since $() is use for variable substitution and not command execution. - # shellcheck disable=SC2005 - echo "$(params.APP_IMAGE)" | tee "$(results.APP_IMAGE_URL.path)" - volumeMounts: - - name: layers-dir - mountPath: /layers - - volumes: - - name: empty-dir - emptyDir: {} - - name: layers-dir - emptyDir: {} diff --git a/task/buildpacks/0.4/samples/env-vars.yaml b/task/buildpacks/0.4/samples/env-vars.yaml deleted file mode 100644 index 6c6f220..0000000 --- a/task/buildpacks/0.4/samples/env-vars.yaml +++ /dev/null @@ -1,69 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: env-vars-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: env-vars-pipeline-run - labels: - description: A PipelineRun configured to provide _build-time_ environment variables. -spec: - pipelineSpec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks - taskRef: - name: buildpacks - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: - - name: SOURCE_SUBPATH - value: apps - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:alpine@sha256:b51367258b3b6fff1fe8f375ecca79dab4339b177efb791e131417a5a4357f42 - - name: ENV_VARS - value: - - "ENV_VAR_1=VALUE_1" - - "ENV_VAR_2=VALUE 2" - - name: PROCESS_TYPE - value: "" - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: env-vars-ws-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: env-vars-ws-pvc diff --git a/task/buildpacks/0.4/samples/results.yaml b/task/buildpacks/0.4/samples/results.yaml deleted file mode 100644 index 6f0389d..0000000 --- a/task/buildpacks/0.4/samples/results.yaml +++ /dev/null @@ -1,79 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: results-ws-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: results-pipeline-run - labels: - app.kubernetes.io/description: A PipelineRun configured to demonstrate usage of task results. -spec: - pipelineSpec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks - taskRef: - name: buildpacks - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: - - name: SOURCE_SUBPATH - value: apps/ruby-bundler - - name: BUILDER_IMAGE - value: docker.io/cnbs/sample-builder:bionic@sha256:6c03dd604503b59820fd15adbc65c0a077a47e31d404a3dcad190f3179e920b5 - - name: display-results - runAfter: - - buildpacks - taskSpec: - steps: - - name: print - image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 - script: | - #!/usr/bin/env bash - set -e - echo "Digest of created app image: $(params.DIGEST)" - params: - - name: DIGEST - params: - - name: DIGEST - value: $(tasks.buildpacks.results.APP_IMAGE_DIGEST) - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: results-ws-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: results-ws-pvc diff --git a/task/buildpacks/0.4/tests/pre-apply-task-hook.sh b/task/buildpacks/0.4/tests/pre-apply-task-hook.sh deleted file mode 100755 index 219a9a4..0000000 --- a/task/buildpacks/0.4/tests/pre-apply-task-hook.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -# Add an internal registry as sidecar to the task so we can upload it directly -# from our tests without having to go to an external registry. -add_sidecar_registry ${TMPF} - -# Add git-clone -add_task git-clone latest diff --git a/task/buildpacks/0.4/tests/resources.yaml b/task/buildpacks/0.4/tests/resources.yaml deleted file mode 100644 index 30e9d9c..0000000 --- a/task/buildpacks/0.4/tests/resources.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: buildpacks-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi diff --git a/task/buildpacks/0.4/tests/run.yaml b/task/buildpacks/0.4/tests/run.yaml deleted file mode 100644 index b71069b..0000000 --- a/task/buildpacks/0.4/tests/run.yaml +++ /dev/null @@ -1,58 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: buildpacks-test-pipeline -spec: - workspaces: - - name: source-ws - - name: cache-ws - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: source-ws - params: - - name: url - value: https://github.com/buildpacks/samples - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: buildpacks - taskRef: - name: buildpacks - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: source-ws - - name: cache - workspace: cache-ws - params: - - name: APP_IMAGE - value: localhost:5000/buildpacks-app - - name: SOURCE_SUBPATH - value: apps/java-maven - - name: BUILDER_IMAGE - value: cnbs/sample-builder:alpine@sha256:b51367258b3b6fff1fe8f375ecca79dab4339b177efb791e131417a5a4357f42 ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: buildpacks-test-pipeline-run -spec: - pipelineRef: - name: buildpacks-test-pipeline - workspaces: - - name: source-ws - subPath: source - persistentVolumeClaim: - claimName: buildpacks-pvc - - name: cache-ws - subPath: cache - persistentVolumeClaim: - claimName: buildpacks-pvc ---- diff --git a/templates/README.pipeline.tpl.md b/templates/README.pipeline.tpl.md new file mode 100644 index 0000000..d48c889 --- /dev/null +++ b/templates/README.pipeline.tpl.md @@ -0,0 +1,37 @@ +# ${DISPLAY_NAME} + +${SUMMARY} + +## Dependencies + +- [`git-clone` task](https://github.com/tektoncd/catalog/tree/main/task/git-clone) 0.3 or newer +- [`buildpacks` task](https://github.com/tektoncd/catalog/tree/main/task/buildpacks/) 0.3 or newer +- [`buildpacks-phases` task](https://github.com/tektoncd/catalog/tree/main/task/buildpacks-phases/) 0.2 or newer + +## Compatibility + +${COMPATIBILITY} + +## Workspaces + +${WORKSPACES} + +## Parameters + +${PARAMETERS} + +## Builders + +${BUILDERS} + +## Usage + +${SAMPLES} + +## Support + +${SUPPORT} + +## Contributing + +${CONTRIBUTING} diff --git a/templates/README.task.tpl.md b/templates/README.task.tpl.md new file mode 100644 index 0000000..f63362e --- /dev/null +++ b/templates/README.task.tpl.md @@ -0,0 +1,39 @@ +# ${DISPLAY_NAME} + +${SUMMARY} + +## Compatibility + +${COMPATIBILITY} + +## Workspaces + +${WORKSPACES} + +## Parameters + +${PARAMETERS} + +## Results + +${RESULTS} + +## Builders + +${BUILDERS} + +## Platforms + +The Task can be run on `linux/amd64` platform. + +## Usage + +${SAMPLES} + +## Support + +${SUPPORT} + +## Contributing + +${CONTRIBUTING}