1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-25 06:17:50 +00:00
catalog/task/powershell/0.1
Kleber Cabral b3f028ad17 Fix random Usage Sample for PWSH
Fix random Usage Sample for PWSH
2022-02-10 01:10:07 +00: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 Fix random Usage Sample for PWSH 2022-02-10 01:10:07 +00:00

PWSH - Running Powershell Scripts

The following task helps you to run powershell commands.

Install powershell

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/powershell/0.1/powershell.yaml

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