1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/resources/metadata/abapEnvironmentCreateTag.yaml
Daniel Mieg cda6e71ab9
Add ABAP step: createTag (#3633)
* Cloud Platform -> BTP

* Initial generation of new step

* add flag

* wip

* Fix warnings

* Add command

* Added Tag Decription

* Add status check

* Improve handling

* Improve handling

* Add test for happy path

* Add test reports to gitignore

* Add second test

* Improve createTag

* Add testcase

* Adaptions

* Add test

* Update cmd/abapEnvironmentCreateTag.go

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>

* Update cmd/abapEnvironmentCreateTag.go

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>

* Adapt error handling

* Improve coding

* Add info

* Disallow repositories and repositoryName at the
same time

* Regenerate

* Adapt to feedback

* Update cmd/abapEnvironmentCreateTag.go

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>

* Update cmd/abapEnvironmentCreateTag.go

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2022-05-23 15:15:22 +02:00

161 lines
5.2 KiB
YAML

metadata:
name: abapEnvironmentCreateTag
description: Creates a tag for a git repository to a SAP BTP ABAP Environment system
longDescription: |
Creates tags for specific commits of one or multiple repositories / software components. The tag can be specified explicitly as well as being generated by an addon product version or an addon component version.
Please provide either of the following options:
* The host and credentials the BTP ABAP Environment system itself. The credentials must be configured for the Communication Scenario [SAP_COM_0510](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/b04a9ae412894725a2fc539bfb1ca055.html).
* The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0510.
* Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority.
spec:
inputs:
secrets:
- name: abapCredentialsId
description: Jenkins credentials ID containing user and password to authenticate to the BTP ABAP Environment system or the Cloud Foundry API
type: jenkins
aliases:
- name: cfCredentialsId
- name: credentialsId
params:
- name: username
type: string
description: User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: true
secret: true
resourceRef:
- name: abapCredentialsId
type: secret
param: username
- name: password
type: string
description: Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0510
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: true
secret: true
resourceRef:
- name: abapCredentialsId
type: secret
param: password
- name: repositories
type: string
description: Specifies a YAML file containing the repositories configuration
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
- name: repositoryName
type: string
description: Specifies a repository (Software Components) on the SAP BTP ABAP Environment system
scope:
- PARAMETERS
- STAGES
- STEPS
- name: commitID
type: string
description: Specifies a commitID, for which a tag will be created
scope:
- PARAMETERS
- STAGES
- STEPS
- name: tagName
type: string
description: Specifies a tagName that will be created for the repositories on the SAP BTP ABAP Environment system
scope:
- PARAMETERS
- STAGES
- STEPS
- name: tagDescription
type: string
description: Specifies a description for the created tag
scope:
- PARAMETERS
- STAGES
- STEPS
- name: generateTagForAddonProductVersion
type: bool
description: Specifies if a tag will be created for the repositories on the SAP BTP ABAP Environment system
scope:
- PARAMETERS
- STAGES
- STEPS
- name: generateTagForAddonComponentVersion
type: bool
description: Specifies if a tag will be created for the repositories on the SAP BTP ABAP Environment system
scope:
- PARAMETERS
- STAGES
- STEPS
- name: host
type: string
description: Specifies the host address of the SAP BTP ABAP Environment system
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
- name: cfApiEndpoint
type: string
description: Cloud Foundry API Enpoint
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
aliases:
- name: cloudFoundry/apiEndpoint
- name: cfOrg
type: string
description: Cloud Foundry target organization
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
aliases:
- name: cloudFoundry/org
- name: cfSpace
type: string
description: Cloud Foundry target space
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
aliases:
- name: cloudFoundry/space
- name: cfServiceInstance
type: string
description: Cloud Foundry Service Instance
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
aliases:
- name: cloudFoundry/serviceInstance
- name: cfServiceKeyName
type: string
description: Cloud Foundry Service Key
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
aliases:
- name: cloudFoundry/serviceKey
- name: cloudFoundry/serviceKeyName
- name: cfServiceKey
containers:
- name: cf
image: ppiper/cf-cli:7