PowerShell - Usage

JFrog Pipelines Documentation

Products
JFrog Pipelines
Content Type
User Guide
ft:sourceType
Paligo

The YAML schema for PowerShell native step is as shown below. For more information on PowerShell Pipeline steps, see PowerShell.

PowerShell

pipelines:
  - name:                       <string>
    steps:
      - name:           <string>
        type:           PowerShell
        configuration:
          affinityGroup:        bldGroup 
          priority:             <[0-10000]>
          timeoutSeconds:       <job timeout limit>
          nodePool:             <name of the nodePool>
          chronological:        <true/false>
          environmentVariables:
            env1:                       <string>
            env2:                       <string>
            env3:
              default:      <string>
              description:  <string>
              values:       <array>
              allowCustom:  <true/false>
          integrations:
            - name:             <integration name>
          inputSteps:
            - name:             <step name>
          inputResources:
            - name:             <resource name>
              trigger:          <true/false>    # default true
              branch:       <string>        # see description of defaults below
          outputResources:
            - name:             <resource name>
              branch:       <string>        # see description of defaults below
          runtime:            
            type:                       <image/host>
            image:
              auto:
                language:
                versions:
              custom:
                name:
                tag:
                options:
                registry:          <integration>   # optional integration for a private registry
                sourceRepository:  <path>          # required if registry is Artifactory. e.g. docker-local
                region:                            # required if registry is AWS. e.g. us-east-1
                autoPull:       <true/false>             # default true; pulls image before run

        execution:
          onStart:
            - echo "Preparing for work..."
          onExecute:
            - echo "executing task command 1"
            - echo "executing task command 2"
          onSuccess:
            - echo "Job well done!"
          onFailure:
            - echo "uh oh, something went wrong"
          onComplete: #always
            - echo "Cleaning up some stuff"