Help with basic pipeline job please

588 views
Skip to first unread message

bri.m.russell

unread,
Mar 12, 2017, 4:03:50 PM3/12/17
to Jenkins Users
Hi 

I'm having trouble using scm checkout in a really basic pipeline configuration. I wonder if anyone could please help me spot my schoolboy error:

I have a sample github project here: https://github.com/bmrussell/pipelinetest with a small Jenkinsfile:

stage 'CI'
node {
    echo 'Checking out...'
    scm checkout
    echo 'Checked out.'
    dir
    currentBuild.result = 'SUCCESS'
}


The pipeline job is just configured as Pipeline Script from SCM, giving 


with everything else as default. When built this gives

Obtained Jenkinsfile from git https://github.com/bmrussell/pipelinetest.git
[Pipeline] stage (CI)
Using the ‘stage’ step without a block argument is deprecated
Entering stage CI
Proceeding
[Pipeline] node
Running on master in C:\Users\Brian\.jenkins\workspace\pipeline-test
[Pipeline] {
[Pipeline] echo
Checking out...
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
groovy.lang.MissingPropertyException: No such property: checkout for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:224)

Does anyone have any ideas?...

thanks in advance.

bri.m.russell

unread,
Mar 12, 2017, 4:52:32 PM3/12/17
to Jenkins Users
Of course the underlying problem is staring at something too long...

checkout scm not scm checkout

time for a beer...
Reply all
Reply to author
Forward
0 new messages