[JIRA] (JENKINS-56809) No lastCompletedBuild symlink

30 views
Skip to first unread message

daniel.jeznach@imgtec.com (JIRA)

unread,
Mar 29, 2019, 7:30:02 AM3/29/19
to jenkinsc...@googlegroups.com
Daniel Jeznach created an issue
 
Jenkins / Bug JENKINS-56809
No lastCompletedBuild symlink
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2019-03-29 11:29
Environment: Jenkins 2.46.2
openjdk 1.8.0
ubnutu 16.04 lts
Priority: Minor Minor
Reporter: Daniel Jeznach

I maintain few jenkinses, various versions (2.x). Some of them publish artifacts even when build result is failure.

Using jenkins UI I can access artifacts via http url JENKINS_URL/job/jobname/lastCompletedBuild/artifact/file.ext

But I need to access this artifact directly from filesystem where artifacts are stored, in my case it is custom path:

/mnt/jenkins/builds/jobname/lastCompletedBuild/archive/file.ext

but lastCompletedBuild symlink is not created. I still can access the file, but I have to know build number. The same is for lastBuild.

It works for lastCompletedBuild, lastUnstableBuild, lastFailedBuild, lastUnsuccessfulBuild.

All short url from job page have their respective symlinks except lastCompletedBuild.

Is it intentional?

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

daniel.jeznach@imgtec.com (JIRA)

unread,
Mar 29, 2019, 7:32:02 AM3/29/19
to jenkinsc...@googlegroups.com
Daniel Jeznach updated an issue
Change By: Daniel Jeznach
Labels: symlink

daniel.jeznach@imgtec.com (JIRA)

unread,
Mar 29, 2019, 7:32:06 AM3/29/19
to jenkinsc...@googlegroups.com
Daniel Jeznach updated an issue
I maintain few jenkinses, various versions (2.x). Some of jobs on them publish artifacts even when build result is failure.


Using jenkins UI I can access artifacts via http url JENKINS_URL/job/jobname/lastCompletedBuild/artifact/file.ext

But I need to access this artifact directly from filesystem where artifacts are stored, in my case it is custom path:

/mnt/jenkins/builds/jobname/lastCompletedBuild/archive/file.ext

but lastCompletedBuild symlink is not created. I still can access the file, but I have to know build number. The same is for lastBuild.

It works for lastCompletedBuild, lastUnstableBuild, lastFailedBuild, lastUnsuccessfulBuild.

All short url from job page have their respective symlinks except lastCompletedBuild.

Is it intentional?

daniel.jeznach@imgtec.com (JIRA)

unread,
Mar 29, 2019, 7:33:01 AM3/29/19
to jenkinsc...@googlegroups.com
Daniel Jeznach updated an issue
I maintain few jenkinses, various versions (2.x). Some of jobs on them publish artifacts even when build result is failure.

Using jenkins UI I can access artifacts via http url JENKINS_URL/job/jobname/lastCompletedBuild/artifact/file.ext

But I need to access this artifact directly from filesystem where artifacts are stored, in my case it is custom path:

{{ /mnt/jenkins/builds/jobname/lastCompletedBuild/archive/file.ext }}

but lastCompletedBuild symlink is not created. I still can access the file, but I have to know build number. The same is for lastBuild.

It works for lastCompletedBuild, lastUnstableBuild, lastFailedBuild, lastUnsuccessfulBuild.


All short url shorthand urls from job page have their respective symlinks created, except lastCompletedBuild.

Is it intentional?

daniel.jeznach@imgtec.com (JIRA)

unread,
Mar 29, 2019, 7:35:02 AM3/29/19
to jenkinsc...@googlegroups.com
Daniel Jeznach updated an issue
I maintain few jenkinses, various versions (2.x). Some of jobs on them publish artifacts even when build result is failure. Using jenkins UI I can access artifacts via http url

{{ JENKINS_URL/job/jobname/lastCompletedBuild/artifact/file.ext }}

But I need to access this artifact directly from filesystem where artifacts are stored, in my case it is custom path:

{{/mnt/jenkins/builds/jobname/lastCompletedBuild/archive/file.ext}}

On disk, lastCompletedBuild symlink is not created. I still can access the file, but I have to know build number. The same is for lastBuild. To sum up: it works for lastCompletedBuild, lastUnstableBuild, lastFailedBuild, lastUnsuccessfulBuild. All shorthand urls from job page have their respective symlinks created, except lastCompletedBuild.

Is it intentional?

daniel.jeznach@imgtec.com (JIRA)

unread,
Mar 29, 2019, 7:35:02 AM3/29/19
to jenkinsc...@googlegroups.com

daniel.jeznach@imgtec.com (JIRA)

unread,
Mar 29, 2019, 7:35:03 AM3/29/19
to jenkinsc...@googlegroups.com
Daniel Jeznach updated an issue
I maintain few jenkinses, various versions (2.x). Some of jobs on them publish artifacts even when build result is failure.

Using jenkins UI I can access artifacts via http url

{{
JENKINS_URL/job/jobname/lastCompletedBuild/artifact/file.ext }}

But I need to access this artifact directly from filesystem where artifacts are stored, in my case it is custom path:

{{/mnt/jenkins/builds/jobname/lastCompletedBuild/archive/file.ext}}

but On disk, lastCompletedBuild symlink is not created. I still can access the file, but I have to know build number. The same is for lastBuild.

It
To sum up: it works for lastCompletedBuild, lastUnstableBuild, lastFailedBuild, lastUnsuccessfulBuild. All shorthand urls from job page have their respective symlinks created, except lastCompletedBuild.

Is it intentional?

jglick@cloudbees.com (JIRA)

unread,
Aug 21, 2019, 9:43:03 AM8/21/19
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Won't Fix
 

Not sure offhand, but note that as of JENKINS-37862 in new versions of Jenkins, symlinks are not created at all. If you have some need for them, you need to install the Build Symlink plugin. If you have any issues with that, file them in that component (though I would consider it a very low priority).

Change By: Jesse Glick
Status: Open Resolved
Resolution: Won't Fix

jglick@cloudbees.com (JIRA)

unread,
Aug 21, 2019, 9:44:03 AM8/21/19
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-56809
 
Re: No lastCompletedBuild symlink

Note that normally you would use the Copy Artifact plugin and not mess around with $JENKINS_HOME.

daniel.jeznach@imgtec.com (JIRA)

unread,
Sep 26, 2019, 3:23:03 AM9/26/19
to jenkinsc...@googlegroups.com
Daniel Jeznach commented on Bug JENKINS-56809
 
Re: No lastCompletedBuild symlink

Thanks for explaining. Still, I don't see new solution handles lastCompletedBuild.

Copy Artifact does not satisfy me, because I need to access files directly on filesystem, before jenkins handles it (I use reverse proxy to intercept /artifact/ url.

For my test job, I found there is permalinks file created, which can be use as symlinks equivalent, this is great, so I don't need to install plugin, but its contents is:

lastFailedBuild -1
lastStableBuild 2
lastSuccessfulBuild 2
lastUnstableBuild -1
lastUnsuccessfulBuild -1

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

daniel.jeznach@imgtec.com (JIRA)

unread,
Sep 26, 2019, 3:24:02 AM9/26/19
to jenkinsc...@googlegroups.com
Thanks for explaining. Still, I don't see new solution handles lastCompletedBuild.

Copy Artifact does not satisfy me, because I need to access files directly on filesystem, before jenkins handles it (I use reverse proxy to intercept /artifact/ url.

For my test job, I found there is permalinks file created, which can be use as symlinks equivalent, this is great, so I don't need to install plugin, but its contents is:

{{lastFailedBuild -1}}
{{lastStableBuild 2}}
{{lastSuccessfulBuild 2}}
{{lastUnstableBuild -1}}
{{lastUnsuccessfulBuild -1}}


As you can see, no lastCompletedBuild entry, but when I type lastCompletedBuild in build URL, it's handled correctly. So it seems inconsistent to me.

daniel.jeznach@imgtec.com (JIRA)

unread,
Sep 26, 2019, 3:25:01 AM9/26/19
to jenkinsc...@googlegroups.com
Daniel Jeznach edited a comment on Bug JENKINS-56809
Thanks for explaining. Still, I don't see new solution handles lastCompletedBuild.

Copy Artifact does not satisfy me, because I need to access files directly on filesystem, before jenkins handles it (I use reverse proxy to intercept /artifact/ url ) .


For my test job, I found there is permalinks file created, which can be use as symlinks equivalent, this is great, so I don't need to install plugin, but its contents is:

{{lastFailedBuild -1}}
{{lastStableBuild 2}}
{{lastSuccessfulBuild 2}}
{{lastUnstableBuild -1}}
{{lastUnsuccessfulBuild -1}}

As you can see, no lastCompletedBuild entry, but when I type lastCompletedBuild in build URL (/job/test/lastCompletedBuild/), it's handled correctly. So it seems inconsistent to me.

daniel.jeznach@imgtec.com (JIRA)

unread,
Sep 26, 2019, 3:25:02 AM9/26/19
to jenkinsc...@googlegroups.com
Daniel Jeznach edited a comment on Bug JENKINS-56809
Thanks for explaining. Still, I don't see new solution handles lastCompletedBuild.

Copy Artifact does not satisfy me, because I need to access files directly on filesystem, before jenkins handles it (I use reverse proxy to intercept /artifact/ url.


For my test job, I found there is permalinks file created, which can be use as symlinks equivalent, this is great, so I don't need to install plugin, but its contents is:

{{lastFailedBuild -1}}
{{lastStableBuild 2}}
{{lastSuccessfulBuild 2}}
{{lastUnstableBuild -1}}
{{lastUnsuccessfulBuild -1}}

As you can see, no lastCompletedBuild entry, but when I type lastCompletedBuild in build URL (/job/test/lastCompletedBuild/) , it's handled correctly. So it seems inconsistent to me.

daniel.jeznach@imgtec.com (JIRA)

unread,
Sep 26, 2019, 3:25:03 AM9/26/19
to jenkinsc...@googlegroups.com
Change By: Daniel Jeznach
Resolution: Won't Fix
Status: Resolved In Review

jglick@cloudbees.com (JIRA)

unread,
Sep 26, 2019, 9:15:03 AM9/26/19
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Sep 26, 2019, 9:15:03 AM9/26/19
to jenkinsc...@googlegroups.com
Jesse Glick stopped work on Bug JENKINS-56809
 
Change By: Jesse Glick
Status: In Progress Open

jglick@cloudbees.com (JIRA)

unread,
Sep 26, 2019, 9:21:02 AM9/26/19
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-56809
 
Re: No lastCompletedBuild symlink

I need to access files directly on filesystem

This is not supported. If somehow works this way for you, fine, but it may not, or may stop working in the future.

While a lastCompletedBuild is defined in the code as of JENKINS-26270, it is not actually used by Job.getLastCompletedBuild(), which is odd. But LAST_COMPLETED_BUILD is in the BUILTIN list which is normally updated by PeepholePermalink.RunListenerImpl.onCompleted; I think the actual issue here is that LAST_COMPLETED_BUILD is a general Permalink and not a PeepholePermalink.

jglick@cloudbees.com (JIRA)

unread,
Sep 26, 2019, 9:33:03 AM9/26/19
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Jesse Glick
Change By: Jesse Glick
Assignee: Jesse Glick

jglick@cloudbees.com (JIRA)

unread,
Sep 26, 2019, 9:33:03 AM9/26/19
to jenkinsc...@googlegroups.com
Jesse Glick started work on Bug JENKINS-56809
 
Change By: Jesse Glick
Status: Open In Progress

jglick@cloudbees.com (JIRA)

unread,
Sep 26, 2019, 9:37:02 AM9/26/19
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Sep 27, 2019, 5:22:02 PM9/27/19
to jenkinsc...@googlegroups.com
Change By: Jesse Glick
Status: In Review Fixed but Unreleased
Resolution: Fixed
Released As: 2.198

daniel.jeznach@imgtec.com (JIRA)

unread,
Sep 30, 2019, 2:59:03 AM9/30/19
to jenkinsc...@googlegroups.com

I need to access files directly on filesystem

This is not supported. If somehow works this way for you, fine, but it may not, or may stop working in the future.

I'm fully aware, that it's not supported. I saw the missing links issue has been fixed, thank you.

dbeck@cloudbees.com (JIRA)

unread,
Oct 7, 2019, 4:11:08 AM10/7/19
to jenkinsc...@googlegroups.com
Change By: Daniel Beck
Status: Fixed but Unreleased Closed

dbeck@cloudbees.com (JIRA)

unread,
Oct 12, 2019, 2:17:03 PM10/12/19
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
Change By: Daniel Beck
Labels: lts-candidate symlink

ogondza@gmail.com (JIRA)

unread,
Nov 1, 2019, 8:08:04 AM11/1/19
to jenkinsc...@googlegroups.com
Oliver Gondža updated an issue
Change By: Oliver Gondža
Labels: lts 2.190.3 - candidate fixed symlink
Reply all
Reply to author
Forward
0 new messages