Skip to content

Commit

Permalink
fix(testworkflows): mount tarballs when needed (i.e. content.tarball …
Browse files Browse the repository at this point in the history
…or transfer) (#5501)
  • Loading branch information
rangoo94 authored May 28, 2024
1 parent f62d60b commit 4f98bae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/tcl/testworkflowstcl/testworkflowprocessor/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,14 @@ func ProcessContentTarball(_ InternalProcessor, layer Intermediate, container Co
args[i] = fmt.Sprintf("%s=%s", t.Path, t.Url)
needsMount := t.Mount != nil && *t.Mount
if !needsMount {
needsMount = selfContainer.HasVolumeAt(t.Path)
needsMount = !selfContainer.HasVolumeAt(t.Path)
}

if needsMount && t.Mount != nil && !*t.Mount {
return nil, fmt.Errorf("content.tarball[%d]: %s: is not part of any volume: should be mounted", i, t.Path)
}

if (needsMount && t.Mount == nil) || (t.Mount == nil && *t.Mount) {
if needsMount {
volumeMount := layer.AddEmptyDirVolume(nil, t.Path)
container.AppendVolumeMounts(volumeMount)
}
Expand Down

0 comments on commit 4f98bae

Please sign in to comment.