cloudFoundryDeleteService¶
DeleteCloudFoundryService
Description¶
Delete CloudFoundryService
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¶
cloudFoundryDeleteService script: this
Command line¶
piper cloudFoundryDeleteService
Prerequisites¶
This step is for deleting an existing service on Cloud Foundry. You need to provide the Cloud Foundry API Endpoint, the Organisation as well as the Space and the respective Service Instance Name you want to delete. Furthermore you will need to provide the Cloud Foundry Login Credentials, which must be stored in the Jenkins Configuration. Additionally you can set the cfDeleteServiceKeys flag for deleting all Service Keys that belong to the respective Service.
Parameters¶
Overview¶
Name | Mandatory | Additional information |
---|---|---|
cfApiEndpoint | yes | |
cfCredentialsId | yes | |
cfOrg | yes | |
cfServiceInstance | yes | |
cfSpace | yes | |
password | yes | |
script | yes | |
username | yes | |
cfDeleteServiceKeys | no | |
containerCommand | no | |
containerShell | no | |
dockerEnvVars | no | |
dockerImage | no | |
dockerName | no | |
dockerOptions | no | |
dockerPullImage | no | |
dockerVolumeBind | no | |
dockerWorkspace | no | |
verbose | no | activates debug output |
Details¶
cfApiEndpoint¶
Cloud Foundry API endpoint
Scope | Details |
---|---|
Aliases | cloudFoundry/apiEndpoint |
Type | string |
Mandatory | yes |
Default | $PIPER_cfApiEndpoint (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
cfCredentialsId¶
Jenkins-specific: Used for proper environment setup.
Jenkins credentials ID containing user and password to authenticate to the Cloud Foundry API
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
cfDeleteServiceKeys¶
Parameter to force deletion of Cloud Foundry Service Keys
Scope | Details |
---|---|
Aliases | cloudFoundry/cfDeleteServiceKeys |
Type | bool |
Mandatory | no |
Default | false |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
cfOrg¶
CF org
Scope | Details |
---|---|
Aliases | cloudFoundry/org |
Type | string |
Mandatory | yes |
Default | $PIPER_cfOrg (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
cfServiceInstance¶
Parameter of ServiceInstance Name to delete CloudFoundry Service
Scope | Details |
---|---|
Aliases | cloudFoundry/serviceInstance |
Type | string |
Mandatory | yes |
Default | $PIPER_cfServiceInstance (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
cfSpace¶
CF Space
Scope | Details |
---|---|
Aliases | cloudFoundry/space |
Type | string |
Mandatory | yes |
Default | $PIPER_cfSpace (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
containerCommand¶
Jenkins-specific: Used for proper environment setup.
Kubernetes only: Allows to specify start command for container created with dockerImage parameter to overwrite Piper default (/usr/bin/tail -f /dev/null).
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
containerShell¶
Jenkins-specific: Used for proper environment setup.
Allows to specify the shell to be executed for container with containerName.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerEnvVars¶
Jenkins-specific: Used for proper environment setup.
Environment variables to set in the container, e.g. [http_proxy: "proxy:8080"].
Scope | Details |
---|---|
Aliases | - |
Type | map[string]string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerImage¶
Jenkins-specific: Used for proper environment setup.
Name of the docker image that should be used. If empty, Docker is not used and the command is executed directly on the Jenkins system.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerName¶
Jenkins-specific: Used for proper environment setup.
Kubernetes only: Name of the container launching dockerImage. SideCar only: Name of the container in local network.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerOptions¶
Jenkins-specific: Used for proper environment setup.
Docker options to be set when starting the container.
Scope | Details |
---|---|
Aliases | - |
Type | []string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerPullImage¶
Jenkins-specific: Used for proper environment setup.
Set this to 'false' to bypass a docker image pull. Usefull during development process. Allows testing of images which are available in the local registry only.
Scope | Details |
---|---|
Aliases | - |
Type | bool |
Mandatory | no |
Default | false |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerVolumeBind¶
Jenkins-specific: Used for proper environment setup.
Volumes that should be mounted into the docker container.
Scope | Details |
---|---|
Aliases | - |
Type | map[string]string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerWorkspace¶
Jenkins-specific: Used for proper environment setup.
Kubernetes only: Specifies a dedicated user home directory for the container which will be passed as value for environment variable HOME
.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
password¶
User Password for CF User
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_password (if set) |
Secret | yes |
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 |
username¶
User or E-Mail for CF
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_username (if set) |
Secret | yes |
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¶
In this example, the Cloud Foundry Configuration is directly provided with the respective Credentials for the used User/Account.
cloudFoundryDeleteService( cfApiEndpoint : 'https://test.server.com', cfOrg : 'cforg', cfspace: 'cfspace', cfserviceInstance: 'cfserviceInstance', cfCredentialsId: 'cfcredentialsId', cfDeleteServiceKeys: true, )