github.com/jaylevin/jenkins-library@v1.230.4/resources/metadata/cloudFoundryDeploy.yaml (about) 1 metadata: 2 name: cloudFoundryDeploy 3 description: "Deploys an application to Cloud Foundry" 4 longDescription: | 5 Deploys an application to a test or production space within Cloud Foundry. 6 spec: 7 inputs: 8 secrets: 9 - name: cfCredentialsId 10 description: Jenkins 'Username with password' credentials ID containing user and password to authenticate to the Cloud Foundry API. 11 type: jenkins 12 aliases: 13 - name: cloudFoundry/credentialsId 14 deprecated: true 15 - name: dockerCredentialsId 16 description: Jenkins 'Username with password' credentials ID containing user and password to authenticate to the Docker registry. 17 type: jenkins 18 params: 19 - name: apiEndpoint 20 type: string 21 description: "Cloud Foundry API endpoint" 22 scope: 23 - PARAMETERS 24 - STAGES 25 - STEPS 26 - GENERAL 27 mandatory: true 28 default: "https://api.cf.eu10.hana.ondemand.com" 29 aliases: 30 - name: cfApiEndpoint 31 - name: cloudFoundry/apiEndpoint 32 deprecated: true 33 - name: appName 34 type: string 35 description: "Defines the name of the application to be deployed to the Cloud Foundry space" 36 scope: 37 - PARAMETERS 38 - STAGES 39 - STEPS 40 - GENERAL 41 mandatory: false 42 aliases: 43 - name: cfAppName 44 - name: cloudFoundry/appName 45 deprecated: true 46 - name: artifactVersion 47 type: string 48 description: "The artifact version, used for influx reporting" 49 scope: 50 - PARAMETERS 51 - STAGES 52 - STEPS 53 - GENERAL 54 mandatory: false 55 resourceRef: 56 - name: commonPipelineEnvironment 57 param: artifactVersion 58 - name: commitHash 59 type: string 60 description: "The commit hash, used for influx reporting" 61 scope: 62 - PARAMETERS 63 - STAGES 64 - STEPS 65 - GENERAL 66 mandatory: false 67 resourceRef: 68 - name: commonPipelineEnvironment 69 param: git/headCommitId 70 - name: cfHome 71 type: string 72 description: "The cf home folder used by the cf cli. If not provided the default assumed by the cf cli is used." 73 scope: 74 - PARAMETERS 75 - STAGES 76 - STEPS 77 - GENERAL 78 mandatory: false 79 - name: cfNativeDeployParameters 80 type: string 81 description: "Additional parameters passed to cf native deployment command" 82 scope: 83 - PARAMETERS 84 - STAGES 85 - STEPS 86 - GENERAL 87 mandatory: false 88 - name: cfPluginHome 89 type: string 90 description: "The cf plugin home folder used by the cf cli. 91 If not provided the default assumed by the cf cli is used." 92 scope: 93 - PARAMETERS 94 - STAGES 95 - STEPS 96 - GENERAL 97 mandatory: false 98 - name: deployDockerImage 99 type: string 100 description: "Docker image deployments are supported 101 (via manifest file in general)[https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#docker]. 102 If no manifest is used, this parameter defines the image to be deployed. 103 The specified name of the image is passed to the `--docker-image` parameter of the cf CLI and must 104 adhere it's naming pattern (e.g. REPO/IMAGE:TAG). 105 See (cf CLI documentation)[https://docs.cloudfoundry.org/devguide/deploy-apps/push-docker.html] 106 for details. 107 Note: The used Docker registry must be visible for the targeted Cloud Foundry instance." 108 scope: 109 - PARAMETERS 110 - STAGES 111 - STEPS 112 - GENERAL 113 mandatory: false 114 - name: deployTool 115 type: string 116 description: "Defines the tool which should be used for deployment." 117 scope: 118 - PARAMETERS 119 - STAGES 120 - STEPS 121 - GENERAL 122 - name: buildTool 123 type: string 124 description: "Defines the tool which is used for building the artifact. 125 If provided, `deployTool` is automatically derived from it. 126 For MTA projects, `deployTool` defaults to `mtaDeployPlugin`. 127 For other projects `cf_native` will be used." 128 scope: 129 - PARAMETERS 130 - STAGES 131 - STEPS 132 - GENERAL 133 resourceRef: 134 - name: commonPipelineEnvironment 135 param: buildTool 136 - name: deployType 137 type: string 138 description: 139 "Defines the type of deployment, either `standard` deployment which results in a system 140 downtime or a zero-downtime `blue-green` deployment.If 'cf_native' as deployType and 'blue-green' 141 as deployTool is used in combination, your manifest.yaml may only contain one application. 142 If this application has the option 'no-route' active the deployType will be changed to 'standard'." 143 scope: 144 - PARAMETERS 145 - STAGES 146 - STEPS 147 - GENERAL 148 mandatory: false 149 default: "standard" 150 - name: dockerPassword 151 type: string 152 description: 153 "If the specified image in `deployDockerImage` is contained in a Docker registry, 154 which requires authorization, this defines the password to be used." 155 secret: true 156 scope: 157 - PARAMETERS 158 - STAGES 159 - STEPS 160 mandatory: false 161 resourceRef: 162 - name: dockerCredentialsId 163 type: secret 164 param: password 165 - name: dockerUsername 166 type: string 167 description: 168 "If the specified image in `deployDockerImage` is contained in a Docker registry, 169 which requires authorization, this defines the username to be used." 170 scope: 171 - PARAMETERS 172 - STAGES 173 - STEPS 174 mandatory: false 175 secret: true 176 resourceRef: 177 - name: dockerCredentialsId 178 type: secret 179 param: username 180 - name: keepOldInstance 181 type: bool 182 description: 183 "In case of a `blue-green` deployment the old instance will be deleted by default. 184 If this option is set to true the old instance will remain stopped in the Cloud Foundry space." 185 scope: 186 - PARAMETERS 187 - STAGES 188 - STEPS 189 mandatory: false 190 - name: loginParameters 191 type: string 192 description: 193 "Addition command line options for cf login command. No escaping/quoting is performed. 194 Not recommended for productive environments." 195 scope: 196 - PARAMETERS 197 - STAGES 198 - STEPS 199 - GENERAL 200 mandatory: false 201 - name: manifest 202 type: string 203 description: "Defines the manifest to be used for deployment to Cloud Foundry." 204 scope: 205 - PARAMETERS 206 - STAGES 207 - STEPS 208 - GENERAL 209 mandatory: false 210 aliases: 211 - name: cfManifest 212 - name: cloudFoundry/manifest 213 deprecated: true 214 - name: manifestVariables 215 type: "[]string" 216 description: Defines a list of variables in the form `key=value` which are used for variable substitution within the file given by manifest. 217 longDescription: | 218 Defines a list of variables in the form `key=value` which are used for variable substitution 219 within the file given by manifest. 220 221 This can be used to set variables like it is provided by 'cf push --var key=value'. 222 223 **Note:** variables defined via 'manifestVariables' always win over conflicting variables defined 224 via any file given by 'manifestVariablesFiles' - no matter what is declared before. 225 This is the same behavior as can be observed when using 'cf push --var' in combination 226 with 'cf push --vars-file'." 227 228 Example: 229 230 ``` 231 ... 232 cloudFoundryDeploy: 233 manifestVariables: 234 - 'key1=value1' 235 - 'key2=value2' 236 ... 237 ``` 238 scope: 239 - PARAMETERS 240 - STAGES 241 - STEPS 242 - GENERAL 243 mandatory: false 244 aliases: 245 - name: cfManifestVariables 246 - name: cloudFoundry/manifestVariables 247 deprecated: true 248 - name: manifestVariablesFiles 249 type: "[]string" 250 description: 251 "path(s) of the Yaml file(s) containing the variable values to use as a 252 replacement in the manifest file. The order of the files is relevant in case there are 253 conflicting variable names and values within variable files. 254 In such a case, the values of the last file win." 255 scope: 256 - PARAMETERS 257 - STAGES 258 - STEPS 259 - GENERAL 260 default: ["manifest-variables.yml"] 261 mandatory: false 262 aliases: 263 - name: cfManifestVariablesFiles 264 - name: cloudFoundry/manifestVariablesFiles 265 deprecated: true 266 - name: mtaDeployParameters 267 type: string 268 description: "Additional parameters passed to mta deployment command" 269 scope: 270 - PARAMETERS 271 - STAGES 272 - STEPS 273 - GENERAL 274 mandatory: false 275 default: "-f" 276 - name: mtaExtensionDescriptor 277 type: string 278 description: "Defines additional extension descriptor file for deployment with the mtaDeployPlugin" 279 scope: 280 - PARAMETERS 281 - STAGES 282 - STEPS 283 - GENERAL 284 mandatory: false 285 aliases: 286 - name: cloudFoundry/mtaExtensionDescriptor 287 deprecated: true 288 - name: mtaExtensionCredentials 289 type: "map[string]interface{}" 290 description: "Defines a map of credentials that need to be replaced in the `mtaExtensionDescriptor`. This map needs to be created as `value-to-be-replaced`:`id-of-a-credential-in-jenkins`. The placeholders in the extension descriptor file(s) looks like: `<%= value-to-be-replaced %>`. When used outside Jenkins the secret which corresponds to `id-of-a-credential-in-jenkins` needs to be provided as environment variable in screaming snake case, e.g.: `export ID_OF_A_CREDENTIAL_IN_JENKINS=<secret>`. `id-of-a-credential-in-jenkins` needs to be provided in a way so that it can be translated into a valid environment variable name (e.g. don't start with a number). `value-to-be-replaced` must match this regex: `^[-_A-Za-z0-9]+$`." 291 scope: 292 - PARAMETERS 293 - STAGES 294 - STEPS 295 - GENERAL 296 mandatory: false 297 aliases: 298 - name: cloudFoundry/mtaExtensionCredentials 299 deprecated: true 300 - name: mtaPath 301 type: string 302 description: "Defines the path to *.mtar for deployment with the mtaDeployPlugin" 303 scope: 304 - PARAMETERS 305 - STAGES 306 - STEPS 307 - GENERAL 308 mandatory: false 309 resourceRef: 310 - name: commonPipelineEnvironment 311 param: mtarFilePath 312 - name: org 313 type: string 314 description: "Cloud Foundry target organization." 315 scope: 316 - PARAMETERS 317 - STAGES 318 - STEPS 319 - GENERAL 320 aliases: 321 - name: cfOrg 322 - name: cloudFoundry/org 323 deprecated: true 324 mandatory: true 325 secret: false 326 - name: password 327 type: string 328 description: "Password" 329 scope: 330 - PARAMETERS 331 - STAGES 332 - STEPS 333 mandatory: true 334 secret: true 335 resourceRef: 336 - name: cfCredentialsId 337 type: secret 338 param: password 339 - type: vaultSecret 340 default: cloudfoundry-$(org)-$(space) 341 name: cloudfoundryVaultSecretName 342 - name: smokeTestScript 343 type: string 344 description: 345 "Allows to specify a script which performs a check during blue-green deployment. 346 The script gets the FQDN as parameter and returns `exit code 0` in case check returned 347 `smokeTestStatusCode`. 348 More details can be found [here](https://github.com/bluemixgaragelondon/cf-blue-green-deploy#how-to-use). 349 Currently this option is only considered for deployTool `cf_native`." 350 scope: 351 - PARAMETERS 352 - STAGES 353 - STEPS 354 - GENERAL 355 mandatory: false 356 default: "blueGreenCheckScript.sh" 357 - name: smokeTestStatusCode 358 type: int 359 description: "Expected status code returned by the check." 360 scope: 361 - PARAMETERS 362 - STAGES 363 - STEPS 364 - GENERAL 365 mandatory: false 366 default: 200 367 - name: space 368 type: string 369 description: "Cloud Foundry target space" 370 scope: 371 - PARAMETERS 372 - STAGES 373 - STEPS 374 - GENERAL 375 aliases: 376 - name: cfSpace 377 - name: cloudFoundry/space 378 deprecated: true 379 mandatory: true 380 - name: username 381 type: string 382 description: User name used for deployment 383 scope: 384 - PARAMETERS 385 - STAGES 386 - STEPS 387 mandatory: true 388 secret: true 389 resourceRef: 390 - name: cfCredentialsId 391 type: secret 392 param: username 393 - type: vaultSecret 394 default: cloudfoundry-$(org)-$(space) 395 name: cloudfoundryVaultSecretName 396 containers: 397 - name: cfDeploy 398 image: ppiper/cf-cli:latest 399 outputs: 400 resources: 401 - name: influx 402 type: influx 403 params: 404 - name: deployment_data 405 fields: 406 - name: artifactUrl 407 - name: deployTime 408 - name: commitHash 409 - name: jobTrigger 410 tags: 411 - name: artifactVersion 412 - name: deployUser 413 - name: deployResult 414 - name: cfApiEndpoint 415 - name: cfOrg 416 - name: cfSpace