-
Notifications
You must be signed in to change notification settings - Fork 168
/
path.go
36 lines (28 loc) · 1.04 KB
/
path.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package common
import "fmt"
const (
// StageMountPath is path that we will mount PV on in container.
StageMountPath = "/__cyclone__workspace"
// CoordinatorWorkspacePath is path of artifacts in coordinator container
CoordinatorWorkspacePath = "/workspace/"
)
// WorkflowRunsPath indicates WorkflowRuns data path in PV
func WorkflowRunsPath() string {
return "workflowruns"
}
// StagePath gets the path of a stage in PV
func StagePath(wfr, stage string) string {
return fmt.Sprintf("workflowruns/%s/stages/%s", wfr, stage)
}
// ArtifactsPath gets the path of artifacts in PV
func ArtifactsPath(wfr, stage string) string {
return fmt.Sprintf("workflowruns/%s/stages/%s/artifacts/", wfr, stage)
}
// ArtifactPath gets the path of a artifact in PV.
func ArtifactPath(wfr, stage, artifact string) string {
return fmt.Sprintf("workflowruns/%s/stages/%s/artifacts/%s", wfr, stage, artifact)
}
// ResourcePath gets the path of a resource in PV
func ResourcePath(wfr, resource string) string {
return fmt.Sprintf("workflowruns/%s/resources/%s", wfr, resource)
}