github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/documentation/docs/steps/abapEnvironmentCreateTag.md (about) 1 # ${docGenStepName} 2 3 ## ${docGenDescription} 4 5 ## Prerequisites 6 7 A SAP BTP, ABAP environment system is available. 8 On this system, a [Communication User](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0377adea0401467f939827242c1f4014.html), a [Communication System](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1bfe32ae08074b7186e375ab425fb114.html) and a [Communication Arrangement](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a0771f6765f54e1c8193ad8582a32edb.html) is setup for the Communication Scenario "SAP BTP, ABAP Environment - Software Component Test Integration (SAP_COM_0510)". This can be done manually through the respective applications on the SAP BTP, ABAP environment system or through creating a service key for the system on Cloud Foundry with the parameters {"scenario_id": "SAP_COM_0510", "type": "basic"}. In a pipeline, you can do this with the step [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/). In addition, the software component should be cloned into the system instance. You can do this with the step [abapEnvironmentCloneGitRepo](./abapEnvironmentCloneGitRepo.md). 9 10 ## ${docGenParameters} 11 12 ## ${docGenConfiguration} 13 14 ## ${docJenkinsPluginDependencies} 15 16 ## Example: Configuration in the config.yml 17 18 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: 19 20 ```groovy 21 abapEnvironmentCreateTag script: this 22 ``` 23 24 If you want to provide the host and credentials of the Communication Arrangement directly, the configuration could look as follows: 25 26 ```yaml 27 steps: 28 abapEnvironmentCreateTag: 29 repositoryName: '/DMO/GIT_REPOSITORY' 30 commitID: 'cd87a3c' 31 tagName: 'myTag' 32 tagDescription: 'Created via Jenkins' 33 abapCredentialsId: 'abapCredentialsId' 34 host: '1234-abcd-5678-efgh-ijk.abap.eu10.hana.ondemand.com' 35 ``` 36 37 Another option is to read the host and credentials from the cloud foundry service key of the respective instance. Furthermore, if you want to specify multiple repositories, you can use a configuration file: `repositories.yml`/`addon.yml`. If you are using the ABAP Environment Pipeline to [build an add-on](../scenarios/abapEnvironmentAddons.md), you can also generate tags based on the product and component versions. 38 39 With this approach the `config.yml` would look like this: 40 41 ```yaml 42 steps: 43 abapEnvironmentCreateTag: 44 repositories: 'repositories.yml' 45 generateTagForAddonProductVersion: true 46 generateTagForAddonComponentVersion: true 47 cfCredentialsId: 'cfCredentialsId' 48 cfApiEndpoint: 'https://test.server.com' 49 cfOrg: 'cfOrg' 50 cfSpace: 'cfSpace' 51 cfServiceInstance: 'cfServiceInstance' 52 cfServiceKeyName: 'cfServiceKeyName' 53 ``` 54 55 and the configuration file `repositories.yml`/`addon.yml` would look like this: 56 57 ```yaml 58 addonVersion: "1.2.3" 59 addonProduct: "/DMO/PRODUCT" 60 repositories: 61 - name: '/DMO/REPO' 62 branch: 'feature' 63 commitID: 'cd87a3cac2bc946b7629580e58598c3db56a26f8' 64 version: '1.0.0' 65 ``` 66 67 Using such a configuration file is the recommended approach. Please note that you need to use the YAML data structure as in the example above when using the `repositories.yml`/`addon.yml` config file.