gctsCreateRepository¶
Creates a Git repository on an ABAP system
Description¶
Creates a local Git repository on an ABAP system if it does not already exist.
Usage¶
We recommend to define values of step parameters via config.yml file. In this case, calling the step is reduced to one simple line.
Calling the step can be done either via the Jenkins library step or on the command line.
Jenkins pipelines¶
gctsCreateRepository script: this
Command line¶
piper gctsCreateRepository
Prerequisites¶
With this step you can create a local git-enabled CTS (gCTS) repository on an ABAP server. Learn more about the SAP Git-enabled Change & Transport Sytem (gCTS) here. With gCTS, ABAP developments on ABAP servers can be maintained in Git repositories.
Parameters¶
Overview¶
Name | Mandatory | Additional information |
---|---|---|
abapCredentialsId | yes | |
client | yes | |
host | yes | |
password | yes | |
repository | yes | |
script | yes | |
username | yes | |
remoteRepositoryURL | no | |
role | no | |
type | no | |
vSID | no | |
verbose | no | activates debug output |
Details¶
abapCredentialsId¶
Jenkins-specific: Used for proper environment setup.
Jenkins credentials ID containing username and password for authentication to the ABAP system on which you want to create the repository
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
client¶
Specifies the client of the ABAP system to be adressed
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_client (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
host¶
Specifies the protocol and host adress, including the port. Please provide in the format <protocol>://<host>:<port>
. Supported protocols are http
and https
.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_host (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
password¶
Password to authenticate to the ABAP system
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_password (if set) |
Secret | yes |
Configuration scope |
|
Resource references | none |
remoteRepositoryURL¶
URL of the corresponding remote repository
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_remoteRepositoryURL (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
repository¶
Specifies the name (ID) of the local repository on the ABAP system
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_repository (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
role¶
Role of the local repository. Choose between 'TARGET' and 'SOURCE'. Local repositories with a TARGET role will NOT be able to be the source of code changes
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_role (if set) |
Possible values | - SOURCE - TARGET |
Secret | no |
Configuration scope |
|
Resource references | none |
script¶
Jenkins-specific: Used for proper environment setup.
The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the this
parameter, as in script: this
. This allows the function to access the commonPipelineEnvironment
for retrieving, e.g. configuration parameters.
Scope | Details |
---|---|
Aliases | - |
Type | Jenkins Script |
Mandatory | yes |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
type¶
Type of the used source code management tool
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | GIT |
Possible values | - GIT |
Secret | no |
Configuration scope |
|
Resource references | none |
username¶
Username to authenticate to the ABAP system
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_username (if set) |
Secret | yes |
Configuration scope |
|
Resource references | none |
vSID¶
Virtual SID of the local repository. The vSID corresponds to the transport route that delivers content to the remote Git repository
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_vSID (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
verbose¶
verbose output
Scope | Details |
---|---|
Aliases | - |
Type | bool |
Mandatory | no |
Default | false |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
¶
Example¶
Example configuration for the use in a Jenkinsfile
.
gctsCreateRepository( script: this, host: 'https://abap.server.com:port', client: '000', abapCredentialsId: 'ABAPUserPasswordCredentialsId', repository: 'myrepo', remoteRepositoryURL: 'https://github.com/user/myrepo', role: 'SOURCE', vSID: 'ABC' )
Example for the use in a YAML configuration file (such as .pipeline/config.yaml
).
steps: <...> gctsCreateRepository: host: 'https://abap.server.com:port' client: '000' abapCredentialsId: 'ABAPUserPasswordCredentialsId' repository: 'myrepo' remoteRepositoryURL: 'https://github.com/user/myrepo' role: 'SOURCE' vSID: 'ABC'