Skip to content

Commit

Permalink
fix: register all mounted directories for the artifacts scrapping (#5784
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rangoo94 authored Aug 28, 2024
1 parent e90df19 commit 3286ac4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/testworkflows/testworkflowprocessor/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package testworkflowprocessor
import (
"fmt"
"path/filepath"
"strings"
"time"

"github.com/pkg/errors"
Expand Down Expand Up @@ -296,10 +297,18 @@ func ProcessArtifacts(_ InternalProcessor, layer Intermediate, container stage.C
// Allow to combine it within other containers
stage.SetPure(true)

cmd := []string{constants.DefaultToolkitPath, "artifacts"}
for _, mount := range container.VolumeMounts() {
if mount.MountPath == constants.DefaultInternalPath {
continue
}
cmd = append(cmd, "-m", strings.TrimRight(mount.MountPath, `/\`))
}

selfContainer.
SetImage(constants.DefaultToolkitImage).
SetImagePullPolicy(corev1.PullIfNotPresent).
SetCommand(constants.DefaultToolkitPath, "artifacts", "-m", constants.DefaultDataPath).
SetCommand(cmd...).
EnableToolkit(stage.Ref())

args := make([]string, 0)
Expand Down

0 comments on commit 3286ac4

Please sign in to comment.