diff --git a/engine/compiler/builtin/workspace.go b/engine/compiler/builtin/workspace.go index 1f00647cd..84256f9cc 100644 --- a/engine/compiler/builtin/workspace.go +++ b/engine/compiler/builtin/workspace.go @@ -45,6 +45,7 @@ func (v *workspaceOp) VisitContainer(node *parse.ContainerNode) error { // container should launch in the workspace return nil } - node.Container.WorkingDir = node.Root().Path + root := node.Root() + node.Container.WorkingDir = root.Path return nil } diff --git a/engine/compiler/parse/node_root.go b/engine/compiler/parse/node_root.go index fcf5ac01c..0288f5f47 100644 --- a/engine/compiler/parse/node_root.go +++ b/engine/compiler/parse/node_root.go @@ -141,7 +141,7 @@ type root struct { Volumes volumeList Networks networkList Services containerList - Script containerList + Script containerList `yaml:"pipeline"` Cache container Clone container Build build diff --git a/engine/compiler/parse/parse_test.go b/engine/compiler/parse/parse_test.go index 472ed01ef..02d17af93 100644 --- a/engine/compiler/parse/parse_test.go +++ b/engine/compiler/parse/parse_test.go @@ -64,7 +64,7 @@ clone: cache: mount: node_modules -script: +pipeline: test: image: golang commands: