mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-22 06:02:51 +00:00
.. | ||
tests | ||
README.md | ||
wget.yaml |
wget
This task performs wget operation to download file from internet to workspace .
Install the Task
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/v1beta1/wget/wget.yaml
Parameters
-
mwendler/wget:
wget
CLI container image to run this task. -
options: The arguments to pass to
wget
CLI. default:[""]
-
diroptions: The directory path we want to save file to. default:
[""]
-
url: The url we want to download file from. default:
""
-
filename: The filename we want to change our file to. default:
""
Usage
Running the Task
Download file to the workspace
You can invoke wget url -P workspace
to check if file is downloaded to workspace:
Create a file, wget-run.yaml
:
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: wget-run
spec:
params:
- name: url
value: "www.google.com"
- name: diroptions
value:
- "-P"
taskRef:
name: wget
workspaces:
- name: myworkspace
emptyDir: {}
Run it with kubectl create -f wget-run.yaml
When this runs, it will print logs indicating connecting to the website indicated in url, http request sent and saving a index.html
to the workspace directory