metadata:
  name: abapEnvironmentAssembleConfirm
  description: "Confirm the Delivery of Assembly for installation, support package or patch in SAP Cloud Platform ABAP Environment system"
  longDescription: |
    This step confirms the assemblies of provided [installations, support packages or patches] in SAP Cloud Platform ABAP Environment system
spec:
  inputs:
    secrets:
      - name: abapCredentialsId
        description: Jenkins credentials ID containing user and password to authenticate to the Cloud Platform ABAP Environment system or the Cloud Foundry API
        type: jenkins
        aliases:
          - name: cfCredentialsId
          - name: credentialsId
    params:
      - name: cfApiEndpoint
        type: string
        description: Cloud Foundry API endpoint
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
          - GENERAL
        mandatory: false
        aliases:
          - name: cloudFoundry/apiEndpoint
      - name: cfOrg
        type: string
        description: Cloud Foundry target organization
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
          - GENERAL
        mandatory: false
        aliases:
          - name: cloudFoundry/org
      - name: cfSpace
        type: string
        description: Cloud Foundry target space
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
          - GENERAL
        mandatory: false
        aliases:
          - name: cloudFoundry/space
      - name: cfServiceInstance
        type: string
        description: Cloud Foundry Service Instance
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
          - GENERAL
        mandatory: false
        aliases:
          - name: cloudFoundry/serviceInstance
      - name: cfServiceKeyName
        type: string
        description: Cloud Foundry Service Key
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
          - GENERAL
        mandatory: false
        aliases:
          - name: cloudFoundry/serviceKey
          - name: cloudFoundry/serviceKeyName
          - name: cfServiceKey
      - name: host
        description: Specifies the host address of the SAP Cloud Platform ABAP Environment system
        type: string
        mandatory: false
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
          - GENERAL
      - name: username
        type: string
        description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0582
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
        mandatory: true
        secret: true
      - name: password
        type: string
        description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0582
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
        mandatory: true
        secret: true
      - name: addonDescriptor
        type: string
        description: Structure in the commonPipelineEnvironment containing information about the Product Version and corresponding Software Component Versions
        mandatory: true
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
        resourceRef:
          - name: commonPipelineEnvironment
            param: abap/addonDescriptor
      - name: maxRuntimeInMinutes
        type: int
        description: maximal runtime of the step
        mandatory: true
        default: 360
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
      - name: certificateNames
        type: "[]string"
        description: certificates for the backend system, this certificates needs to be stored in .pipeline/trustStore
        mandatory: false
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
          - GENERAL
  outputs:
    resources:
      - name: commonPipelineEnvironment
        type: piperEnvironment
        params:
          - name: abap/addonDescriptor
  containers:
    - name: cf
      image: ppiper/cf-cli:7
