1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/resources/metadata/cloudFoundryCreateServiceKey.yaml
Kevin Stiehl 3eae0c5f68
feat(vault): fetch secrets from vault (#2032)
* cloud-foundry & sonar from vault

* add vault development hint

* don't abort on vault errors

* cloudfoundry make credentialsId only mandatory when vault is not configured

* add vault ref to step ymls

* rename vaultAddress to vaultServerUrl

* rename PIPER_vaultRole* to PIPER_vaultAppRole*

* add resourceRef for detect step

* fix error when no namespace is set

* added debug logs

* added debug logs

* fix vault resolving

* add vaultCustomBasePath

* rename vault_test.go to client_test.go

* refactored vault logging

* refactored config param lookup for vault

* added tüddelchen

* rename vaultCustomBasePath to vaultPath

* fix tests

* change lookup path for group secrets

* fix interpolation tests

* added vault resource ref to versioning

* execute go generate

* rename Approle to AppRole

* change verbose back to false

Co-authored-by: Leander Schulz <leander.schulz01@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-10-13 14:14:47 +02:00

120 lines
3.4 KiB
YAML

metadata:
name: cloudFoundryCreateServiceKey
description: cloudFoundryCreateServiceKey
longDescription: |
Create CloudFoundryServiceKey
spec:
inputs:
secrets:
- name: cfCredentialsId
description: Jenkins 'Username with password' credentials ID containing user and password to authenticate to the Cloud Foundry API.
type: jenkins
params:
- name: cfApiEndpoint
type: string
description: Cloud Foundry API endpoint
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
mandatory: true
aliases:
- name: cloudFoundry/apiEndpoint
- name: username
type: string
description: User or E-Mail for CF
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: true
secret: true
resourceRef:
- name: cfCredentialsId
type: secret
param: username
- type: vaultSecret
paths:
- $(vaultPath)/cloudfoundry-$(cfOrg)-$(cfSpace)
- $(vaultBasePath)/$(vaultPipelineName)/cloudfoundry-$(cfOrg)-$(cfSpace)
- $(vaultBasePath)/GROUP-SECRETS/cloudfoundry-$(cfOrg)-$(cfSpace)
- name: password
type: string
description: User Password for CF User
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: true
secret: true
resourceRef:
- name: cfCredentialsId
type: secret
param: password
- type: vaultSecret
paths:
- $(vaultPath)/cloudfoundry-$(cfOrg)-$(cfSpace)
- $(vaultBasePath)/$(vaultPipelineName)/cloudfoundry-$(cfOrg)-$(cfSpace)
- $(vaultBasePath)/GROUP-SECRETS/cloudfoundry-$(cfOrg)-$(cfSpace)
- name: cfOrg
type: string
description: CF org
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
mandatory: true
aliases:
- name: cloudFoundry/org
- name: cfSpace
type: string
description: CF Space
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
mandatory: true
aliases:
- name: cloudFoundry/space
- name: cfServiceInstance
type: string
description: Parameter for CloudFoundry Service Instance Name
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
mandatory: true
aliases:
- name: cloudFoundry/serviceInstance
- name: cfServiceKeyName
type: string
description: Parameter for Service Key name for CloudFoundry Service Key to be created
scope:
- PARAMETERS
- STAGES
- STEPS
- GENERAL
mandatory: true
aliases:
- name: cloudFoundry/serviceKey
- name: cloudFoundry/serviceKeyName
- name: cfServiceKey
- name: cfServiceKeyConfig
type: string
description: Path to JSON config file path or JSON in-line string for Cloud Foundry Service Key creation
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: false
aliases:
- name: cloudFoundry/serviceKeyConfig
containers:
- name: cf
image: ppiper/cf-cli
imagePullPolicy: Never