Skip to content

Commit 91170f6

Browse files
committed
add usage resolveScm in example
1 parent 48a5ec4 commit 91170f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,14 @@ checkout scmGit(
138138

139139
[source,groovy]
140140
----
141-
resolveScm(
141+
def resolvedSCMBranch = resolveScm(
142142
source: gitSource(
143143
credentialsId: 'git-cred',
144144
traits: [cloneOption(cloneOption(depth: 1, shallow: true)), gitBranchDiscovery()]
145145
remote: 'https://github.com/jenkinsci/ws-cleanup-plugin'),
146146
targets: ['main', 'master']
147147
)
148+
checkout resolvedSCMBranch
148149
----
149150

150151
==== Checkout with a narrow refspec

0 commit comments

Comments
 (0)