-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
Jenkins1.448 on RHEL 6
LastStable and LastSuccessful symbolic links created in wrong location if Build Record Root Directory does not end in builds
CASE A
When the default Build Record Root Directory of ${ITEM_ROOTDIR}/builds is used the lastStable and lastSuccess dir links are located at
${ITEM_ROOTDIR}/lastStable -> builds/2012-01-23_14-50-48
${ITEM_ROOTDIR}/lastSuccess -> builds/2012-01-23_14-50-48
CASE B
When Build Record Root Directory is set to
/Some_shared_drive/builds/${ITEM_FULLNAME}/builds
The result is
/Some_shared_drive/builds/${ITEM_FULLNAME}/lastStable -> builds/2012-01-23_14-50-48
/Some_shared_drive/builds/${ITEM_FULLNAME}/lastSuccess -> builds/2012-01-23_14-50-48
CASE C
When Build Record Root Directory is set to
/Some_shared_drive/builds/${ITEM_FULLNAME}
The result is
/Some_shared_drive/builds/lastStable -> builds/2012-01-23_14-50-48
and /Some_shared_drive/builds/lastSuccess -> builds/2012-01-23_14-50-48
These links are then useless as they do not point to any valid location and they are located in the same directory level as ${ITEM_FULLNAME} so could have been set by any of the jobs.
These links are created in the AbstractBuild class
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/AbstractBuild.java private void createSymlink(TaskListener listener, String name) throws InterruptedException { Util.createSymlink(getProject().getBuildDir(),"builds/"+getId(),"../"+name,listener); }
Called by
public final void post(BuildListener listener) throws Exception { try { post2(listener); if (result.isBetterOrEqualTo(Result.UNSTABLE)) createSymlink(listener, "lastSuccessful"); if (result.isBetterOrEqualTo(Result.SUCCESS)) createSymlink(listener, "lastStable"); } finally { // update the culprit list HashSet<String> r = new HashSet<String>(); for (User u : getCulprits()) r.add(u.getId()); culprits = r; CheckPoint.CULPRITS_DETERMINED.report(); } }
- duplicates
-
JENKINS-17137 Bogus permalinks created when using external builds directory
-
- Resolved
-
[JENKINS-12501] LastStable and LastSuccessful symbolic links created in wrong location if Build Record Root Directory does not end in builds
Description |
Original:
LastStable and LastSuccessful symbolic links created in wrong location if Build Record Root Directory does not end in builds CASE A When the default Build Record Root Directory of ${ITEM_ROOTDIR}/builds is used the lastStable and lastSuccess dir links are located at ${ITEM_ROOTDIR}/lastStable -> builds/2012-01-23_14-50-48 ${ITEM_ROOTDIR}/lastSuccess -> builds/2012-01-23_14-50-48 CASE B When Build Record Root Directory is set to /Some_shared_drive/builds/${ITEM_FULLNAME}/builds The result is /Some_shared_drive/builds/${ITEM_FULLNAME}/lastStable -> builds/2012-01-23_14-50-48 /Some_shared_drive/builds/${ITEM_FULLNAME}/lastSuccess -> builds/2012-01-23_14-50-48 CASE C When Build Record Root Directory is set to /Some_shared_drive/builds/${ITEM_FULLNAME} The result is /Some_shared_drive/builds/lastStable -> builds/2012-01-23_14-50-48 and /Some_shared_drive/builds/lastSuccess -> builds/2012-01-23_14-50-48 These links are then useless as they do not point to any valid location and they are located in the same directory level as ${ITEM_FULLNAME} so could have been set by any of the jobs. These links are created in the AbstractBuild class [code] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/AbstractBuild.java private void createSymlink(TaskListener listener, String name) throws InterruptedException { Util.createSymlink(getProject().getBuildDir(),"builds/"+getId(),"../"+name,listener); } [code] Called by [code] public final void post(BuildListener listener) throws Exception { try { post2(listener); if (result.isBetterOrEqualTo(Result.UNSTABLE)) createSymlink(listener, "lastSuccessful"); if (result.isBetterOrEqualTo(Result.SUCCESS)) createSymlink(listener, "lastStable"); } finally { // update the culprit list HashSet<String> r = new HashSet<String>(); for (User u : getCulprits()) r.add(u.getId()); culprits = r; CheckPoint.CULPRITS_DETERMINED.report(); } } [code] |
New:
LastStable and LastSuccessful symbolic links created in wrong location if Build Record Root Directory does not end in builds CASE A When the default Build Record Root Directory of ${ITEM_ROOTDIR}/builds is used the lastStable and lastSuccess dir links are located at ${ITEM_ROOTDIR}/lastStable -> builds/2012-01-23_14-50-48 ${ITEM_ROOTDIR}/lastSuccess -> builds/2012-01-23_14-50-48 CASE B When Build Record Root Directory is set to /Some_shared_drive/builds/${ITEM_FULLNAME}/builds The result is /Some_shared_drive/builds/${ITEM_FULLNAME}/lastStable -> builds/2012-01-23_14-50-48 /Some_shared_drive/builds/${ITEM_FULLNAME}/lastSuccess -> builds/2012-01-23_14-50-48 CASE C When Build Record Root Directory is set to /Some_shared_drive/builds/${ITEM_FULLNAME} The result is /Some_shared_drive/builds/lastStable -> builds/2012-01-23_14-50-48 and /Some_shared_drive/builds/lastSuccess -> builds/2012-01-23_14-50-48 These links are then useless as they do not point to any valid location and they are located in the same directory level as ${ITEM_FULLNAME} so could have been set by any of the jobs. These links are created in the AbstractBuild class {code} https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/AbstractBuild.java private void createSymlink(TaskListener listener, String name) throws InterruptedException { Util.createSymlink(getProject().getBuildDir(),"builds/"+getId(),"../"+name,listener); } {code} Called by {code} public final void post(BuildListener listener) throws Exception { try { post2(listener); if (result.isBetterOrEqualTo(Result.UNSTABLE)) createSymlink(listener, "lastSuccessful"); if (result.isBetterOrEqualTo(Result.SUCCESS)) createSymlink(listener, "lastStable"); } finally { // update the culprit list HashSet<String> r = new HashSet<String>(); for (User u : getCulprits()) r.add(u.getId()); culprits = r; CheckPoint.CULPRITS_DETERMINED.report(); } } {code} |
Resolution | New: Duplicate [ 3 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Link |
New:
This issue duplicates |
Workflow | Original: JNJira [ 142867 ] | New: JNJira + In-Review [ 190315 ] |