JenkinsでwithCredentialsを使用して渡されたシェルコマンドをトリガーする関数。たとえば、代わりのジェンキンスのジョブステップ内で呼び出すpropperの道になりますどのようなものGroovyが機能するためのシェルコマンド
def performWithCredentials(command_block){
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'amazon',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
//Passed command_block
}
}
のように、この
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'amazon',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
//Shell commands block
sh """
echo 'hello world'
echo 'Good bye'
"""
}
トリガそれをやって?
おかげと歓声
あなたはアップデートを見て、実際にそれを呼び出すことを提案できますか?ありがとう – OdinRW