mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-25 06:17:50 +00:00
b3f028ad17
Fix random Usage Sample for PWSH |
||
---|---|---|
.. | ||
tests | ||
powershell.yaml | ||
README.md |
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