Skip to content

Commit

Permalink
stress: skip merging when there are no artifacts to merge
Browse files Browse the repository at this point in the history
If no tests successfully complete then there will be nothing to merge
and just calling into the merge program may therefore fail. In this case
it's appropriate to skip the merge.
  • Loading branch information
rickystewart committed Feb 16, 2022
1 parent 43d99a9 commit a3e0ed0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ func run() error {

// Merge sharded artifacts.
for env, mergeProgram := range shardableArtifacts {
if len(filesToMerge[env]) == 0 {
fmt.Printf("stress: skipping merge for artifact %s\n", env)
continue
}
output, err := os.Create(os.Getenv(env))
if err != nil {
return err
Expand Down

0 comments on commit a3e0ed0

Please sign in to comment.