1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00
catalog/task/wget/0.1
Quan Zhang e294e1246b [TEP-0110] Update Tekton Catalog installation instructions
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: https://github.com/tektoncd/hub/pull/539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
2022-08-16 16:25:52 +01:00
..
tests Modifies wget task according to the new reorg proposal 2020-07-10 22:06:57 +01:00
README.md [TEP-0110] Update Tekton Catalog installation instructions 2022-08-16 16:25:52 +01:00
wget.yaml Add platforms annotation to several tasks 2021-10-18 15:35:34 +01:00

wget

This task uses wget to download files from the internet to a workspace .

Install the Task

kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/wget/0.1/raw

Parameters

  • 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: ""
  • ****: The wget docker image to be used. Defaults to mwendler/wget

Platforms

The Task can be run on linux/amd64, linux/s390x, and linux/ppc64le platforms.

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: wget-workspace
      emptyDir: {}

Run it with kubectl apply -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