diff --git a/documentation/docs/steps/cloudFoundryCreateServiceKey.md b/documentation/docs/steps/cloudFoundryCreateServiceKey.md index 3027322a4..5aaec792a 100644 --- a/documentation/docs/steps/cloudFoundryCreateServiceKey.md +++ b/documentation/docs/steps/cloudFoundryCreateServiceKey.md @@ -4,8 +4,8 @@ ## Prerequisites -* Cloud Foundry organization, space and deployment user are available -* Credentials for deployment have been configured in Jenkins with a dedicated Id +* Cloud Foundry API endpoint, organization, space, user and service instance are available +* Credentials have been configured in Jenkins with a dedicated Id ## ${docGenParameters} @@ -19,14 +19,14 @@ The following example creates a service key named "myServiceKey" for the service ```groovy cloudFoundryCreateServiceKey( - script: this, - cloudFoundry: [ - apiEndpoint: 'https://test.server.com', - credentialsId: 'cfCredentialsId', - org: 'cfOrg', - space: 'cfSpace', - serviceInstance: 'myServiceInstance', - serviceKey: 'myServiceKey', - serviceKeyConfig: '{ \"key\" : \"value\" }' - ]) + script: this, + cloudFoundry: [ + apiEndpoint: 'https://test.server.com', + credentialsId: 'cfCredentialsId', + org: 'cfOrg', + space: 'cfSpace', + serviceInstance: 'myServiceInstance', + serviceKey: 'myServiceKey', + serviceKeyConfig: '{ \"key\" : \"value\" }' + ]) ``` diff --git a/vars/cloudFoundryCreateServiceKey.groovy b/vars/cloudFoundryCreateServiceKey.groovy index 762f1f6a9..e82d20246 100644 --- a/vars/cloudFoundryCreateServiceKey.groovy +++ b/vars/cloudFoundryCreateServiceKey.groovy @@ -58,7 +58,7 @@ import static com.sap.piper.Prerequisites.checkScript @Field Map CONFIG_KEY_COMPATIBILITY = [cloudFoundry: [apiEndpoint: 'cfApiEndpoint', credentialsId: 'cfCredentialsId', org: 'cfOrg', space: 'cfSpace', serviceInstance: 'cfServiceInstance', serviceKey: 'cfServiceKey', serviceKeyConfig: 'cfServiceKeyConfig']] /** - * Step that creates a service key for a service instancve on Cloud Foundry + * Step that creates a service key for a specified service instance on Cloud Foundry */ @GenerateDocumentation void call(Map parameters = [:]) { @@ -76,6 +76,7 @@ void call(Map parameters = [:]) { .withMandatoryProperty('cloudFoundry/credentialsId') .withMandatoryProperty('cloudFoundry/serviceInstance') .withMandatoryProperty('cloudFoundry/serviceKey') + .withMandatoryProperty('cloudFoundry/apiEndpoint') .use() echo "[${STEP_NAME}] Info: docker image: ${config.dockerImage}, docker workspace: ${config.dockerWorkspace}"