From 03a6d2dd1f3be8b51d16a342f1c299af0447ffee Mon Sep 17 00:00:00 2001 From: Dawid Rusnak Date: Thu, 14 Mar 2024 08:41:48 +0100 Subject: [PATCH] fix: add workingDir to artifacts step (#233) --- api/testworkflows/v1/step_types.go | 2 ++ api/testworkflows/v1/zz_generated.deepcopy.go | 5 +++++ .../testworkflows.testkube.io_testworkflows.yaml | 12 ++++++++++++ ...tworkflows.testkube.io_testworkflowtemplates.yaml | 12 ++++++++++++ 4 files changed, 31 insertions(+) diff --git a/api/testworkflows/v1/step_types.go b/api/testworkflows/v1/step_types.go index d267e753..8777015d 100644 --- a/api/testworkflows/v1/step_types.go +++ b/api/testworkflows/v1/step_types.go @@ -124,6 +124,8 @@ type StepExecuteWorkflow struct { } type StepArtifacts struct { + // working directory to override, so it will be used as a base dir + WorkingDir *string `json:"workingDir,omitempty" expr:"template"` // compression options for the artifacts Compress *ArtifactCompression `json:"compress,omitempty" expr:"include"` // paths to fetch from the container diff --git a/api/testworkflows/v1/zz_generated.deepcopy.go b/api/testworkflows/v1/zz_generated.deepcopy.go index 52580fb1..098bad81 100644 --- a/api/testworkflows/v1/zz_generated.deepcopy.go +++ b/api/testworkflows/v1/zz_generated.deepcopy.go @@ -486,6 +486,11 @@ func (in *Step) DeepCopy() *Step { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StepArtifacts) DeepCopyInto(out *StepArtifacts) { *out = *in + if in.WorkingDir != nil { + in, out := &in.WorkingDir, &out.WorkingDir + *out = new(string) + **out = **in + } if in.Compress != nil { in, out := &in.Compress, &out.Compress *out = new(ArtifactCompression) diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index 017dfd2f..2d558601 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -60,6 +60,10 @@ spec: items: type: string type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string type: object condition: description: 'expression to declare under which conditions the @@ -3778,6 +3782,10 @@ spec: items: type: string type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string type: object condition: description: 'expression to declare under which conditions the @@ -5072,6 +5080,10 @@ spec: items: type: string type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string type: object condition: description: 'expression to declare under which conditions the diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index b66614c3..bff3374a 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -60,6 +60,10 @@ spec: items: type: string type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string type: object condition: description: 'expression to declare under which conditions the @@ -3740,6 +3744,10 @@ spec: items: type: string type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string type: object condition: description: 'expression to declare under which conditions the @@ -4996,6 +5004,10 @@ spec: items: type: string type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string type: object condition: description: 'expression to declare under which conditions the