Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-19034] restore missing buildnumber-ID symlink #891

Merged
merged 1 commit into from Sep 12, 2013
Merged

[JENKINS-19034] restore missing buildnumber-ID symlink #891

merged 1 commit into from Sep 12, 2013

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Aug 1, 2013

As permalink is updated, check number->ID symlink exists and (re)create if needed.

This issue has been reported for a jenkins installation migrated from windows (without symlink support) migrated to Unix. permalinks are recreated, but point to missing build number file

String target = String.valueOf(n);
if (!new File(job.getBuildDir(), target).exists()) {
// (re)create the build Number->Id symlink
Util.createSymlink(job.getBuildDir(),getId(),target,TaskListener.NULL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ought to check for failure, though most likely if this fails then writeSymlink will too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hudson.Util#createSymlink already handle failure

@jglick
Copy link
Member

jglick commented Aug 1, 2013

Ought to have test coverage. Should be simple enough with @LocalData.

@cloudbees-pull-request-builder

core » jenkins_main_trunk #1122 UNSTABLE
Looks like there's a problem with this pull request

@cloudbees-pull-request-builder

core » jenkins_main_trunk #1124 SUCCESS
This pull request looks good

jglick added a commit that referenced this pull request Sep 12, 2013
[FIXED JENKINS-19034] restore missing buildnumber-ID symlink
@jglick jglick merged commit 62ed20e into jenkinsci:master Sep 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants