We created Jenkins Pipeline as a Code using Blue Ocean and it was working fine until recently. Now when we try to pass parameters for keychainPwd for Xcode integration plugin in Blue Ocean, it gives us errors and our Blue Ocean Pipeline for iOS is not working.
We tried to use Secret key of credential and tried to pass it as parameter but it is not working.
environment {
Keychain_pwd_id = credentials('test')
}
Here 'test' secret key was created. We tried following as well:
keychainPwd: hudson.util.Secret.fromString("${Keychain_pwd_id}")
pipeline {
environment {
Keychain_pwd_id = credentials('test')
}
stages {
stage('Xcode Build') {
steps {
xcodeBuild(buildIpa: true, bundleID: 'com.xxx.xxxxxxxxxx', cleanBeforeBuild: true, configuration: 'Release', developmentTeamID: 'xxxxxxxx', developmentTeamName: 'xxxxxxxxxxxxxxxxxxxxx', ipaExportMethod: ‘enterprise’, ipaName: ‘xxxxxxxxxxx’, ipaOutputDirectory: 'build', keychainName: 'login', keychainPath: '${HOME}/Library/Keychains/login.keychain', keychainPwd: "${Keychain_pwd_id}, manualSigning: true, provisioningProfiles: [[provisioningProfileAppId: 'xxxxxxxxxxxxxxxxxxx', provisioningProfileUUID: 'xxxxxxxxxxxxxxxxxxxxxxxxxx']], unlockKeychain: true, xcodeSchema: ‘xxxxxxxxxxxxxxxx
}
}
}
}
Expecting "class hudson.util.Secret" for parameter "keychainPwd" but got "${keychainPwd}" of type class java.lang.String instead @ line 12, column 407.