Jenkins ISSUE JENKINS-56867

11 views
Skip to first unread message

Nikhil Bhoski

unread,
May 28, 2020, 7:42:17 AM5/28/20
to Jenkins Developers
Hi ,
I guess Workslow step does not create the workspace unless any write activity is done in the workspace . I gues node{} does not create workspace. I see Jenkins issue which is open https://issues.jenkins-ci.org/browse/JENKINS-56867?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel 

i have two steps one copies the file in workspace during the run which works fine , the other step which does not do anything if i use it i always get below error

Process working directory '/home/nbhoski/.jenkins/workspace/command_pipeline' doesn't exist!

Script is :

pipeline {
    agent any
     environment { 
        PATH = "${PATH}:/usr/local/TOOL/bin"
    }
    stages{
        stage('Run Tests') {
            steps
            {
                runCommand('pwd')          
            } 
        }              
    }
}


Same will work if cpoy or touch some file in workspace. Is it a known issue or any recommendation ?

Regards
Nikhil 

Jesse Glick

unread,
May 28, 2020, 8:08:13 AM5/28/20
to Jenkins Dev
On Thu, May 28, 2020 at 7:42 AM Nikhil Bhoski <nikhil...@gmail.com> wrote:
> Is it a known issue

Yes. Discussion in Jira.

> or any recommendation ?

Fix your second step.

Nikhil Bhoski

unread,
May 28, 2020, 8:20:26 AM5/28/20
to Jenkins Developers
Thanks Alot Jesse ! 

Fix i could think is to copy some random file in workspace in my step code . However i was wondering if it is a good approach . could you suggest any alternative approach to fix my step ?

Regards
Nikhil

Jesse Glick

unread,
May 28, 2020, 8:29:27 AM5/28/20
to Jenkins Dev
On Thu, May 28, 2020 at 8:20 AM Nikhil Bhoski <nikhil...@gmail.com> wrote:
> could you suggest any alternative approach to fix my step ?

https://javadoc.jenkins.io/hudson/FilePath.html#mkdirs--

Nikhil Bhoski

unread,
May 28, 2020, 8:47:39 AM5/28/20
to Jenkins Developers
Thanks a ton Jesse . it really helps 
Reply all
Reply to author
Forward
0 new messages