Skip to content

Commit

Permalink
fix: add source scripts field (#215)
Browse files Browse the repository at this point in the history
* fix: add source scripts field

* fix: adjust script source description
  • Loading branch information
vsukhin authored Mar 4, 2024
1 parent 4909488 commit b7aaa27
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 4 deletions.
8 changes: 6 additions & 2 deletions api/testexecution/v1/testexecution_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ type ExecutionRequest struct {
PostRunScript string `json:"postRunScript,omitempty"`
// execute post run script before scraping (prebuilt executor only)
ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"`
// run scripts using source command (container executor only)
SourceScripts bool `json:"sourceScripts,omitempty"`
// scraper template extensions
ScraperTemplate string `json:"scraperTemplate,omitempty"`
// config map references
Expand Down Expand Up @@ -259,8 +261,10 @@ type Execution struct {
// script to run after test execution
PostRunScript string `json:"postRunScript,omitempty"`
// execute post run script before scraping (prebuilt executor only)
ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"`
RunningContext *RunningContext `json:"runningContext,omitempty"`
ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"`
// run scripts using source command (container executor only)
SourceScripts bool `json:"sourceScripts,omitempty"`
RunningContext *RunningContext `json:"runningContext,omitempty"`
// shell used in container executor
ContainerShell string `json:"containerShell,omitempty"`
SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions api/tests/v3/test_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ type ExecutionRequest struct {
PostRunScript string `json:"postRunScript,omitempty"`
// execute post run script before scraping (prebuilt executor only)
ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"`
// run scripts using source command (container executor only)
SourceScripts bool `json:"sourceScripts,omitempty"`
// scraper template extensions
ScraperTemplate string `json:"scraperTemplate,omitempty"`
// name of the template resource
Expand Down
6 changes: 4 additions & 2 deletions api/testsuiteexecution/v1/testsuiteexecution_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,10 @@ type Execution struct {
// script to run after test execution
PostRunScript string `json:"postRunScript,omitempty"`
// execute post run script before scraping (prebuilt executor only)
ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"`
RunningContext *RunningContext `json:"runningContext,omitempty"`
ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"`
// run scripts using source command (container executor only)
SourceScripts bool `json:"sourceScripts,omitempty"`
RunningContext *RunningContext `json:"runningContext,omitempty"`
// shell used in container executor
ContainerShell string `json:"containerShell,omitempty"`
// test execution name started the test execution
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/tests.testkube.io_testexecutions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ spec:
type: object
type: object
type: object
sourceScripts:
description: run scripts using source command (container executor only)
type: boolean
sync:
description: whether to start execution sync or async
type: boolean
Expand Down Expand Up @@ -724,6 +727,9 @@ spec:
type: object
type: object
type: object
sourceScripts:
description: run scripts using source command (container executor only)
type: boolean
startTime:
description: test start time
format: date-time
Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/tests.testkube.io_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ spec:
type: object
type: object
type: object
sourceScripts:
description: run scripts using source command (container executor only)
type: boolean
sync:
description: whether to start execution sync or async
type: boolean
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,9 @@ spec:
type: object
type: object
type: object
sourceScripts:
description: run scripts using source command (container executor only)
type: boolean
startTime:
description: test start time
format: date-time
Expand Down Expand Up @@ -1163,6 +1166,9 @@ spec:
type: object
type: object
type: object
sourceScripts:
description: run scripts using source command (container executor only)
type: boolean
startTime:
description: test start time
format: date-time
Expand Down

0 comments on commit b7aaa27

Please sign in to comment.