Skip to content

Commit

Permalink
Add shared folder to artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegLoewen committed Mar 26, 2019
1 parent 84e41ad commit 42a50bf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/testmachinery/testdefinition/testdefinition.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ func (td *TestDefinition) AddSerialStdOutput() {
Path: testmachinery.TM_KUBECONFIG_PATH,
}
td.AddOutputArtifacts(kubeconfigArtifact)
sharedFolderArtifact := argov1.Artifact{
Name: "sharedFolder",
Path: testmachinery.TM_SHARED_PATH,
}
td.AddOutputArtifacts(sharedFolderArtifact)
}

// AddConfig adds the config elements of different types (environment variable) to the TestDefinitions's template.
Expand Down
4 changes: 4 additions & 0 deletions pkg/testmachinery/testflow/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ func (n *Node) addTask(lastSerialNode, rootNode *Node) {
Name: "kubeconfigs",
From: fmt.Sprintf("{{tasks.%s.outputs.artifacts.kubeconfigs}}", lastSerialNode.Task.Name),
},
{
Name: "sharedFolder",
From: fmt.Sprintf("{{tasks.%s.outputs.artifacts.sharedFolder}}", lastSerialNode.Task.Name),
},
}

if n.TestDefinition.Location.Type() != tmv1beta1.LocationTypeLocal {
Expand Down
5 changes: 4 additions & 1 deletion pkg/testmachinery/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ import (

const (
// TM_KUBECONFIG_PATH is the path where kubeconfigs are mounted to tests.
TM_KUBECONFIG_PATH = "/tmp/env/kubeconfig"
TM_KUBECONFIG_PATH = "/tmp/tm/kubeconfig"

// TM_KUBECONFIG_PATH is the path where kubeconfigs are mounted to tests.
TM_SHARED_PATH = "/tmp/tm/shared"

// TM_REPO_PATH is the path where the repo/location is mounted to the tests.
TM_REPO_PATH = "/src"
Expand Down

0 comments on commit 42a50bf

Please sign in to comment.