Configure the workspace on Jenkins

1,352 views
Skip to first unread message

pbasan...@gmail.com

unread,
Jun 26, 2018, 7:42:59 AM6/26/18
to Jenkins Users
Hi ,

Here is the problem details ..

In my Jenkins master  K8S cloud is configured and a host volume is mounted to the workspace.
When the job completes .. not able to see the workspace  .. 
infact work is empty  and the generic message is displaying on the UI.
Can you please help me to configure the workspace.

Error: no workspace

There's no workspace for this project. Possible reasons are:

  1. The project was renamed recently and no build was done under the new name.
  2. The agent this project has run on for the last time was removed.
  3. The workspace directory (null) is removed outside Jenkins.
  4. The workspace was wiped out and no build has been done since then.

Run a build to have Jenkins create a workspace



Regards,
Basanta

Dirk Heinrichs

unread,
Jun 26, 2018, 7:51:37 AM6/26/18
to jenkins...@googlegroups.com
From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] On Behalf Of pbasan...@gmail.com

> In my Jenkins master  K8S cloud is configured and a host volume is mounted to the workspace.
> When the job completes .. not able to see the workspace  .. 

You say K8S cloud, so I can assume the job ran inside a container?

> Error: no workspace
> There's no workspace for this project. Possible reasons are:
> 1. The project was renamed recently and no build was done under the new name.
> 2. The agent this project has run on for the last time was removed.
> 3. The workspace directory (null) is removed outside Jenkins.
> 4. The workspace was wiped out and no build has been done since then.
> Run a build to have Jenkins create a workspace

What they forgot to list is
5. The build ran inside a container which took the workspace with it when it was destroyed
6. The job has a post build action "Delete workspace when build is done"

HTH...

Dirk
--
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 mailto:jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_jenkinsci-2Dusers_0cff40ec-2Df8ac-2D419e-2D886e-2D1cf0b5f315c2-2540googlegroups.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=PeFJPyf6mMj3tzgKNAWbP2v5p49POh-z1LiAF-DNwcw&s=ujZWknGLR6PR0SP2tZQJ7ts3b9hqG2NXOAPSB-zUS8U&e=.
For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=PeFJPyf6mMj3tzgKNAWbP2v5p49POh-z1LiAF-DNwcw&s=Svey87PwPyG_INVOiCy1i8C1nEWkuY0hTrDvcjCDUnE&e=.

pbasan...@gmail.com

unread,
Jun 26, 2018, 11:09:03 AM6/26/18
to Jenkins Users
Thanks for the reply 
yes the job is running inside a conatiner and mounted a volume in the host path  for the workspace .
i can see the workspace outside of the jenkin ..but the requirement is the workspace shd be acessable from inside the jenkin UI like the job running on a VM.


On Tuesday, June 26, 2018 at 5:21:37 PM UTC+5:30, Dirk Heinrichs wrote:
From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] On Behalf Of pbasan...@gmail.com

> In my Jenkins master  K8S cloud is configured and a host volume is mounted to the workspace.
> When the job completes .. not able to see the workspace  .. 

You say K8S cloud, so I can assume the job ran inside a container?

> Error: no workspace
> There's no workspace for this project. Possible reasons are:
> 1. The project was renamed recently and no build was done under the new name.
> 2. The agent this project has run on for the last time was removed.
> 3. The workspace directory (null) is removed outside Jenkins.
> 4. The workspace was wiped out and no build has been done since then.
> Run a build to have Jenkins create a workspace

What they forgot to list is
5. The build ran inside a container which took the workspace with it when it was destroyed
6. The job has a post build action "Delete workspace when build is done"

HTH...

        Dirk
--
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 mailto:jenkinsci-users+unsub...@googlegroups.com.

Dirk Heinrichs

unread,
Jun 27, 2018, 4:12:56 AM6/27/18
to jenkins...@googlegroups.com
> yes the job is running inside a conatiner and mounted a volume in the host path  for the workspace .
> i can see the workspace outside of the jenkin ..but the requirement is the workspace shd be
> acessable from inside the jenkin UI like the job running on a VM.

That's not possible (at least to my knowledge). Workspaces are accessible only through the slave which executed the job. In case of containers, they're teared down after the build, so access to the workspace is lost (even if it's still available on the container host). However, if all you need is access to certain build artifacts of that job, just add an "Archive artifacts" post build step to it. But be aware that these artifacts will be stored on your master, so plan for sufficient disk space there.

HTH...

Dirk
--
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 mailto:jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_jenkinsci-2Dusers_03d5af8a-2Dfd6f-2D4a9a-2Da02e-2Df1663f7bc3da-2540googlegroups.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=8n24ur65xZ5DJpju_5rCnxrHK1Y99tNCgKzywaMBFUk&s=KUvszbBdSWAa5C8qg8raGdnV8CSLa-vIqxmJYHlbLko&e=.
For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=8n24ur65xZ5DJpju_5rCnxrHK1Y99tNCgKzywaMBFUk&s=zjoHy5Ie1YqIs00xOX-hOqbEzIOSTC27UUF8WMfg8vQ&e=.
Reply all
Reply to author
Forward
0 new messages