[JIRA] (JENKINS-59279) Required context class hudson.FilePath is missing

453 views
Skip to first unread message

krister.jarl@itab.com (JIRA)

unread,
Sep 9, 2019, 7:25:03 AM9/9/19
to jenkinsc...@googlegroups.com
Krister Jarl created an issue
 
Jenkins / Bug JENKINS-59279
Required context class hudson.FilePath is missing
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: installed_plugins.txt, jenkins_fail.txt, system_properties.txt
Components: core
Created: 2019-09-09 11:24
Environment: Jenkins version: 2.164.3, Ubuntu 16.04.4 LTS, builds are running in Docker (versions 19.03.1, 17.12.0-ce and 18.09.7)
Priority: Major Major
Reporter: Krister Jarl

Pipeline execution fails intermittently with the attached error. We have multiple builds running on multiple nodes. Some builds seem to always fail on certain nodes, while other builds seems to always work on the same nodes. I can't really narrow it down to any specific nodes or builds. To me this would not indicate an error in the actual pipeline scripts, since they do work on certain nodes.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

slide.o.mix@gmail.com (JIRA)

unread,
Sep 12, 2019, 8:20:03 AM9/12/19
to jenkinsc...@googlegroups.com
Alex Earl commented on Bug JENKINS-59279
 
Re: Required context class hudson.FilePath is missing

Are you calling deleteDir inside of a node block?

krister.jarl@itab.com (JIRA)

unread,
Sep 13, 2019, 4:31:02 AM9/13/19
to jenkinsc...@googlegroups.com

No. Our pipeline looks something like this:

pipeline {
  agent {
    docker {...}
  }
  stages {...}
  post {
    always {
      deleteDir()
    }
  }
}

dbeck@cloudbees.com (JIRA)

unread,
Oct 9, 2019, 8:33:03 AM10/9/19
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
 
Change By: Daniel Beck
Component/s: pipeline
Component/s: core

fxthomas@dxomark.com (JIRA)

unread,
Oct 29, 2019, 6:09:06 AM10/29/19
to jenkinsc...@googlegroups.com
François-Xavier Thomas updated an issue
Change By: François-Xavier Thomas
Attachment: jenkins_fail_notifyBitbucket.log

fxthomas@dxomark.com (JIRA)

unread,
Oct 29, 2019, 6:09:06 AM10/29/19
to jenkinsc...@googlegroups.com
François-Xavier Thomas commented on Bug JENKINS-59279
 
Re: Required context class hudson.FilePath is missing

Not sure if related, but we have the same intermittent build failures with the same FilePath error on 2.164.1 with the following block (using the Bitbucket plugin):

post {
  always {
    script {
      notifyBitbucket()
    }
  }
}

Log: jenkins_fail_notifyBitbucket.log

slide.o.mix@gmail.com (JIRA)

unread,
Oct 29, 2019, 9:29:03 AM10/29/19
to jenkinsc...@googlegroups.com

If there is no workspace in the context at the time the plugin is called you will get this error. I am not familiar with all the internals of declarative pipeline to say why it would work sometimes and not others, but that is what is causing the issue. A workspace has to be available.

Reply all
Reply to author
Forward
0 new messages