1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/powershell/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 Powershell task added 2021-01-07 14:08:12 +00:00
powershell.yaml Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +01:00
README.md [TEP-0110] Update Tekton Catalog installation instructions 2022-08-16 16:25:52 +01:00

PWSH - Running Powershell Scripts

The following task helps you to run powershell commands.

Install powershell

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

Parameters

  • tag: the tag used for the mcr.microsoft.com/powershell image (default: latest)
  • command: Powershell command
  • verbose: Verbosity level for command (default: SilentlyContinue)

Platforms

The Task can be run on linux/amd64 platform.

Usage

This TaskRun runs Write-Output 'Hello World' command using latest powershell image and verbose logs enabled.

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: example-powershell
spec:
  taskRef:
    name: powershell
  params:
    - name: command
      value: "Write-Output 'Hello World'; `$random = get-random -Minimum 0 -Maximum 100; write-output 'Created this number for you' `$random"
    - name: tag
      value: latest
    - name: verbose
      value: Continue