diff --git a/cmd/piper.go b/cmd/piper.go index bcd5217a05..8377f61a41 100644 --- a/cmd/piper.go +++ b/cmd/piper.go @@ -154,6 +154,7 @@ func Execute() { rootCmd.AddCommand(AbapEnvironmentAssemblePackagesCommand()) rootCmd.AddCommand(AbapAddonAssemblyKitCheckCVsCommand()) rootCmd.AddCommand(AbapAddonAssemblyKitCheckPVCommand()) + rootCmd.AddCommand(AbapAddonAssemblyKitCheckCommand()) rootCmd.AddCommand(AbapAddonAssemblyKitCreateTargetVectorCommand()) rootCmd.AddCommand(AbapAddonAssemblyKitPublishTargetVectorCommand()) rootCmd.AddCommand(AbapAddonAssemblyKitRegisterPackagesCommand()) diff --git a/documentation/docs/steps/abapAddonAssemblyKitCheck.md b/documentation/docs/steps/abapAddonAssemblyKitCheck.md new file mode 100644 index 0000000000..feb11316c8 --- /dev/null +++ b/documentation/docs/steps/abapAddonAssemblyKitCheck.md @@ -0,0 +1,42 @@ +# ${docGenStepName} + +## ${docGenDescription} + +### Artifacts + +- addonDescriptorFile (addon.yml) + The addonDescriptorFile as specified in parameter addonDescriptorFileName is archived as artifact. This is done as this file is the main configuration and usually changed with every run. Thus it simplifies support if the corresponding configuration file is directly accessible in the pipeline. + +## Prerequisites + +* The credentials to access the AAKaaS (Technical Communication User) must be stored in the Jenkins Credential Store +* The step needs an addon.yml containing information about the Product Version and corresponding Software Component Versions/Repositories + +A detailed description of all prerequisites of the scenario and how to configure them can be found in the [Scenario Description](https://www.project-piper.io/scenarios/abapEnvironmentAddons/). + +## ${docGenParameters} + +## ${docGenConfiguration} + +## ${docJenkinsPluginDependencies} + +## Examples + +### Configuration in the config.yml + +The recommended way to configure your pipeline is via the config.yml file. In this case, calling the step in the Jenkinsfile is reduced to one line: + +```groovy +abapAddonAssemblyKitCheck script: this +``` + +If the step is to be configured individually the config.yml should look like this: + +```yaml +steps: + abapAddonAssemblyKitCheck: + abapAddonAssemblyKitCredentialsId: 'abapAddonAssemblyKitCredentialsId', + addonDescriptorFileName: 'addon.yml' +``` + +More convenient ways of configuration (e.g. on stage level) are described in the respective scenario/pipeline documentation. diff --git a/documentation/mkdocs.yml b/documentation/mkdocs.yml index b56abdf4ce..c7e3674b75 100644 --- a/documentation/mkdocs.yml +++ b/documentation/mkdocs.yml @@ -51,13 +51,15 @@ nav: - 'Set up a Pipeline-Based ABAP Development and Testing Process Using Git-Enabled Change and Transport System': scenarios/gCTS_Scenario.md - Extensibility: extensibility.md - 'Library steps': - - abapAddonAssemblyKitCheckCVs: steps/abapAddonAssemblyKitCheckCVs.md - - abapAddonAssemblyKitCheckPV: steps/abapAddonAssemblyKitCheckPV.md - - abapAddonAssemblyKitCreateTargetVector: steps/abapAddonAssemblyKitCreateTargetVector.md - - abapAddonAssemblyKitPublishTargetVector: steps/abapAddonAssemblyKitPublishTargetVector.md - - abapAddonAssemblyKitRegisterPackages: steps/abapAddonAssemblyKitRegisterPackages.md - - abapAddonAssemblyKitReleasePackages: steps/abapAddonAssemblyKitReleasePackages.md - - abapAddonAssemblyKitReserveNextPackages: steps/abapAddonAssemblyKitReserveNextPackages.md + - 'abapAddonAssemblyKit': + - Check: steps/abapAddonAssemblyKitCheck.md + - CheckCVs: steps/abapAddonAssemblyKitCheckCVs.md + - CheckPV: steps/abapAddonAssemblyKitCheckPV.md + - CreateTargetVector: steps/abapAddonAssemblyKitCreateTargetVector.md + - PublishTargetVector: steps/abapAddonAssemblyKitPublishTargetVector.md + - RegisterPackages: steps/abapAddonAssemblyKitRegisterPackages.md + - ReleasePackages: steps/abapAddonAssemblyKitReleasePackages.md + - ReserveNextPackages: steps/abapAddonAssemblyKitReserveNextPackages.md - abapEnvironmentBuild: steps/abapEnvironmentBuild.md - abapEnvironmentAssemblePackages: steps/abapEnvironmentAssemblePackages.md - abapEnvironmentAssembleConfirm: steps/abapEnvironmentAssembleConfirm.md diff --git a/test/groovy/CommonStepsTest.groovy b/test/groovy/CommonStepsTest.groovy index a5ff1bbedf..30c5715828 100644 --- a/test/groovy/CommonStepsTest.groovy +++ b/test/groovy/CommonStepsTest.groovy @@ -106,6 +106,7 @@ public class CommonStepsTest extends BasePiperTest{ } private static fieldRelatedWhitelist = [ + 'abapAddonAssemblyKitCheck', //implementing new golang pattern without fields 'abapAddonAssemblyKitCheckCVs', //implementing new golang pattern without fields 'abapAddonAssemblyKitCheckPV', //implementing new golang pattern without fields 'abapAddonAssemblyKitCreateTargetVector', //implementing new golang pattern without fields diff --git a/vars/abapAddonAssemblyKitCheck.groovy b/vars/abapAddonAssemblyKitCheck.groovy new file mode 100644 index 0000000000..30c5f1b0e5 --- /dev/null +++ b/vars/abapAddonAssemblyKitCheck.groovy @@ -0,0 +1,13 @@ +import groovy.transform.Field + +@Field String STEP_NAME = getClass().getName() +@Field String METADATA_FILE = 'metadata/abapAddonAssemblyKitCheck.yaml' + +void call(Map parameters = [:]) { + List credentials = [ + [type: 'usernamePassword', id: 'abapAddonAssemblyKitCredentialsId', env: ['PIPER_username', 'PIPER_password']], + [type: 'token', id: 'abapAddonAssemblyKitCertificateFileCredentialsId', env: ['PIPER_abapAddonAssemblyKitCertificateFile']], + [type: 'token', id: 'abapAddonAssemblyKitCertificatePassCredentialsId', env: ['PIPER_abapAddonAssemblyKitCertificatePass']] + ] + piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials, false, false, true) +}