Skip to content

Commit

Permalink
feat: pass artifacts testsuite (#193)
Browse files Browse the repository at this point in the history
* feat: download artifacts model

* fix: add comments
  • Loading branch information
vsukhin authored Nov 8, 2023
1 parent f61e073 commit c66d03d
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
12 changes: 10 additions & 2 deletions api/testsuite/v3/testsuite_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,18 @@ type TestSuiteStepSpec struct {
Delay metav1.Duration `json:"delay,omitempty"`
}

// options to download artifacts from previous steps
type DownloadArtifactOptions struct {
AllPreviousSteps bool `json:"allPreviousSteps,omitempty"`
// previous step numbers starting from 1
PreviousStepNumbers []int32 `json:"previousStepNumbers,omitempty"`
}

// TestSuiteBatchStep is set of steps run in parallel
type TestSuiteBatchStep struct {
StopOnFailure bool `json:"stopOnFailure"`
Execute []TestSuiteStepSpec `json:"execute,omitempty"`
StopOnFailure bool `json:"stopOnFailure"`
DownloadArtifacts *DownloadArtifactOptions `json:"downloadArtifacts,omitempty"`
Execute []TestSuiteStepSpec `json:"execute,omitempty"`
}

// RunningContext for test or test suite execution
Expand Down
25 changes: 25 additions & 0 deletions api/testsuite/v3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions config/crd/bases/tests.testkube.io_testsuites.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,18 @@ spec:
items:
description: TestSuiteBatchStep is set of steps run in parallel
properties:
downloadArtifacts:
description: options to download artifacts from previous steps
properties:
allPreviousSteps:
type: boolean
previousStepNumbers:
description: previous step numbers starting from 1
items:
format: int32
type: integer
type: array
type: object
execute:
items:
description: TestSuiteStepSpec for particular type will have
Expand All @@ -591,6 +603,18 @@ spec:
items:
description: TestSuiteBatchStep is set of steps run in parallel
properties:
downloadArtifacts:
description: options to download artifacts from previous steps
properties:
allPreviousSteps:
type: boolean
previousStepNumbers:
description: previous step numbers starting from 1
items:
format: int32
type: integer
type: array
type: object
execute:
items:
description: TestSuiteStepSpec for particular type will have
Expand Down Expand Up @@ -783,6 +807,18 @@ spec:
items:
description: TestSuiteBatchStep is set of steps run in parallel
properties:
downloadArtifacts:
description: options to download artifacts from previous steps
properties:
allPreviousSteps:
type: boolean
previousStepNumbers:
description: previous step numbers starting from 1
items:
format: int32
type: integer
type: array
type: object
execute:
items:
description: TestSuiteStepSpec for particular type will have
Expand Down

0 comments on commit c66d03d

Please sign in to comment.