Theresultsofthechecksarestoredina[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.
cmd.Flags().StringVar(&stepConfig.Username,"username",os.Getenv("PIPER_username"),"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.")
cmd.Flags().StringVar(&stepConfig.Password,"password",os.Getenv("PIPER_password"),"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.")
cmd.Flags().StringVar(&stepConfig.Host,"host",os.Getenv("PIPER_host"),"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`.")
cmd.Flags().BoolVar(&stepConfig.AUnitTest,"aUnitTest",true,"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.)\n<br/>\n- Failed with severity `fatal` is displayed as an `Error`.\n<br/>\n- Failed with severity `critical` is displayed as an `Error`.\n<br/>\n- Failed with severity `warning` is displayed as a `Warning`.\n")
cmd.Flags().BoolVar(&stepConfig.AtcCheck,"atcCheck",true,"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.)\n<br/>\n- Priorities 1 and 2 are displayed as an `Error`.\n<br/>\n- Priority 3 is displayed as a `Warning`.\n")
cmd.Flags().StringVar(&stepConfig.Scope,"scope",`repository`,"Scope of objects for which you want to execute the checks:\n<br/>\n- `localChangedObjects`: The object scope is derived from the last activity in the local repository. The checks are executed for the individual objects.\n<br/>\n- `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.\n<br/>\n- `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.\n<br/>\n- `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.\n<br/>\n- `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.\n<br/>\n- `packages`: The object scope comprises all packages that are part of the local repository. The checks are executed for the packages.\n")
cmd.Flags().StringVar(&stepConfig.Commit,"commit",os.Getenv("PIPER_commit"),"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.")
cmd.Flags().StringVar(&stepConfig.Workspace,"workspace",os.Getenv("PIPER_workspace"),"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`.")
cmd.Flags().StringVar(&stepConfig.AtcResultsFileName,"atcResultsFileName",`ATCResults.xml`,"Specifies an output file name for the results of the ATC checks.")
cmd.Flags().StringVar(&stepConfig.AUnitResultsFileName,"aUnitResultsFileName",`AUnitResults.xml`,"Specifies an output file name for the results of the ABAP Unit tests.")
cmd.Flags().BoolVar(&stepConfig.SkipSSLVerification,"skipSSLVerification",false,"Skip the verification of SSL (Secure Socket Layer) certificates when using HTTPS. This parameter is **not recommended** for productive environments.")
Description:"Runs ABAP unit tests and ATC (ABAP Test Cockpit) checks for a specified object scope.",
},
Spec:config.StepSpec{
Inputs:config.StepInputs{
Secrets:[]config.StepSecrets{
{Name:"abapCredentialsId",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.",Type:"jenkins"},