diff --git a/task/ansible-runner/0.1/README.md b/task/ansible-runner/0.1/README.md index 81a66a051f..4d71553bdf 100644 --- a/task/ansible-runner/0.1/README.md +++ b/task/ansible-runner/0.1/README.md @@ -20,6 +20,7 @@ tkn task ls * **project-dir**: The ansible-runner private data dir * **args:**: The array of arguments to pass to the runner command (_default:_ --help) +* **user-home**: Absolute path to the user's home directory. (_default:_ /tekton/home) ## Workspaces diff --git a/task/ansible-runner/0.1/ansible-runner.yaml b/task/ansible-runner/0.1/ansible-runner.yaml index 3a58a573ba..9616d2f513 100644 --- a/task/ansible-runner/0.1/ansible-runner.yaml +++ b/task/ansible-runner/0.1/ansible-runner.yaml @@ -27,6 +27,13 @@ spec: type: array default: - --help + - name: user-home + description: Absolute path to the user's home directory. + default: /tekton/home + stepTemplate: + env: + - name: HOME + value: $(params.user-home) steps: - name: requirements image: docker.io/ansible/ansible-runner:1.4.6@sha256:bd09ef403f2f90f2c6bd133d7533e939058903f69223c5f12557a49e3aed14bb #tag: 1.4.6 diff --git a/task/buildpacks-phases/0.1/README.md b/task/buildpacks-phases/0.1/README.md index a36c2e705b..052efc728a 100644 --- a/task/buildpacks-phases/0.1/README.md +++ b/task/buildpacks-phases/0.1/README.md @@ -34,6 +34,8 @@ kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/bu * **`SOURCE_SUBPATH`**: A subpath within the `source` input where the source to build is located. (_default:_ `""`) +* **`USER_HOME`**: Absolute path to the user's home directory. (_default:_ `/tekton/home`) + ### Outputs * **`image`**: An `image`-type `PipelineResource` specifying the image that should diff --git a/task/buildpacks-phases/0.1/buildpacks-phases.yaml b/task/buildpacks-phases/0.1/buildpacks-phases.yaml index 5c0b737555..9db1d043ee 100644 --- a/task/buildpacks-phases/0.1/buildpacks-phases.yaml +++ b/task/buildpacks-phases/0.1/buildpacks-phases.yaml @@ -42,6 +42,9 @@ spec: - name: SOURCE_SUBPATH description: A subpath within the `source` input where the source to build is located. default: "" + - name: USER_HOME + description: Absolute path to the user's home directory. + default: /tekton/home resources: outputs: @@ -55,6 +58,8 @@ spec: env: - name: CNB_PLATFORM_API value: "0.3" + - name: HOME + value: $(params.USER_HOME) steps: # Ensure the builder's user has read/write permissions for needed directories. diff --git a/task/buildpacks-phases/0.2/README.md b/task/buildpacks-phases/0.2/README.md index c55cd03ac2..fc8494e055 100644 --- a/task/buildpacks-phases/0.2/README.md +++ b/task/buildpacks-phases/0.2/README.md @@ -40,6 +40,7 @@ kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/ - **`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. (_default:_ `/tekton/home`) ## Builders diff --git a/task/buildpacks-phases/0.2/buildpacks-phases.yaml b/task/buildpacks-phases/0.2/buildpacks-phases.yaml index eff6e14d35..4456493765 100644 --- a/task/buildpacks-phases/0.2/buildpacks-phases.yaml +++ b/task/buildpacks-phases/0.2/buildpacks-phases.yaml @@ -55,6 +55,9 @@ spec: - 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 @@ -64,6 +67,8 @@ spec: env: - name: CNB_PLATFORM_API value: "0.4" + - name: HOME + value: $(params.USER_HOME) steps: - name: prepare diff --git a/task/git-clone/0.1/README.md b/task/git-clone/0.1/README.md index 50fa098325..0de261874b 100644 --- a/task/git-clone/0.1/README.md +++ b/task/git-clone/0.1/README.md @@ -39,6 +39,7 @@ as well as * **httpProxy**: git HTTP proxy server for non-SSL requests * **httpsProxy**: git HTTPS proxy server for SSL requests * **noProxy**: git no proxy - opt out of proxying HTTP/HTTPS requests +* **userHome**: The user's home directory. Set this explicitly if you are running the image as a non-root user. (_default_: "/tekton/home") ### Results diff --git a/task/git-clone/0.1/git-clone.yaml b/task/git-clone/0.1/git-clone.yaml index 551feabd6d..8739b78398 100644 --- a/task/git-clone/0.1/git-clone.yaml +++ b/task/git-clone/0.1/git-clone.yaml @@ -68,9 +68,19 @@ spec: description: The image used where the git-init binary is. default: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.15.2" type: string + - name: userHome + description: | + Absolute path to the user's home directory. Set this explicitly if you are running the image as a non-root user or have overridden + the gitInitImage param with an image containing custom user configuration. + type: string + default: "/tekton/home" results: - name: commit description: The precise commit SHA that was fetched by this Task + stepTemplate: + env: + - name: HOME + value: "$(params.userHome)" steps: - name: clone image: $(params.gitInitImage) diff --git a/task/git-clone/0.4/git-clone.yaml b/task/git-clone/0.4/git-clone.yaml index b319c56297..9ebd67dae5 100644 --- a/task/git-clone/0.4/git-clone.yaml +++ b/task/git-clone/0.4/git-clone.yaml @@ -97,7 +97,7 @@ spec: Absolute path to the user's home directory. Set this explicitly if you are running the image as a non-root user or have overridden the gitInitImage param with an image containing custom user configuration. type: string - default: "/root" + default: "/tekton/home" results: - name: commit description: The precise commit SHA that was fetched by this Task. diff --git a/task/orka-deploy/0.1/orka-deploy.yaml b/task/orka-deploy/0.1/orka-deploy.yaml index a3b51b996a..c2c0c5393a 100644 --- a/task/orka-deploy/0.1/orka-deploy.yaml +++ b/task/orka-deploy/0.1/orka-deploy.yaml @@ -88,6 +88,15 @@ spec: description: | The name of the key in the VM name config map, which stores the name of the generated VM configuration. default: vm-name + - name: user-home + type: string + default: /tekton/home + description: Absolute path to the user's home directory. + stepTemplate: + env: + - name: HOME + value: $(params.user-home) + workingDir: /workspace steps: - name: copy-script image: docker.io/macstadium/orka-tekton-runner:2020-10-23-a93757dc-0.1@sha256:e8ed3370dcb91cdb8bcd4e9a7e9f6652879d80acdab9644cda69a98cd8c93339 diff --git a/task/orka-full/0.1/orka-full.yaml b/task/orka-full/0.1/orka-full.yaml index 6fd9863cc2..78c30f7f7f 100644 --- a/task/orka-full/0.1/orka-full.yaml +++ b/task/orka-full/0.1/orka-full.yaml @@ -91,6 +91,15 @@ spec: If ssh-key is true, this parameter should specify the name of the key in the VM SSH credentials secret that holds the private SSH key. default: password + - name: user-home + type: string + default: /tekton/home + description: Absolute path to the user's home directory. + stepTemplate: + env: + - name: HOME + value: $(params.user-home) + workingDir: /workspace steps: - name: copy-script image: docker.io/macstadium/orka-tekton-runner:2020-10-23-a93757dc-0.1@sha256:e8ed3370dcb91cdb8bcd4e9a7e9f6652879d80acdab9644cda69a98cd8c93339