mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-25 06:17:50 +00:00
5a3e5f630f
- Initially all tags were mapped to categories in Hub, for e.g. config.yaml: https://github.com/tektoncd/hub/blob/master/config.yaml, so whenever a new tag was added in a task it was mapped to a category called `others`. Hence before every release we had to manually map these new tags to some category, hence after the discussion in Catalog and Hub WG, a proposal was created for adding a category as an annotation. - PR to update the TEP-0003-Tekton Catalog Organization: https://github.com/tektoncd/community/pull/352 Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com> |
||
---|---|---|
.. | ||
tests | ||
README.md | ||
write-file.yaml |
Write a file to a workspace
This task can be used to write a file onto the output workspace. Use parameter expansion to insert variable content into the written file. It can also set specific permissions on the file.
Install the Task
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/write-file/0.1/write-file.yaml
Parameters
- path: Relative path to create within the workspace. Directories will be created as necessary.
- mode: chmod-style mode string to apply to the file. Note that mode will not be applied to created directories.
- contents: Contents of the file to create. Note that octal numbers need quoting in YAML.
Usage
This example task generates a random password from the pipeline run's unique id.
- name: output-credentials
taskRef:
name: write-file
kind: Task
workspaces:
- name: output
workspace: shared-workspace
params:
- name: path
value: ./config/login.ini
- name: mode
value: "0400"
- name: contents
value: |
[credentials]
user = ze-user
password = $(context.pipelineRun.uid)