Required context class hudson.FilePath is missing

657 views
Skip to first unread message

Keith Phillips

unread,
Jan 28, 2019, 2:22:29 PM1/28/19
to Jenkins Users
Jenkins was recently upgraded to CloudBees Jenkins Enterprise 2.150.2.3-rolling and now all of my Jenkinsfile scripts are throwing this error:

Required context class hudson.FilePath is missing

I'm doing

pipeline {
    agent {}
    options{}
    stages {
          stage {
             steps {
             }
    }
    post {
       always {
          deleteDir()
       }
    }
}

What do you think?

-K
  

Slide

unread,
Jan 28, 2019, 2:24:56 PM1/28/19
to Jenkins User Mailing List
You probably want to contact Cloudbees support since you are using an enterprise version of Jenkins.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8e364efc-79fa-4886-8b0d-914063e492cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Baptiste Mathus

unread,
Jan 29, 2019, 4:13:45 AM1/29/19
to jenkins...@googlegroups.com
Slide is 100% right for the support aspect. 

I _think_ that this error is expected, given you didn't specify an agent and are trying to use `deleteDir()`, which does require one (agent). I would be surprised this was actually working as-is on previous Pipeline plugins previous versions.

--

Keith Phillips

unread,
Jan 29, 2019, 1:22:51 PM1/29/19
to jenkins...@googlegroups.com
Sorry, yes I did have an agent line but forgot to include it. 

Reply all
Reply to author
Forward
0 new messages