Skip to content

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 .pipeline/config.yml file.
In this case, calling the step is essentially reduced to defining the step name.
Calling the step can be done either in an orchestrator specific way (e.g. via a Jenkins library step) or on the command line.

library('piper-lib-os')

gctsCreateRepository script: this
piper gctsCreateRepository

Prerequisites

This step creates a local Git repository on an ABAP server. More information about the Git-enabled Change and Transport System (gCTS).

Parameters

Overview - Step

Name Mandatory Additional information
client yes
host yes
password (yes) Secret pass via ENV or Jenkins credentials (abapCredentialsId)
repository yes
script (yes) Jenkins only reference to Jenkins main pipeline script
username (yes) Secret pass via ENV or Jenkins credentials (abapCredentialsId)
queryParameters no
remoteRepositoryURL no
role no
skipSSLVerification no
type no
vSID no
verbose no activates debug output

Overview - Execution Environment

Orchestrator-specific only

These parameters are relevant for orchestrator usage and not considered when using the command line option.

Name Mandatory Additional information

Details

client

Specifies the client of the ABAP system to be addressed

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_client (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

host

Specifies the protocol and host address, including the port. Please provide in the format <protocol>://<host>:<port>. Supported protocols are http and https.

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_host (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

password

Password to authenticate to the ABAP system

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_password (if set)
Secret yes
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references Jenkins credential id:
  id: abapCredentialsId
  reference to: password

queryParameters

Add query parameters (for API requests) that apply to all endpoints of the step. Provide the parameters as key-value pair map in the format <query parameter>:<value>.

back to overview

Scope Details
Aliases -
Type map[string]interface{}
Mandatory no
Default $PIPER_queryParameters (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

remoteRepositoryURL

URL of the corresponding remote repository

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_remoteRepositoryURL (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

repository

Specifies the name (ID) of the local repository on the ABAP system

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_repository (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
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

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default SOURCE
Possible values - SOURCE
- TARGET
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
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.

back to overview

Scope Details
Aliases -
Type Jenkins Script
Mandatory yes
Default
Secret no
Configuration scope
  • ☐ parameter
  • ☐ general
  • ☐ steps
  • ☐ stages
Resource references none

skipSSLVerification

Skip the verification of SSL (Secure Socket Layer) certificates when using HTTPS. This parameter is not recommended for productive environments.

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default false
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

type

Type of the used source code management tool

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default GIT
Possible values - GIT
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

username

Username to authenticate to the ABAP system

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_username (if set)
Secret yes
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references Jenkins credential id:
  id: abapCredentialsId
  reference to: username

vSID

Virtual SID of the local repository. The vSID corresponds to the transport route that delivers content to the remote Git repository

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_vSID (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

verbose

verbose output

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default false
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

abapCredentialsId

Jenkins-specific: Used for proper environment setup. See using credentials for details.

Jenkins credentials ID containing username and password for authentication to the ABAP system on which you want to create the repository

back to overview

Scope Details
Aliases -
Type string
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages

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'