Jenkins groovy file to read credentials properties from Jenkins application credentials
stages{
.......
stage(){
steps{
withCredentials([usernamePassword(credentialsId:'id',passwordVariable:'pass',usernameVariable:'urd')]){
script{
use ....... ={$id} {$pass}
...........
}
}
}
}
..........
}
.......
stage(){
steps{
withCredentials([usernamePassword(credentialsId:'id',passwordVariable:'pass',usernameVariable:'urd')]){
script{
use ....... ={$id} {$pass}
...........
}
}
}
}
..........
}
Comments
Post a Comment