Skip to content

Commit

Permalink
fix(artifacts): don't output buildArtifacts as korkArtifacts (#3417)
Browse files Browse the repository at this point in the history
  • Loading branch information
asher authored Feb 7, 2020
1 parent 6970247 commit df36cfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.netflix.spinnaker.orca.igor.BuildService;
import com.netflix.spinnaker.orca.igor.model.CIStageDefinition;
import com.netflix.spinnaker.orca.pipeline.model.Stage;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
Expand All @@ -45,10 +44,6 @@ public class GetBuildArtifactsTask extends RetryableIgorTask<CIStageDefinition>
stageDefinition.getPropertyFile(),
stageDefinition.getMaster(),
stageDefinition.getJob());
if (artifacts == null) {
artifacts = new ArrayList<>();
}
artifacts.addAll(stageDefinition.getBuildInfo().getArtifacts());
Map<String, List<Artifact>> outputs = Collections.singletonMap("artifacts", artifacts);
return TaskResult.builder(ExecutionStatus.SUCCEEDED)
.context(Collections.emptyMap())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ class GetBuildArtifactsTaskSpec extends Specification {

then:
1 * buildService.getArtifacts(BUILD_NUMBER, null, MASTER, JOB) >> [testArtifact]
artifacts.size() == 2
artifacts*.name == ["my-artifact", "another-artifact"]
// Modified to reflect a fix to avoid mixing build and kork artifacts in outputs.artifacts.
artifacts.size() == 1
artifacts*.name == ["my-artifact"]
}

def createStage(String propertyFile) {
Expand Down

0 comments on commit df36cfe

Please sign in to comment.