Skip to content

Commit

Permalink
boilerplate stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tiloKo committed Apr 16, 2024
1 parent 33c31e5 commit fc08201
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 7 deletions.
1 change: 1 addition & 0 deletions cmd/piper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
42 changes: 42 additions & 0 deletions documentation/docs/steps/abapAddonAssemblyKitCheck.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 9 additions & 7 deletions documentation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/groovy/CommonStepsTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions vars/abapAddonAssemblyKitCheck.groovy
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit fc08201

Please sign in to comment.