Getting issue in fetching credentials from keeper while running the pipeline - job running for long time.
--
- already added one-time key to jenkins credentials
- script used here : "
def COLOR_MAP = [
'SUCCESS': 'good',
'FAILURE': 'danger',
'ABORTED': 'yellow'
]
pipeline {
agent { label 'WindowsAgent' }
// environment {
// application = '########'
// }
options {
durabilityHint 'PERFORMANCE_OPTIMIZED'
buildDiscarder logRotator(
artifactDaysToKeepStr: '',
artifactNumToKeepStr: '',
daysToKeepStr: '',
numToKeepStr: '15')
}
stages {
stage('keeper') {
steps {
withKsm(application: [
[credentialsId: 'fb37d668-a609-491b-ab5-63f3d54eac',
secrets: [
[destination: 'env', envVar: 'logn', filePath: '', notation: 'keeper://FNi6yH-RM1zibqsgHIRV7Q/field/login'],
[destination: 'env', envVar: 'passwd', filePath: '', notation: 'keeper://FNi6yH-RM1zibqsgHIRV7Q/field/password']
]
]
]) {
// print('success')
// some block
sh'''
# Will be redacted in console
echo "login = ${logn}"
echo "password = ${passwd}"
'''
}
}
}
}
}
-- any suggestions to overcome the issue and fetch credentials from keeper vault NOTE : able to fetch cred on keeper secret manager from local - maybe changes required in jenkins config or in script. & Jenkins is in Linux env
Integrating Jenkins pipeline with the keeper vault - for credentials