1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00
catalog/task/powershell/0.1
PuneetPunamiya 5a3e5f630f Adds category field as an annotation as tekton.dev/categories
- Initially all tags were mapped to categories in Hub,
     for e.g. config.yaml: https://github.com/tektoncd/hub/blob/master/config.yaml,
     so whenever a new tag was added in a task it was mapped to a category called `others`.
     Hence before every release we had to manually map these new tags to some category,
     hence after the discussion in Catalog and Hub WG, a proposal was created for adding
     a category as an annotation.

   - PR to update the TEP-0003-Tekton Catalog Organization: https://github.com/tektoncd/community/pull/352

Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2021-07-26 13:15:08 +01:00
..
tests Powershell task added 2021-01-07 14:08:12 +00:00
powershell.yaml Adds category field as an annotation as tekton.dev/categories 2021-07-26 13:15:08 +01:00
README.md Update self reference from master to main 🧙 2021-03-19 11:09:49 +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)

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