isBaseImagePath checks if the given artifact path resides in the base image layer of the container versus a shared volume mount between the wait and main container
(path string)
| 583 | // isBaseImagePath checks if the given artifact path resides in the base image layer of the container |
| 584 | // versus a shared volume mount between the wait and main container |
| 585 | func (we *WorkflowExecutor) isBaseImagePath(path string) bool { |
| 586 | // first check if path overlaps with a user-specified volumeMount |
| 587 | if common.FindOverlappingVolume(&we.Template, path) != nil { |
| 588 | return false |
| 589 | } |
| 590 | // next check if path overlaps with a shared input-artifact emptyDir mounted by argo |
| 591 | for _, inArt := range we.Template.Inputs.Artifacts { |
| 592 | if path == inArt.Path { |
| 593 | // The input artifact may have been optional and not supplied. If this is the case, the file won't exist on |
| 594 | // the input artifact volume. Since this function was called, we know that we want to use this path as an |
| 595 | // output artifact, so we should look for it in the base image path. |
| 596 | if inArt.Optional && !inArt.HasLocationOrKey() { |
| 597 | return true |
| 598 | } |
| 599 | return false |
| 600 | } |
| 601 | if strings.HasPrefix(path, inArt.Path+"/") { |
| 602 | return false |
| 603 | } |
| 604 | } |
| 605 | return true |
| 606 | } |
| 607 | |
| 608 | // SaveParameters will save the content in the specified file path as output parameter value |
| 609 | func (we *WorkflowExecutor) SaveParameters(ctx context.Context) error { |