diff --git a/task/buildpacks-separate-phases/0.1/OWNERS b/task/buildpacks-separate-phases/0.1/OWNERS new file mode 100644 index 0000000000..aed476af2b --- /dev/null +++ b/task/buildpacks-separate-phases/0.1/OWNERS @@ -0,0 +1,20 @@ +approvers: +- jkutner +- hone +- nebhale +- sclevine +- ekcasey +- jromero +- ameyer-pivotal +- simonjjones + +reviewers: +- vdemeester +- ImJasonH +- jkutner +- hone +- sclevine +- ekcasey +- jromero +- ameyer-pivotal +- simonjjones \ No newline at end of file diff --git a/task/buildpacks-separate-phases/0.1/README.md b/task/buildpacks-separate-phases/0.1/README.md new file mode 100644 index 0000000000..99b9b2ac9f --- /dev/null +++ b/task/buildpacks-separate-phases/0.1/README.md @@ -0,0 +1,122 @@ +# Cloud Native Buildpacks + +This build template 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. + +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. This command uses a builder to construct the image, and pushes it to the registry provided. + +See also [`buildpacks`](../buildpacks) for the combined version of this task, which uses the [creator binary](https://github.com/buildpacks/spec/blob/platform/0.3/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. + +## Install the Task + +``` +kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/buildpacks-separate-phases/0.1/buildpacks-separate-phases.yaml +``` + +> **NOTE:** This task is currently only compatible with Tekton **v0.11.0** and above, and CNB Platform API 0.3 (lifecycle v0.7.0 and above). For previous Platform API versions, [see below](#previous-platform-api-versions). + +## Parameters + +* **`BUILDER_IMAGE`**: The image on which builds will run. (must include lifecycle and compatible buildpacks; _required_) + +* **`CACHE`**: The name of the persistent app cache volume. (_default:_ an empty directory -- effectively no cache) + +* **`PLATFORM_DIR`**: A directory containing platform provided configuration, such as environment variables. + Files of the format `/platform/env/MY_VAR` with content `my-value` will be translated by the lifecycle into environment variables provided to buildpacks. For more information, see the [buildpacks spec](https://github.com/buildpacks/spec/blob/master/buildpack.md#provided-by-the-platform). (_default:_ an empty directory) + +* **`USER_ID`**: The user ID of the builder image user, as a string value. (_default:_ `"1000"`) + +* **`GROUP_ID`**: The group ID of the builder image user, as a string value. (_default:_ `"1000"`) + +* **`PROCESS_TYPE`**: The default process type to set on the image. (_default:_ `"web"`) + +* **`SOURCE_SUBPATH`**: A subpath within the `source` input where the source to build is located. (_default:_ `""`) + +### Outputs + +* **`image`**: An `image`-type `PipelineResource` specifying the image that should + be built. + +## Workspaces + +The `source` workspace holds the source to build. See `SOURCE_SUBPATH` above if source is located within a subpath of this input. + +## Usage + +This `TaskRun` will use the `buildpacks` task to build the source code, then publish a container image. + +``` +apiVersion: tekton.dev/v1beta1 +kind: TaskRun +metadata: + name: example-run +spec: + taskRef: + name: buildpacks + podTemplate: + volumes: +# Uncomment the lines below to use an existing cache +# - name: my-cache +# persistentVolumeClaim: +# claimName: my-cache-pvc +# Uncomment the lines below to provide a platform directory +# - name: my-platform-dir +# persistentVolumeClaim: +# claimName: my-platform-dir-pvc + params: + - name: SOURCE_SUBPATH + value: + - name: BUILDER_IMAGE + value: +# Uncomment the lines below to use an existing cache +# - name: CACHE +# value: my-cache +# Uncomment the lines below to provide a platform directory +# - name: PLATFORM_DIR +# value: my-platform-dir + resources: + outputs: + - name: image + resourceSpec: + type: image + params: + - name: url + value: + workspaces: + - name: source + persistentVolumeClaim: + claimName: my-source-pvc +``` + +### Example builders +Paketo: +- `gcr.io/paketo-buildpacks/builder:base` → Ubuntu bionic base image with buildpacks for Java, NodeJS and Golang +- `gcr.io/paketo-buildpacks/builder:tiny` → Tiny base image (bionic build image, distroless run image) with buildpacks for Golang +- `gcr.io/paketo-buildpacks/builder:full-cf` → cflinuxfs3 base image with buildpacks for Java, .NET, NodeJS, Golang, PHP, HTTPD and NGINX +> NOTE: The `gcr.io/paketo-buildpacks/builder:full-cf` requires setting the USER_ID and GROUP_ID parameters to 2000, in order to work. + +Heroku: + - `heroku/buildpacks:18` → heroku-18 base image with buildpacks for Ruby, Java, Node.js, Python, Golang, & PHP + +Google: + - `gcr.io/buildpacks/builder:v1` → Ubuntu 18 base image with buildpacks for .NET, Go, Java, Node.js, and Python + +## Previous Platform API Versions + +Use one of the following commands to install 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 implementing the expected platform API). + +### CNB Platform API 0.2 + +Commit: [8c34055](https://github.com/tektoncd/catalog/tree/8c34055ea728413fb72af061e7bcbf1859a9fbd6/buildpacks#inputs) + +``` +kubectl -f https://raw.githubusercontent.com/tektoncd/catalog/8c34055ea728413fb72af061e7bcbf1859a9fbd6/buildpacks/buildpacks-v3.yaml +``` + +### CNB Platform API 0.1 + +Commit: [5c2ab7d6](https://github.com/tektoncd/catalog/tree/5c2ab7d6c3b2507d43b49577d7f1bee9c49ed8ab/buildpacks#inputs) + +``` +kubectl -f https://raw.githubusercontent.com/tektoncd/catalog/5c2ab7d6c3b2507d43b49577d7f1bee9c49ed8ab/buildpacks/buildpacks-v3.yaml +``` diff --git a/task/buildpacks-separate-phases/0.1/buildpacks-separate-phases.yaml b/task/buildpacks-separate-phases/0.1/buildpacks-separate-phases.yaml new file mode 100644 index 0000000000..964da3f921 --- /dev/null +++ b/task/buildpacks-separate-phases/0.1/buildpacks-separate-phases.yaml @@ -0,0 +1,158 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Task +metadata: + name: buildpacks-separate-phases + labels: + app.kubernetes.io/version: "0.1" + annotations: + tekton.dev/pipelines.minVersion: "0.12.1" + tekton.dev/tags: image-build + tekton.dev/displayName: "buildpacks-separate-phases" +spec: + description: >- + The Buildpacks-Separate-Phases task builds source into a container image and pushes it to + a registry, using Cloud Native Buildpacks. This command separately calls the aspects of the + Cloud Native Buildpacks lifecycle, to provide more granular control over the construction of + the image. + + Cloud Native Buildpacks are pluggable, modular tools that transform application source code + into OCI images. They replace Dockerfiles in the app development lifecycle, and allow for swift + rebasing of images, and give modular control over images through the use of builders, among other + benefits. This command uses a builder to construct the image, and pushes it to the registry provided. + + params: + - name: BUILDER_IMAGE + description: The image on which builds will run (must include lifecycle and compatible buildpacks). + - name: CACHE + description: The name of the persistent app cache volume. + default: empty-dir + - name: PLATFORM_DIR + description: The name of the platform directory. + 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" + - name: PROCESS_TYPE + description: The default process type to set on the image. + default: "web" + - name: SOURCE_SUBPATH + description: A subpath within the `source` input where the source to build is located. + default: "" + + resources: + outputs: + - name: image + type: image + + workspaces: + - name: source + + stepTemplate: + env: + - name: CNB_PLATFORM_API + value: "0.3" + + steps: + - name: prepare + image: alpine + imagePullPolicy: Always + command: ["/bin/sh"] + args: + - "-c" + - > + chown -R "$(params.USER_ID):$(params.GROUP_ID)" "/tekton/home" && + chown -R "$(params.USER_ID):$(params.GROUP_ID)" "/layers" && + chown -R "$(params.USER_ID):$(params.GROUP_ID)" "/cache" && + chown -R "$(params.USER_ID):$(params.GROUP_ID)" "$(workspaces.source.path)" + volumeMounts: + - name: layers-dir + mountPath: /layers + - name: $(params.CACHE) + mountPath: /cache + securityContext: + privileged: true + + - 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: analyze + image: $(params.BUILDER_IMAGE) + imagePullPolicy: Always + command: ["/cnb/lifecycle/analyzer"] + args: + - "-layers=/layers" + - "-group=/layers/group.toml" + - "-cache-dir=/cache" + - "$(resources.outputs.image.url)" + volumeMounts: + - name: $(params.CACHE) + mountPath: /cache + - name: layers-dir + mountPath: /layers + + - name: restore + image: $(params.BUILDER_IMAGE) + imagePullPolicy: Always + command: ["/cnb/lifecycle/restorer"] + args: + - "-group=/layers/group.toml" + - "-layers=/layers" + - "-cache-dir=/cache" + volumeMounts: + - name: $(params.CACHE) + mountPath: /cache + - 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: export + image: $(params.BUILDER_IMAGE) + imagePullPolicy: Always + command: ["/cnb/lifecycle/exporter"] + args: + - "-app=$(workspaces.source.path)/$(params.SOURCE_SUBPATH)" + - "-layers=/layers" + - "-group=/layers/group.toml" + - "-cache-dir=/cache" + - "-process-type=$(params.PROCESS_TYPE)" + - "$(resources.outputs.image.url)" + volumeMounts: + - name: layers-dir + mountPath: /layers + - name: $(params.CACHE) + mountPath: /cache + + volumes: + - name: empty-dir + emptyDir: {} + - name: layers-dir + emptyDir: {} diff --git a/task/buildpacks-separate-phases/0.1/tests/pre-apply-task-hook.sh b/task/buildpacks-separate-phases/0.1/tests/pre-apply-task-hook.sh new file mode 100755 index 0000000000..e39fb789ab --- /dev/null +++ b/task/buildpacks-separate-phases/0.1/tests/pre-apply-task-hook.sh @@ -0,0 +1,8 @@ +#!/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 +kubectl -n ${tns} apply -f ./task/git-clone/0.1/git-clone.yaml diff --git a/task/buildpacks-separate-phases/0.1/tests/resources.yaml b/task/buildpacks-separate-phases/0.1/tests/resources.yaml new file mode 100644 index 0000000000..cbb18684ab --- /dev/null +++ b/task/buildpacks-separate-phases/0.1/tests/resources.yaml @@ -0,0 +1,31 @@ +apiVersion: tekton.dev/v1alpha1 +kind: PipelineResource +metadata: + name: buildpacks-app-image +spec: + type: image + params: + - name: url + value: localhost:5000/buildpacks-app +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: buildpacks-source-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 500Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: buildpacks-cache-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 500Mi diff --git a/task/buildpacks-separate-phases/0.1/tests/run.yaml b/task/buildpacks-separate-phases/0.1/tests/run.yaml new file mode 100644 index 0000000000..7a7e9218a5 --- /dev/null +++ b/task/buildpacks-separate-phases/0.1/tests/run.yaml @@ -0,0 +1,65 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: buildpacks-separate-phases-test-pipeline +spec: + workspaces: + - name: shared-workspace + resources: + - name: build-image + type: image + tasks: + - name: fetch-repository + taskRef: + name: git-clone + workspaces: + - name: output + workspace: shared-workspace + params: + - name: url + value: https://github.com/buildpacks/samples + - name: subdirectory + value: "" + - name: deleteExisting + value: "true" + - name: buildpacks + taskRef: + name: buildpacks-separate-phases + runAfter: + - fetch-repository + workspaces: + - name: source + workspace: shared-workspace + params: + - name: SOURCE_SUBPATH + value: apps/java-maven + - name: BUILDER_IMAGE + value: cnbs/sample-builder:alpine-p0.3 + - name: CACHE + value: buildpacks-cache + resources: + outputs: + - name: image + resource: build-image +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + name: buildpacks-test-pipeline-run +spec: + pipelineRef: + name: buildpacks-test-pipeline + workspaces: + - name: shared-workspace + persistentvolumeclaim: + claimName: buildpacks-source-pvc + resources: + - name: build-image + resourceRef: + name: buildpacks-app-image + podTemplate: + volumes: + - name: buildpacks-cache + persistentVolumeClaim: + claimName: buildpacks-cache-pvc diff --git a/task/buildpacks/0.1/README.md b/task/buildpacks/0.1/README.md index d5c77a6407..1cf47d9dd4 100644 --- a/task/buildpacks/0.1/README.md +++ b/task/buildpacks/0.1/README.md @@ -1,16 +1,10 @@ # Cloud Native Buildpacks -This build template builds source into a container image using [Cloud Native -Buildpacks](https://buildpacks.io). +This build template 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. -The Cloud Native Buildpacks website describes buildpacks as: +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. This command uses a builder to construct the image, and pushes it to the registry provided. -> ... pluggable, modular tools that translate source code into container-ready -> artifacts such as OCI images. They replace Dockerfiles in the app development -> lifecycle with a higher level of abstraction. ... Cloud Native Buildpacks -> embrace modern container standards, such as the OCI image format. They take -> advantage of the latest capabilities of these standards, such as remote image -> layer rebasing on Docker API v2 registries. +See also [`buildpacks-separate-phases`](../buildpacks-separate-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.3/platform.md#operations), which coordinates and runs all of the phases). ## Install the Task @@ -26,6 +20,8 @@ kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/ * **`CACHE`**: The name of the persistent app cache volume. (_default:_ an empty directory -- effectively no cache) +* **`CACHE_IMAGE`**: The name of the persistent app cache image. (_default:_ no cache image) + * **`PLATFORM_DIR`**: A directory containing platform provided configuration, such as environment variables. Files of the format `/platform/env/MY_VAR` with content `my-value` will be translated by the lifecycle into environment variables provided to buildpacks. For more information, see the [buildpacks spec](https://github.com/buildpacks/spec/blob/master/buildpack.md#provided-by-the-platform). (_default:_ an empty directory) @@ -35,6 +31,10 @@ kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/ * **`PROCESS_TYPE`**: The default process type to set on the image. (_default:_ `"web"`) +* **`SKIP_RESTORE`**: Do not write layer metadata or restore cached layers. (clear cache between each run) (_default:_ `"false"`) + +* **`RUN_IMAGE`**: Reference to a run image to use. (_default:_ run image of the builder) + * **`SOURCE_SUBPATH`**: A subpath within the `source` input where the source to build is located. (_default:_ `""`) ### Outputs @@ -94,6 +94,11 @@ spec: ``` ### Example builders +Paketo: +- `gcr.io/paketo-buildpacks/builder:base` → Ubuntu bionic base image with buildpacks for Java, NodeJS and Golang +- `gcr.io/paketo-buildpacks/builder:tiny` → Tiny base image (bionic build image, distroless run image) with buildpacks for Golang +- `gcr.io/paketo-buildpacks/builder:full-cf` → cflinuxfs3 base image with buildpacks for Java, .NET, NodeJS, Golang, PHP, HTTPD and NGINX +> NOTE: The `gcr.io/paketo-buildpacks/builder:full-cf` requires setting the USER_ID and GROUP_ID parameters to 2000, in order to work. Heroku: - `heroku/buildpacks:18` → heroku-18 base image with buildpacks for Ruby, Java, Node.js, Python, Golang, & PHP diff --git a/task/buildpacks/0.1/buildpacks.yaml b/task/buildpacks/0.1/buildpacks.yaml index dba2ddea89..bcd10e38e9 100644 --- a/task/buildpacks/0.1/buildpacks.yaml +++ b/task/buildpacks/0.1/buildpacks.yaml @@ -11,14 +11,13 @@ metadata: tekton.dev/displayName: "buildpacks" spec: description: >- - This build template builds source into a container image using Cloud Native Buildpacks. + The Buildpacks task builds source into a container image and pushes it to a registry, + using Cloud Native Buildpacks. - The Cloud Native Buildpacks website describes v3 buildpacks as pluggable, modular tools - that translate source code into container-ready artifacts such as OCI images. They replace - Dockerfiles in the app development lifecycle with a higher level of abstraction. Cloud - Native Buildpacks embrace modern container standards, such as the OCI image format. They take - advantage of the latest capabilities of these standards, such as remote image layer - rebasing on Docker API v2 registries. + Cloud Native Buildpacks are pluggable, modular tools that transform application source code + into OCI images. They replace Dockerfiles in the app development lifecycle, and allow for swift + rebasing of images, and give modular control over images through the use of builders, among other + benefits. This command uses a builder to construct the image, and pushes it to the registry provided. params: - name: BUILDER_IMAGE @@ -26,6 +25,9 @@ spec: - name: CACHE description: The name of the persistent app cache volume. default: empty-dir + - name: CACHE_IMAGE + description: The name of the persistent app cache image. + default: "" - name: PLATFORM_DIR description: The name of the platform directory. default: empty-dir @@ -41,6 +43,15 @@ spec: - name: SOURCE_SUBPATH description: A subpath within the `source` input where the source to build is located. default: "" + - name: SKIP_RESTORE + description: Do not write layer metadata or restore cached layers + default: "false" + - name: RUN_IMAGE + description: Reference to a run image to use + default: "" + # - name: ADDITIONAL_TAGS + # description: Additional space delimited tag(s) to apply to exported image + # default: "" resources: outputs: @@ -54,6 +65,10 @@ spec: env: - name: CNB_PLATFORM_API value: "0.3" + # if [ -n "$(params.ADDITIONAL_TAGS)" ]; then + # params.ADDITIONAL_TAGS=`echo $(params.ADDITIONAL_TAGS) | sed -e 's/ / -tag=/g' -e 's/^/-tag=/'` + # fi + # echo $(params.ADDITIONAL_TAGS) steps: - name: prepare @@ -62,7 +77,7 @@ spec: command: ["/bin/sh"] args: - "-c" - - > + - |- chown -R "$(params.USER_ID):$(params.GROUP_ID)" "/tekton/home" && chown -R "$(params.USER_ID):$(params.GROUP_ID)" "/layers" && chown -R "$(params.USER_ID):$(params.GROUP_ID)" "/cache" && @@ -75,80 +90,31 @@ spec: securityContext: privileged: true - - name: detect + - name: create image: $(params.BUILDER_IMAGE) imagePullPolicy: Always - command: ["/cnb/lifecycle/detector"] + command: ["/cnb/lifecycle/creator"] 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: analyze - image: $(params.BUILDER_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/analyzer"] - args: - - "-layers=/layers" - - "-group=/layers/group.toml" - - "-cache-dir=/cache" - - "$(resources.outputs.image.url)" - volumeMounts: - - name: $(params.CACHE) - mountPath: /cache - - name: layers-dir - mountPath: /layers - - - name: restore - image: $(params.BUILDER_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/restorer"] - args: - - "-group=/layers/group.toml" - - "-layers=/layers" - "-cache-dir=/cache" - volumeMounts: - - name: $(params.CACHE) - mountPath: /cache - - 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: export - image: $(params.BUILDER_IMAGE) - imagePullPolicy: Always - command: ["/cnb/lifecycle/exporter"] - args: - - "-app=$(workspaces.source.path)/$(params.SOURCE_SUBPATH)" + - "-cache-image=$(params.CACHE_IMAGE)" + - "-gid=$(params.GROUP_ID)" - "-layers=/layers" - - "-group=/layers/group.toml" - - "-cache-dir=/cache" + - "-platform=/platform" - "-process-type=$(params.PROCESS_TYPE)" + - "-skip-restore=$(params.SKIP_RESTORE)" + - "-previous-image=$(resources.outputs.image.url)" + - "-run-image=$(params.RUN_IMAGE)" + - "-uid=$(params.USER_ID)" + # - "$(params.ADDITIONAL_TAGS)" - "$(resources.outputs.image.url)" volumeMounts: - name: layers-dir mountPath: /layers - name: $(params.CACHE) mountPath: /cache + - name: $(params.PLATFORM_DIR) + mountPath: /platform volumes: - name: empty-dir diff --git a/task/buildpacks/0.1/tests/pre-apply-task-hook.sh b/task/buildpacks/0.1/tests/pre-apply-task-hook.sh index d810d148ad..e39fb789ab 100755 --- a/task/buildpacks/0.1/tests/pre-apply-task-hook.sh +++ b/task/buildpacks/0.1/tests/pre-apply-task-hook.sh @@ -5,4 +5,4 @@ add_sidecar_registry ${TMPF} # Add git-clone -kubectl -n ${tns} apply -f ./git/git-clone.yaml +kubectl -n ${tns} apply -f ./task/git-clone/0.1/git-clone.yaml