Skip to content

Commit

Permalink
Use relativePath for artifact names if they're not set due to exceedi…
Browse files Browse the repository at this point in the history
…ng LIST_CUTOFF [JENKINS-33351]
  • Loading branch information
svanoort committed Apr 22, 2016
1 parent e66ebf4 commit abf6e1d
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -85,6 +85,13 @@ public static BuildArtifactExt create(Run<WorkflowJob, WorkflowRun>.Artifact art

inputActionExt.setId(artifact.getTreeNodeId());
inputActionExt.setName(artifact.getDisplayPath());

// DisplayPath does some custom processing to handle collisions, but isn't set if we have more than
// Run.LIST_CUTOFF artifacts - since we're just using this for display, relativePath is good enough
String nameCandidate = artifact.getDisplayPath();
inputActionExt.setName(
(nameCandidate != null) ? nameCandidate : artifact.relativePath
);
inputActionExt.setPath(artifact.getHref());
inputActionExt.setUrl(RunAPI.getArtifactUrl(run, artifact));
inputActionExt.setSize(artifact.getFileSize());
Expand Down

0 comments on commit abf6e1d

Please sign in to comment.