gctsRollback¶
Perfoms a rollback of one (default) or several commits
Description¶
This step performs a rollback of commits in a local ABAP repository. If a commit
parameter is specified, it will be used as the target commit for the rollback.
If no commit
parameter is specified and the remote repository domain is 'github.com', the last commit with the status 'success' will be used for the rollback. Otherwise,
gctsRollback
will roll back to the previously active commit in the local repository.
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')
gctsRollback script: this
piper gctsRollback
Prerequisites¶
This step performs a rollback of commit(s) in a local ABAP system repository. If a commit
parameter is specified, it will be used as the target commit for the rollback. If no commit
parameter is specified and the remote repository domain is 'github.com', the last commit with the status 'success' will be used for the rollback. Otherwise, gctsRollback
will roll back to the previously active commit in the local repository.
More information about the Git-enabled Change and Transport System (gCTS).
Parameters¶
Overview - Step¶
Name | Mandatory | Additional information |
---|---|---|
client | yes | |
host | yes | |
password | (yes) | abapCredentialsId ) |
repository | yes | |
script | (yes) | |
username | (yes) | abapCredentialsId ) |
commit | no | |
githubPersonalAccessToken | no | githubPersonalAccessTokenId ) |
queryParameters | no | |
skipSSLVerification | 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
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_client (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
commit¶
Specifies the target commit for the rollback
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_commit (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
githubPersonalAccessToken¶
GitHub personal access token with at least read permissions for the remote repository
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_githubPersonalAccessToken (if set) |
Secret | yes |
Configuration scope |
|
Resource references | Jenkins credential id: id: githubPersonalAccessTokenId |
host¶
Protocol and host of the ABAP system, 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 of the ABAP user that authenticates to the ABAP system. Note - Don“t provide this parameter directly. Either set it in the environment, or in the Jenkins credentials store, and provide the ID as value of the abapCredentialsId
parameter.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_password (if set) |
Secret | yes |
Configuration scope |
|
Resource references | Jenkins credential id: id: abapCredentialsId reference to: password |
queryParameters¶
Specifies pairs of key and value query parameters for the api requests
Scope | Details |
---|---|
Aliases | - |
Type | map[string]interface{} |
Mandatory | no |
Default | $PIPER_queryParameters (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
repository¶
Specifies the name (ID) of the local repsitory on the ABAP system
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_repository (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
script¶
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 |
skipSSLVerification¶
You can skip the SSL (Secure Socket Layer) verification for the http client
Scope | Details |
---|---|
Aliases | - |
Type | bool |
Mandatory | no |
Default | false |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
username¶
User that authenticates to the ABAP system. Note - Don't provide this parameter directly. Either set it in the environment, or in the Jenkins credentials store, and provide the ID as value of the abapCredentialsId
parameter.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_username (if set) |
Secret | yes |
Configuration scope |
|
Resource references | Jenkins credential id: id: abapCredentialsId reference to: username |
verbose¶
verbose output
Scope | Details |
---|---|
Aliases | - |
Type | bool |
Mandatory | no |
Default | false |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
abapCredentialsId¶
ID taken from the Jenkins credentials store containing user name and password of the user that authenticates to the ABAP system on which you want to execute the rollback.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Configuration scope |
|
githubPersonalAccessTokenId¶
GitHub personal access token with at least read permissions for the remote repository
Scope | Details |
---|---|
Aliases | - |
Type | string |
Configuration scope |
|
Example¶
Example configuration for the use in a Jenkinsfile.
gctsRollback(
script: this,
host: "https://abap.server.com:port",
client: "000",
abapCredentialsId: 'ABAPUserPasswordCredentialsId',
repository: "myrepo"
)
Example for the use in a YAML configuration file (such as .pipeline/config.yaml
).
steps:
<...>
gctsRollback:
host: "https://abap.server.com:port"
client: "000"
abapCredentialsId: 'ABAPUserPasswordCredentialsId'
repository: "myrepo"