-
Notifications
You must be signed in to change notification settings - Fork 402
Expand file tree
/
Copy pathTestWithCredentialsJob_withCredentials.txt
More file actions
22 lines (22 loc) · 1.5 KB
/
TestWithCredentialsJob_withCredentials.txt
File metadata and controls
22 lines (22 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
withCredentials.run()
withCredentials.node(groovy.lang.Closure)
withCredentials.usernamePassword([credentialsId:my_cred_id, usernameVariable:user, passwordVariable:pass])
withCredentials.string([credentialsId:docker_cred, variable:docker_pass])
withCredentials.string([credentialsId:ssh_cred, variable:ssh_pass])
withCredentials.withCredentials([[user, pass], docker_pass, ssh_pass], groovy.lang.Closure)
withCredentials.echo(User/Pass = user/pass)
withCredentials.echo(Docker = docker_pass)
withCredentials.echo(SSH = ssh_pass)
withCredentials.usernamePassword([credentialsId:my_cred_id, usernameVariable:user, passwordVariable:pass])
withCredentials.string([credentialsId:docker_cred, variable:docker_pass])
withCredentials.string([credentialsId:ssh_cred, variable:ssh_pass])
withCredentials.withCredentials([[user, pass], docker_pass, ssh_pass], groovy.lang.Closure)
withCredentials.echo(Nested User/Pass = user/pass)
withCredentials.echo(Nested Docker = docker_pass)
withCredentials.echo(Nested SSH = ssh_pass)
withCredentials.echo(Restored User/Pass = user/pass)
withCredentials.echo(Restored Docker = docker_pass)
withCredentials.echo(Restored SSH = ssh_pass)
withCredentials.echo(Cleared User/Pass = null/null)
withCredentials.echo(Cleared Docker = null)
withCredentials.echo(Cleared SSH = null)