<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
- Licensed Materials - Property of IBM* and/or HCL**
- UrbanCode Deploy
- (c) Copyright IBM Corporation 2011, 2017. All Rights Reserved.
- (c) Copyright HCL Technologies Ltd. 2020. All Rights Reserved.
-
- U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by
- GSA ADP Schedule Contract with IBM Corp.
-
- * Trademark of International Business Machines
- ** Trademark of HCL Technologies Limited
-->

<plugin xmlns="http://www.urbancode.com/PluginXMLSchema_v1"
        xmlns:server="http://www.urbancode.com/PluginServerXMLSchema_v1"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <header>
    <identifier id="com.urbancode.air.plugin.openshift" name="OpenShift" version="26"/>
    <description>
      This plug-in includes steps to work with application stacks in Red Hat OpenShift.
    </description>
    <tag>Cloud/OpenShift</tag>
  </header>
  <step-type name="Deploy">
    <description>(Deprecated)Start, cancel, retry or view a deployment on an OpenShift server.</description>
    <properties>
      <property name="config" required="true">
        <property-ui type="textBox"
                     label="Deployment Config"
                     description="The deployment configuration to use."/>
      </property>
      <property name="type">
        <property-ui type="selectBox"
                     label="Deployment Action"
                     description="Select deployment action."/>
        <value label="New Deployment">latest</value>
        <value label="Retry Last Failed Deployment">retry</value>
        <value label="Cancel Any In-Progress Deployment">cancel</value>
        <value label="Enable All Image Triggers For Deployment Config">triggers</value>
        <value label="View Last Deployment">history</value>
      </property>
      <property name="flags">
        <property-ui type="textAreaBox"
                     label="Step Flags"
                     description="A list of flags to set when running the deploy command. Specify each flag on a new line."/>
      </property>
      <property name="project">
        <property-ui type="textBox"
                     label="Project"
                     description="The OpenShift project that contains the application to run the deployment on."/>
      </property>
      <property name="url">
        <property-ui type="textBox"
                     label="OpenShift URL"
                     description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
      </property>
      <property name="username">
        <property-ui type="textBox"
                     label="User Name"
                     description="The user name to access the OpenShift server."/>
      </property>
      <property name="token">
        <property-ui type="secureBox"
                     label="Access Token"
                     description="The token used to authenticate with the OpenShift API server.  You can use either this property or the User Name and Password properties to authenticate with the server."/>
      </property>
      <property name="insecure">
        <property-ui type="checkBox" hidden="true"
                     label="Skip TLS Verification"
                     default-value="false"
                     description="If selected, the server certificate is not checked for validity. HTTPS connections are not
                                  secure."/>
      </property>
      <property name="home">
        <property-ui type="textBox" hidden="true"
                     label="oc Path"
                     description="The name of the oc command if it is in the system path or the full path to run the
                                  oc command."/>
      </property>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp"/>
      <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
      <arg file="deploy.groovy"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>

  <step-type name="Rollout">
    <description>Start a new rollout, view its status or history, rollback to a previous revision of your app.</description>
    <properties>
      <property name="config" required="true">
        <property-ui type="textBox"
                     label="Deployment Config or Name"
                     description="The deployment configuration or the name of a deployment depending on the rollout type to use."/>
      </property>
      <property name="type">
        <property-ui type="selectBox"
                     label="Rollout type"
                     description="Select a rollout subcommand."/>
        <value label="cancel">cancel</value>
        <value label="history">history</value>
        <value label="latest">latest</value>
        <value label="pause">pause</value>
        <value label="resume">resume</value>
        <value label="retry">retry</value>
        <value label="restart">restart</value>
        <value label="status">status</value>
        <value label="undo">undo</value>
      </property>
      <property name="flags">
        <property-ui type="textAreaBox"
                     label="Step Flags"
                     description="A list of flags to set when running the rollout command. Specify each flag on a new line."/>
      </property>
      <property name="project">
        <property-ui type="textBox"
                     label="Project"
                     description="The OpenShift project that contains the application to run the deployment on."/>
      </property>
      <property name="url">
        <property-ui type="textBox"
                     label="OpenShift URL"
                     description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
      </property>
      <property name="username">
        <property-ui type="textBox"
                     label="User Name"
                     description="The user name to authenicate with the OpenShift server."/>
      </property>
      <property name="token">
        <property-ui type="secureBox"
                     label="Access Token"
                     description="The token to authenicate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server"/>
      </property>
      <property name="insecure">
        <property-ui type="checkBox" hidden="true"
                     label="Skip TLS Verification"
                     default-value="false"
                     description="Select to not check the server certificate for validity. HTTPS connections are not
                                  secure."/>
      </property>
      <property name="home">
        <property-ui type="textBox" hidden="true"
                     label="oc Path"
                     description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
      </property>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp"/>
      <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
      <arg file="rollout.groovy"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>

  <step-type name="Apply">
    <description>Apply a configuration to a resource by filename.</description>
    <properties>
      <property name="filename" required="true">
        <property-ui type="textBox"
                     label="File Name"
                     description="The file to be applied. If a directory is specified, all files in that directory are applied."/>
      </property>
      <property name="flags">
        <property-ui type="textAreaBox"
                     label="Step Flags"
                     description="A list of flags to set when running the apply process. For example:
                                  --force=false. Specify each flag on a new line."/>
      </property>
      <property name="project">
        <property-ui type="textBox"
                     label="Project"
                     description="The OpenShift project where the resource is applied."/>
      </property>
      <property name="url">
        <property-ui type="textBox"
                     label="OpenShift URL"
                     description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
      </property>
      <property name="username">
        <property-ui type="textBox"
                     label="User Name"
                     description="The user name to authenicate with the OpenShift server."/>
      </property>
      <property name="token">
        <property-ui type="secureBox"
                     label="Access Token"
                     description="The token  used to authenicate with the OpenShift API server. CYou can use either this property or the User Name and Password properties to authenticate with the server."/>
      </property>
      <property name="insecure">
        <property-ui type="checkBox" hidden="true"
                     label="Skip TLS Verification"
                     default-value="false"
                     description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
      </property>
      <property name="home">
        <property-ui type="textBox" hidden="true"
                     label="oc Path"
                     description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
      </property>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp"/>
      <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
      <arg file="apply.groovy"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>

    <step-type name="Create Object From Template">
        <description>Create object on OpenShift server from a JSON template.</description>
        <properties>
            <property name="template" required="true">
                <property-ui type="textBox"
                             label="Template"
                             description="The fully-qualified path to the template JSON file to be used to create the object."/>
            </property>
            <property name="parameter">
                <property-ui type="textBox"
                             label="Parameter File"
                             description="The fully-qualified path of a newline-separated parameter file."/>
            </property>
            <property name="useApplyOrCreate">
                <property-ui type="textBox"
                             label="Do you want to use 'apply' or 'create'?"
                             description="Specify create to create the configuration if it does not exist. An error is displayed if the 
					  create is specified and the configuration already exists. Specify apply to update the configuration. The default value is apply. For more details, see the Openshift/Kubernetes documentation."
                             default-value="apply"/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the create object from template command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to run the deployment on."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name to access the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="createFromTemplate.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>

  <step-type name="Replace DeploymentConfig">
    <description>Using a new deployment configuration for an existing application in OpenShift.</description>
    <properties>
      <property name="config" required="true">
        <property-ui type="textBox"
                      label="Deployment Config"
                      description="The name of the current deployment configuration."/>
      </property>
      <property name="configJSON" required="true">
          <property-ui type="textAreaBox"
                       label="New Deployment Config JSON"
                       description="The JSON or the fully-qualified path to the JSON file for the new deployment configuration to use."/>
      </property>
      <property name="project">
        <property-ui type="textBox"
                     label="Project"
                     description="The OpenShift project that contains the application to run the deployment on."/>
      </property>
      <property name="url">
         <property-ui type="textBox"
                      label="OpenShift URL"
                      description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
      </property>
        <property name="username">
            <property-ui type="textBox"
                         label="User Name"
                         description="The user name to authenicate with the OpenShift server."/>
        </property>
        <property name="password">
            <property-ui type="secureBox"
                         label="Password"
                         description="The password to authenicate with the OpenShift server."/>
        </property>
        <property name="token">
            <property-ui type="secureBox"
                         label="Access Token"
                         description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
        </property>
      <property name="disableCerts">
        <property-ui type="checkBox"
                     hidden="true"
                     label="Disable Certificate Validation"
                     default-value="false"
                     description="Select to disable certificate validation."/>
      </property>
        <property name="insecure">
            <property-ui type="checkBox" hidden="true"
                         label="Skip TLS Verification"
                         default-value="false"
                         description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
        </property>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/log4j-api.jar:lib/log4j-1.2-api.jar:lib/log4j-core.jar:lib/HttpComponents-Util.jar:lib/httpclient.jar:lib/httpcore.jar:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="replaceConfig.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>

    <step-type name="Create Secret">
        <description>Create secret in OpenShift.</description>
        <properties>
            <property name="secretJSON" required="true">
                <property-ui type="textAreaBox"
                             label="Secret JSON"
                             description="A JSON string or the fully-qualified path to the JSON file containing the JSON for the secret to be created."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to run the deployment on."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenicate with the OpenShift server."/>
            </property>
            <property name="password">
                <property-ui type="secureBox"
                             label="Password"
                             description="The password used to authenicate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="disableCerts">
                <property-ui type="checkBox"
                             hidden="true"
                             label="Disable Certificate Validation"
                             default-value="false"
                             description="Select to disable certificate validation."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/log4j-api.jar:lib/log4j-1.2-api.jar:lib/log4j-core.jar:lib/HttpComponents-Util.jar:lib/httpclient.jar:lib/httpcore.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="createSecret.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>

    <step-type name="Patch Secret">
        <description>Patch secret in OpenShift.</description>
        <properties>
            <property name="serviceAccount" required="true">
                <property-ui type="textBox"
                             label="ServiceAccount Name"
                             description="The name of ServiceAccount to create secret for."/>
            </property>
            <property name="pullSecrets" required="false">
                <property-ui type="textAreaBox"
                             label="Pull Secrets"
                             description="A list of pull secrets to patch. Specify each list item on a new line. At least one Secrets field must be specified."/>
            </property>
            <property name="appSecrets" required="false">
                <property-ui type="textAreaBox"
                             label="App Secrets"
                             description="A list of app secrets to patch. Specify each list item on a new line. At least one Secrets field must be specified."/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the patch secret command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to run the deployment on."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenicate with the OpenShift server."/>
            </property>
            <property name="password">
                <property-ui type="secureBox"
                             label="Password"
                             description="The password used to authenticate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="disableCerts">
                <property-ui type="checkBox"
                             hidden="true"
                             label="Disable Certificate Validation"
                             default-value="false"
                             description="Select to disable certificate validation."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/log4j-api.jar:lib/log4j-1.2-api.jar:lib/log4j-core.jar:lib/securedata.jar:lib/HttpComponents-Util.jar:lib/httpclient.jar:lib/httpcore.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="patchSecret.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>

    <step-type name="Patch DeploymentConfig">
        <description>Patch/Update a Deployment Config.</description>
        <properties>
            <property name="config" required="true">
                <property-ui type="textBox"
                             label="Deployment Config"
                             description="The name of the current deployment configuration."/>
            </property>
            <property name="patchJSON" required="true">
                <property-ui type="textAreaBox"
                             label="Patch JSON"
                             description="The JSON or the fully-qualified path to the JSON file containing the JSON to be used."/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the patch deployment config command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to run the deployment on."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
        <property name="username">
            <property-ui type="textBox"
                         label="User Name"
                         description="The user name used to authenicate with the OpenShift server."/>
        </property>
        <property name="token">
            <property-ui type="secureBox"
                         label="Access Token"
                         description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
        </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
							 default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="patch.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>

  <step-type name="Rollback">
    <description>Roll back an application to a previous deployment.</description>
    <properties>
      <property name="deployment" required="true">
        <property-ui type="textBox"
                     label="Deployment Name/Config"
                     description="The name of the previous deployment or deployment configuration to roll back to."/>
      </property>
      <property name="version">
        <property-ui type="textBox"
                     label="Version"
                     description="The specific configuration version to roll back to. Leave blank to roll back to the last
                                  successfully completed deployment. This field is ignored when rolling back to a deployment
                                  instead of a deployment config."/>
      </property>
      <property name="scaling">
        <property-ui type="checkBox"
                     label="Change Scaling Settings"
                     description="Include the replication controller replica count and selector of the previous deployment in the
                                  rollback."/>
      </property>
      <property name="strategy">
        <property-ui type="checkBox"
                     label="Change Strategy"
                     description="Include the strategy of the previous deployment in the rollback."/>
      </property>
      <property name="triggers">
        <property-ui type="checkBox"
                     label="Change Triggers"
                     description="Include the triggers of the previous deployment in the rollback."/>
      </property>
      <property name="flags">
        <property-ui type="textAreaBox"
                     label="Step Flags"
                     description="A list of flags to set when running the rollback command. Specify each flag on a new line."/>
      </property>
      <property name="project">
        <property-ui type="textBox"
                     label="Project"
                     description="The OpenShift project that contains the application to run the roll back on."/>
      </property>
      <property name="url">
        <property-ui type="textBox"
                     label="OpenShift URL"
                     description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
      </property>
      <property name="username">
        <property-ui type="textBox"
                     label="User Name"
                     description="The user name used to authenicate with the OpenShift server."/>
      </property>
      <property name="token">
        <property-ui type="secureBox"
                     label="Access Token"
                     description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
      </property>
      <property name="insecure">
        <property-ui type="checkBox" hidden="true"
                     label="Skip TLS Verification"
                     default-value="false"
                     description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
      </property>
      <property name="home">
        <property-ui type="textBox" hidden="true"
                     label="oc Path"
                     description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
      </property>
      <property name="dryrun">
        <property-ui type="checkBox"
                     hidden="true"
                     label="Dry Run"
                     description="Do not roll back. Instead, display a description of the rollback. The value specified for this property overrrides the value specified
				  on the Output property."/>
      </property>
      <property name="output">
        <property-ui type="selectBox"
                     hidden="true"
                     label="Output"
                     description="Do not roll back. Instead, display the updated deployment configuration in the specified
                                  format. The value specified for the Dry Run property overrides the value specified for this property."/>
        <value label="None">none</value>
        <value label="JSON">json</value>
        <value label="YAML">yaml</value>
        <value label="Name">name</value>
      </property>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp"/>
      <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
      <arg file="rollback.groovy"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
  </command>
  </step-type>
  <step-type name="Scale">
    <description>Set a new size for a deployment or replication controller.</description>
    <properties>
      <property name="type" required="true">
        <property-ui type="selectBox"
                     label="Resource Type"
                     description="The type of resource to scale in OpenShift."/>
        <value label="Deployment">deploy</value>
        <value label="Replication Controller">replicationcontrollers</value>
        <value label="Stateful Set">sts</value>
      </property>
      <property name="name" required="true">
        <property-ui type="textBox"
                     label="Resource Name"
                     description="The name of the resource to scale in OpenShift."/>
      </property>
      <property name="replicas" required="true">
        <property-ui type="textBox"
                     label="Number of Replicas"
                     description="The number of replicas to scale to."/>
      </property>
      <property name="flags">
        <property-ui type="textAreaBox"
                     label="Step Flags"
                     description="A list of flags to set when running the scale command. Specify each flag on a new line."/>
      </property>
      <property name="project">
        <property-ui type="textBox"
                     label="Project"
                     description="The OpenShift project that contains the application to scale."/>
      </property>
      <property name="url">
        <property-ui type="textBox"
                     label="OpenShift URL"
                     description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
      </property>
      <property name="username">
        <property-ui type="textBox"
                     label="User Name"
                     description="The user name to access the OpenShift server."/>
      </property>
      <property name="token">
        <property-ui type="secureBox"
                     label="Access Token"
                     description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
      </property>
      <property name="insecure">
        <property-ui type="checkBox" hidden="true"
                     label="Skip TLS Verification"
                     default-value="false"
                     description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
      </property>
      <property name="home">
        <property-ui type="textBox" hidden="true"
                     label="oc Path"
                     description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
      </property>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp"/>
      <arg path="classes:lib/commons-lang3.jar:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
      <arg file="scale.groovy"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>
  <step-type name="Add Tag">
    <description>Tag existing images into image streams.</description>
    <properties>
      <property name="source" required="true">
        <property-ui type="textBox"
                     label="Source Name"
                     description="The name of the source to tag. For example: &lt;namespace&gt;/&lt;stream_name&gt;:&lt;tag&gt;,
                                  &lt;name&gt;@&lt;id&gt;"/>
      </property>
      <property name="dest" required="true">
        <property-ui type="textBox"
                     label="Destination Names"
                     description="The image streams to tag. Separate multiple image streams with space characters. Use the
                                  following format: &lt;namespace&gt;/&lt;stream_name &gt;:&lt;tag&gt;"/>
      </property>
      <property name="alias">
        <property-ui type="checkBox"
                     label="Keep Updated"
                     description="Select to update the destination tag each time the source tag changes."/>
      </property>
      <property name="type">
        <property-ui type="selectBox"
                     label="Source Type"
                     description="Specify a source type to use."/>
        <value label="Automatically Detect">none</value>
        <value label="ImageStream Tag">istag</value>
        <value label="ImageStream Image">isimage</value>
        <value label="Docker Image">docker</value>
      </property>
      <property name="flags">
        <property-ui type="textAreaBox"
                     label="Step Flags"
                     description="A list of flags to set when running the add tag command. Specify each flag on a new line."/>
      </property>
      <property name="project">
        <property-ui type="textBox"
                     label="Project"
                     description="The OpenShift project that contains the resource to tag."/>
      </property>
      <property name="url">
        <property-ui type="textBox"
                     label="OpenShift URL"
                     description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
      </property>
      <property name="username">
        <property-ui type="textBox"
                     label="User Name"
                     description="The user name used to authenicate with the OpenShift server."/>
      </property>
      <property name="token">
        <property-ui type="secureBox"
                     label="Access Token"
                     description="The token used to authenicate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
      </property>
      <property name="insecure">
        <property-ui type="checkBox" hidden="true"
                     label="Skip TLS Verification"
                     default-value="false"
                     description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
      </property>
      <property name="home">
        <property-ui type="textBox" hidden="true"
                     label="oc Path"
                     description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
      </property>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp"/>
      <arg path="classes:lib/commons-lang3.jar:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
      <arg file="tag.groovy"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>

    <step-type name="Create New-App">
        <description>Create a new application by specifying source code, templates, and/or images.</description>
        <properties>
            <property name="source">
                <property-ui type="textBox"
                             label="Source"
                             description="The source code path, source code repository URL, template, image or image stream"/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the new-app command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to run the deployment on."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenicate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="createNewApp.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>

    <step-type name="Set Triggers">
        <description>Set or remove triggers</description>
        <properties>
            <property name="resourceAndObjects" required="true">
                <property-ui type="textAreaBox"
                             label="RESOURCE/NAME"
                             description="A list of resource type/object name to be specified in the format as shown in the label. Specify each list item on a new line."/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the set triggers command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to set/update the triggers."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenticate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="setTriggers.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>

    <step-type name="Set Image">
        <description>Update existing container images of resources</description>
        <properties>
            <property name="resourceAndObjects">
                <property-ui type="textAreaBox"
                             label="RESOURCE/NAME"
                             description="A list of resource type and object name pair. Specify each pair in the format: resource/name. Specify each list item on a new line."/>
            </property>
            <property name="resources">
                <property-ui type="textBox"
                             label="RESOURCES"
                             description="A list of resource types to be specified in the format resource1,resource2,...resourcex."/>
            </property>
            <property name="containerAndImage">
                <property-ui type="textAreaBox"
                             label="CONTAINER_NAME=IMAGE_NAME"
                             description="A list of container and assocaited image name. Specify each pair in the format: container_name=image_name. Specify each list item on a new line.
                                  You can update image of all containers with *=image_name."/>
            </property>
            <property name="path">
                <property-ui type="textBox"
                             label="File Path"
                             description="The filename, directory, or URL to files used to identify the resource to obtain from the server."/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the set image command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to update the image."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenticate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="setImage.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
    <step-type name="Set Env">
        <description>Update environment variables on a pod template or a build config</description>
        <properties>
            <property name="resourceAndObjects">
                <property-ui type="textAreaBox"
                             label="RESOURCE/NAME"
                             description="A list of resource type and associated object name pairs. Specify each pair in the format resource_type/name on a new line."/>
            </property>
            <property name="resources">
                <property-ui type="textBox"
                             label="RESOURCES"
                             description="A list of resource types, separate each resource type with a comma. For example: resource1,resource2,...resourex."/>
            </property>
            <property name="keyAndVals">
                <property-ui type="textAreaBox"
                             label="KEY=VALUE/KEY-"
                             description="A list of keys and associated value. Specify each list item in the format key=value on a new line.
                                  You can remove the environment variable with KEY-." />
            </property>
            <property name="path">
                <property-ui type="textBox"
                             label="File Path"
                             description="The filename, directory, or URL to files to use to edit the resource."/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the set env command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to update the environment."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenticate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="setEnv.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
    <step-type name="New Build">
        <description>Create a new build by specifying source code</description>
        <properties>
            <property name="sourceCodeImagePath">
                <property-ui type="textBox"
                             label="Sourcecode/Image path"
                             description="The sourcecode used to create the build. It can be a combination of image~sourcecode"/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the new-build command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to create a new build."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenicate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="newBuild.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
    <step-type name="Start Build">
        <description>Start a new build for the provided build configuration or copy an existing build.</description>
        <properties>
            <property name="buildConfig">
                <property-ui type="textBox"
                             label="Build Config"
                             description="The build configuration to be used"/>
            </property>
            <property name="fromBuild">
                <property-ui type="textBox"
                             label="From Build"
                             description="The name of a build to run again."/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the start-build command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to start a build."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenicate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="startBuild.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
    <step-type name="Cancel Build">
        <description>Request a graceful shutdown of a build. Running, pending, or new builds are canceled.</description>
        <properties>
            <property name="builds">
                <property-ui type="textAreaBox"
                             label="Build(s)"
                             description="The build to be cancelled."/>
            </property>
            <property name="buildConfigs">
                <property-ui type="textAreaBox"
                             label="Build Config(s)"
                             description="The builds to be cancelled created from specified Build Configs"/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the cancel-build command. Specify each flag on a new line. "/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to cancel a build."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenicate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="cancelBuild.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
    <step-type name="Delete">
        <description>Delete resources by filenames, stdin, resources and names, or by resources and label selector.</description>
        <properties>
            <property name="resource" required="true">
                <property-ui type="textAreaBox"
                             label="Resource(s)/resource names"
                             description="Please check Openshift documentation on the format to specify for resource and resource names"/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the delete command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to delete a resource."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenticate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="delete.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
    <step-type name="Login">
        <description>Log in to your Openshift server and save login for subsequent use.</description>
        <properties>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to login."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name used to authenticate with the OpenShift server."/>
            </property>
            <property name="password">
                <property-ui type="secureBox"
                             label="Password"
                             description="The password used to authenticate with the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="certificateAuthority">
                <property-ui type="textBox"
                             label="Certificate Authority"
                             description="The path to a certificate file for the certificate authority."/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the login command. Specify each flag on a new line."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="login.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
    <step-type name="Create">
    <description>Create a resource by filename.</description>
    <properties>
      <property name="filename" required="true">
        <property-ui type="textBox"
                     label="File Name"
                     description="File to be created."/>
      </property>
      <property name="flags">
        <property-ui type="textAreaBox"
                     label="Step Flags"
                     description="A list of flags to set when running the create process. Specify each flag on a new line."/>
      </property>
      <property name="project">
        <property-ui type="textBox"
                     label="Project"
                     description="The OpenShift project where the resource is created."/>
      </property>
      <property name="url">
        <property-ui type="textBox"
                     label="OpenShift URL"
                     description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
      </property>
      <property name="username">
        <property-ui type="textBox"
                     label="User Name"
                     description="The user name used to authenticate with the OpenShift server."/>
      </property>
      <property name="token">
        <property-ui type="secureBox"
                     label="Access Token"
                     description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
      </property>
      <property name="insecure">
        <property-ui type="checkBox" hidden="true"
                     label="Skip TLS Verification"
                     default-value="false"
                     description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
      </property>
      <property name="home">
        <property-ui type="textBox" hidden="true"
                     label="oc Path"
                     description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
      </property>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp"/>
      <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
      <arg file="create.groovy"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>
  <step-type name="Expose">
        <description>Expose containers internally as services or externally through routes.</description>
        <properties>
            <property name="resource" required="true">
                <property-ui type="textAreaBox"
                             label="Resource(s)/resource names"
                             description="Please check Openshift documentation on the format to specify for resource and resource names"/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the expose command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the application to expose a resource as a route or a service."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name to access the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="expose.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
    <step-type name="Process Template">
        <description>Process template into a list of resources specified in filename or stdin.</description>
        <properties>
            <property name="fileOrStored" required="true">
                <property-ui type="checkBox"
                             label="Check if the template is not uploaded and reading from a file"
                             description="Enable to indicate you are processing a template which is not uploaded orstored. If enabled, the Filename option is added to read a template."/>
            </property>
            <property name="template">
                <property-ui type="textBox"
                             label="Template"
                             description="The template filename or the name of the stored template."/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the process command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the template to be processed."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name to access the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Select to not validate the server certificate. If selected, HTTPS connections are not
                                  secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the
                                  oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="process.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
    <step-type name="Check Pod Status">
        <description>Use this step to show information about a pod.</description>
        <properties>
            <property name="podName">
                <property-ui type="textBox"
                             label="Pod Name"
                             description="The pod name to display information."/>
            </property>
            <property name="flags">
                <property-ui type="textAreaBox"
                             label="Step Flags"
                             description="A list of flags to set when running the pod status command. Specify each flag on a new line."/>
            </property>
            <property name="project">
                <property-ui type="textBox"
                             label="Project"
                             description="The OpenShift project that contains the pod information is to be displayed."/>
            </property>
            <property name="url">
                <property-ui type="textBox"
                             label="OpenShift URL"
                             description="The URL of the Red Hat OpenShift server. For example: https://192.0.2.0:8443"/>
            </property>
            <property name="username">
                <property-ui type="textBox"
                             label="User Name"
                             description="The user name to access the OpenShift server."/>
            </property>
            <property name="token">
                <property-ui type="secureBox"
                             label="Access Token"
                             description="The token used to authenticate with the OpenShift API server. You can use either this property or the User Name and Password properties to authenticate with the server."/>
            </property>
            <property name="insecure">
                <property-ui type="checkBox" hidden="true"
                             label="Skip TLS Verification"
                             default-value="false"
                             description="Enable to not validate the server certificate. If selected, HTTPS connections are not secure."/>
            </property>
            <property name="home">
                <property-ui type="textBox" hidden="true"
                             label="oc Path"
                             description="The name of the oc command if it is in the system path, or the full path to run the oc command."/>
            </property>
        </properties>
        <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
            scanner.register("Status:", function(lineNumber, line) {
                line = line.substring(7);
                properties.put("podStatus",line);
            });
            scanner.scan();
        }
     ]]></post-processing>
        <command program="${GROOVY_HOME}/bin/groovy">
            <arg value="-cp"/>
            <arg path="classes:lib/securedata.jar:lib/jettison.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
            <arg file="podStatus.groovy"/>
            <arg file="${PLUGIN_INPUT_PROPS}"/>
            <arg file="${PLUGIN_OUTPUT_PROPS}"/>
        </command>
    </step-type>
</plugin>
