1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/powershell/0.1/powershell.yaml
Yulia Gaponenko f4708d478e Add linux/amd64 platform annotation to the rest of the tasks
At this moment all tasks which can be executed on linux/s390x or
linux/ppc64le are tested and labelled accordingly.
The rest of the tasks can be labelled as `linux/amd64`, which
is default platform and where tasks are already tested via
default PR testing cycle.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-10-29 17:08:38 +01:00

38 lines
1.1 KiB
YAML

---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: powershell
labels:
app.kubernetes.io/version: "0.1"
annotations:
tekton.dev/categories: CLI
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: powershell, pwsh
tekton.dev/displayName: powershell
tekton.dev/platforms: "linux/amd64"
spec:
description: >-
This task will run powershell commands
params:
- name: tag
description: The tag for the Powershell image
type: string
default: "latest"
- name: command
description: The Powershell command
type: string
default: "Write-Output 'Please use command parameter to enter'"
- name: verbose
description: Verbosity level for command
type: string
default: "SilentlyContinue"
steps:
- name: invoke-script
image: mcr.microsoft.com/powershell:$(params.tag)
script: |
#!/usr/bin/env pwsh
$VerbosePreference = "$(params.verbose)"
$command = "$(params.command)"
Write-Verbose -Message "Received command:`n$command"
Invoke-Expression -Command $command