github.com/jaylevin/jenkins-library@v1.230.4/resources/metadata/gctsExecuteABAPQualityChecks.yaml (about)

     1  metadata:
     2    name: gctsExecuteABAPQualityChecks
     3    description: Runs ABAP unit tests and ATC (ABAP Test Cockpit) checks for a specified object scope.
     4    longDescription: |
     5      This step executes ABAP unit test and ATC checks for a specified scope of objects that exist in a local Git repository on an ABAP system.
     6      Depending on your use case, you can specify a scope of objects for which you want to execute the checks. In addition, you can choose whether you want to execute only ABAP units tests, or only ATC checks, or both.
     7      By default, both checks are executed.
     8      <br/>
     9      The results of the checks are stored in a [Checkstyle](https://checkstyle.sourceforge.io/) format. With the help of the Jenkins [Warnings-Next-Generation](https://plugins.jenkins.io/warnings-ng/) Plugin), you can view the issues found, and navigate to the exact line of the source code where the issue occurred.
    10      To make the findings visible in the Jenkins plug-in, you need to use the `recordIssues` step, as displayed in the `Example` section below.
    11      <br/>
    12      You can use this step as of SAP S/4HANA 2020 with SAP Note [3159798](https://launchpad.support.sap.com/#/notes/3159798) implemented.
    13  
    14  spec:
    15    inputs:
    16      secrets:
    17        - name: abapCredentialsId
    18          description: ID taken from the Jenkins credentials store containing user name and password of the user that authenticates to the ABAP system on which you want to execute the checks.
    19          type: jenkins
    20      params:
    21        - name: username
    22          type: string
    23          description: User that authenticates to the ABAP system. Note - Don´t provide this parameter directly. Either set it in the environment, or in the Jenkins credentials store, and provide the ID as value of the `abapCredentialsId` parameter.
    24          scope:
    25            - PARAMETERS
    26            - STAGES
    27            - STEPS
    28          mandatory: true
    29          secret: true
    30          resourceRef:
    31            - name: abapCredentialsId
    32              type: secret
    33              param: username
    34        - name: password
    35          type: string
    36          description: Password of the ABAP user that authenticates to the ABAP system. Note - Don´t provide this parameter directly. Either set it in the environment, or in the Jenkins credentials store, and provide the ID as value of the `abapCredentialsId` parameter.
    37          scope:
    38            - PARAMETERS
    39            - STAGES
    40            - STEPS
    41          mandatory: true
    42          secret: true
    43          resourceRef:
    44            - name: abapCredentialsId
    45              type: secret
    46              param: password
    47        - name: host
    48          type: string
    49          description: Protocol and host of the ABAP system, including the port. Please provide it in the format `<protocol>://<host>:<port>`. Supported protocols are `http` and `https`.
    50          scope:
    51            - PARAMETERS
    52            - STAGES
    53            - STEPS
    54          mandatory: true
    55        - name: repository
    56          type: string
    57          description: Name (ID) of the local repository on the ABAP system
    58          scope:
    59            - PARAMETERS
    60            - STAGES
    61            - STEPS
    62          mandatory: true
    63        - name: client
    64          type: string
    65          description: Client of the ABAP system in which you want to execute the checks
    66          scope:
    67            - PARAMETERS
    68            - STAGES
    69            - STEPS
    70          mandatory: true
    71        - name: aUnitTest
    72          type: bool
    73          default: true
    74          description: |
    75            Indication whether you want to execute the ABAP Unit tests. If the ABAP Unit tests fail, the results are mapped as follows to the statuses available in the Jenkins plugin. (Successful ABAP unit test results are not displayed.)
    76            <br/>
    77            - Failed with severity `fatal` is displayed as an `Error`.
    78            <br/>
    79            - Failed with severity `critical` is displayed as an `Error`.
    80            <br/>
    81            - Failed with severity `warning` is displayed as a `Warning`.
    82          scope:
    83            - PARAMETERS
    84            - STAGES
    85            - STEPS
    86        - name: atcCheck
    87          type: bool
    88          default: true
    89          description: |
    90            Indication whether you want to execute the ATC checks. If the ATC checks result in errors with priorities 1 and 2, they are considered as failed. The results are mapped as follows to the statuses available in the Jenkins plugin. (Successful ATC check results are not displayed.)
    91            <br/>
    92            - Priorities 1 and 2 are displayed as an `Error`.
    93            <br/>
    94            - Priority 3 is displayed as a `Warning`.
    95          scope:
    96            - PARAMETERS
    97            - STAGES
    98            - STEPS
    99        - name: atcVariant
   100          type: string
   101          default: "DEFAULT"
   102          description: Variant for ATC checks
   103          scope:
   104            - PARAMETERS
   105            - STAGES
   106            - STEPS
   107        - name: scope
   108          type: string
   109          default: repository
   110          enum:
   111            - localChangedObjects
   112            - remoteChangedObjects
   113            - localChangedPackages
   114            - remoteChangedPackages
   115            - repository
   116            - packages
   117          description: |
   118            Scope of objects for which you want to execute the checks:
   119            <br/>
   120            - `localChangedObjects`: The object scope is derived from the last activity in the local repository. The checks are executed for the individual objects.
   121            <br/>
   122            - `remoteChangedObjects`: The object scope is the delta between the commit that triggered the pipeline and the current commit in the remote repository. The checks are executed for the individual objects.
   123            <br/>
   124            - `localChangedPackages`: The object scope is derived from the last activity in the local repository. All objects are resolved into packages. The checks are executed for the packages.
   125            <br/>
   126            - `remoteChangedPackages`: The object scope is the delta between the commit that triggered the pipeline and the current commit in the remote repository. All objects are resolved into packages. The checks are executed for the packages.
   127            <br/>
   128            - `repository`: The object scope comprises all objects that are part of the local repository. The checks are executed for the individual objects. Packages (DEVC) are excluded. This is the default scope.
   129            <br/>
   130            - `packages`: The object scope comprises all packages that are part of the local repository. The checks are executed for the packages.
   131          scope:
   132            - PARAMETERS
   133            - STAGES
   134            - STEPS
   135        - name: commit
   136          type: string
   137          description: ID of the commit that triggered the pipeline or any other commit used to calculate the object scope. Specifying a commit is mandatory for the `remoteChangedObjects` and `remoteChangedPackages` scopes.
   138          scope:
   139            - PARAMETERS
   140            - STAGES
   141            - STEPS
   142          mandatory: false
   143        - name: workspace
   144          type: string
   145          description: Absolute path to the directory that contains the source code that your CI/CD tool checks out. For example, in Jenkins, the workspace parameter is `/var/jenkins_home/workspace/<jobName>/`. As an alternative, you can use Jenkins's predefined environmental variable `WORKSPACE`.
   146          scope:
   147            - PARAMETERS
   148            - STAGES
   149            - STEPS
   150          mandatory: true
   151        - name: atcResultsFileName
   152          type: string
   153          description: Specifies an output file name for the results of the ATC checks.
   154          scope:
   155            - PARAMETERS
   156            - STAGES
   157            - STEPS
   158          mandatory: false
   159          default: "ATCResults.xml"
   160        - name: aUnitResultsFileName
   161          type: string
   162          description: Specifies an output file name for the results of the ABAP Unit tests.
   163          scope:
   164            - PARAMETERS
   165            - STAGES
   166            - STEPS
   167          mandatory: false
   168          default: "AUnitResults.xml"