Skip to content

Commit

Permalink
fix: regenerated crd
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin committed Jul 9, 2024
1 parent f257a81 commit cdf6257
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 63 deletions.
8 changes: 6 additions & 2 deletions api/testworkflows/v1/testworkflowexecution_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ type TestWorkflowRunningContext struct {
}

// TestWorkflowRunningContextActor : supported actors for test workflow running context
// +kubebuilder:validation:Enum=cron;testrigger;user;testworkflow;testworkflowexecution
type TestWorkflowRunningContextActor string

// List of TestWorkflowRunningContextActor
Expand All @@ -112,15 +113,18 @@ type TestWorkflowRunningContextCaller struct {
}

// TestWorkflowRunningContextCallerResourceType : supported caller resource types for test workflow running context
// +kubebuilder:validation:Enum=testworkflow;testworkflowexecution;testrigger
type TestWorkflowRunningContextCallerResourceType string

// List of TestWorkflowRunningContextCallerResourceType
const (
TESTWORKFLOW_TestWorkflowRunningContextCallerResourceType TestWorkflowRunningContextCallerResourceType = "testworkflow"
TESTTRIGGER_TestWorkflowRunningContextCallerResourceType TestWorkflowRunningContextCallerResourceType = "testtrigger"
TESTWORKFLOW_TestWorkflowRunningContextCallerResourceType TestWorkflowRunningContextCallerResourceType = "testworkflow"
TESTWORKFLOWEXECUTION_TestWorkflowRunningContextCallerResourceType TestWorkflowRunningContextCallerResourceType = "testworkflowexecution"
TESTTRIGGER_TestWorkflowRunningContextCallerResourceType TestWorkflowRunningContextCallerResourceType = "testtrigger"
)

// TestWorkflowRunningContextInterface : supported interfaces for test workflow running context
// +kubebuilder:validation:Enum=cli;ui;api;internal
type TestWorkflowRunningContextInterface string

// List of TestWorkflowRunningContextInterface
Expand Down
150 changes: 108 additions & 42 deletions config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,60 @@ spec:
description: custom execution name
type: string
runningContext:
description: running context for test or test workflow execution
properties:
context:
description: Context value depending from its type
type: string
type:
description: One of possible context types
enum:
- user-cli
- user-ui
- testsuite
- testtrigger
- scheduler
- testexecution
- testsuiteexecution
- testworkflow
- testworkflowexecution
type: string
required:
- type
type: object
description: running context for the test workflow execution
items:
description: running context for test workflow execution
properties:
actor:
description: 'TestWorkflowRunningContextActor : supported
actors for test workflow running context'
enum:
- cron
- testrigger
- user
- testworkflow
- testworkflowexecution
type: string
caller:
description: running context caller for test workflow execution
properties:
callerResourceExecutionID:
description: caller resource execution id
type: string
callerResourceName:
description: caller resource name
type: string
callerResourceType:
description: 'TestWorkflowRunningContextCallerResourceType
: supported caller resource types for test workflow
running context'
enum:
- testworkflow
- testworkflowexecution
- testrigger
type: string
fullExecutionPath:
description: all test workflow execution ids starting
from the root
type: string
required:
- callerResourceName
- callerResourceType
type: object
interface:
description: 'TestWorkflowRunningContextInterface : supported
interfaces for test workflow running context'
enum:
- cli
- ui
- api
- internal
type: string
required:
- actor
- interface
type: object
type: array
testWorkflowExecutionName:
description: test workflow execution name started the test workflow execution
type: string
Expand Down Expand Up @@ -310,27 +343,60 @@ spec:
- status
type: object
runningContext:
description: running context for test or test workflow execution
properties:
context:
description: Context value depending from its type
type: string
type:
description: One of possible context types
enum:
- user-cli
- user-ui
- testsuite
- testtrigger
- scheduler
- testexecution
- testsuiteexecution
- testworkflow
- testworkflowexecution
type: string
required:
- type
type: object
description: running context for the test workflow execution
items:
description: running context for test workflow execution
properties:
actor:
description: 'TestWorkflowRunningContextActor : supported
actors for test workflow running context'
enum:
- cron
- testrigger
- user
- testworkflow
- testworkflowexecution
type: string
caller:
description: running context caller for test workflow execution
properties:
callerResourceExecutionID:
description: caller resource execution id
type: string
callerResourceName:
description: caller resource name
type: string
callerResourceType:
description: 'TestWorkflowRunningContextCallerResourceType
: supported caller resource types for test workflow
running context'
enum:
- testworkflow
- testworkflowexecution
- testrigger
type: string
fullExecutionPath:
description: all test workflow execution ids starting
from the root
type: string
required:
- callerResourceName
- callerResourceType
type: object
interface:
description: 'TestWorkflowRunningContextInterface : supported
interfaces for test workflow running context'
enum:
- cli
- ui
- api
- internal
type: string
required:
- actor
- interface
type: object
type: array
scheduledAt:
description: when the execution has been scheduled to run
format: date-time
Expand Down
71 changes: 52 additions & 19 deletions config/crd/bases/testworkflows.testkube.io_testworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10708,27 +10708,60 @@ spec:
- totalDurationMs
type: object
runningContext:
description: running context for test or test workflow execution
properties:
context:
description: Context value depending from its type
type: string
type:
description: One of possible context types
enum:
- user-cli
- user-ui
- testsuite
- testtrigger
- scheduler
- testexecution
- testsuiteexecution
description: running context for the test workflow execution
items:
description: running context for test workflow execution
properties:
actor:
description: 'TestWorkflowRunningContextActor : supported
actors for test workflow running context'
enum:
- cron
- testrigger
- user
- testworkflow
- testworkflowexecution
type: string
required:
- type
type: object
type: string
caller:
description: running context caller for test workflow execution
properties:
callerResourceExecutionID:
description: caller resource execution id
type: string
callerResourceName:
description: caller resource name
type: string
callerResourceType:
description: 'TestWorkflowRunningContextCallerResourceType
: supported caller resource types for test workflow
running context'
enum:
- testworkflow
- testworkflowexecution
- testrigger
type: string
fullExecutionPath:
description: all test workflow execution ids starting
from the root
type: string
required:
- callerResourceName
- callerResourceType
type: object
interface:
description: 'TestWorkflowRunningContextInterface : supported
interfaces for test workflow running context'
enum:
- cli
- ui
- api
- internal
type: string
required:
- actor
- interface
type: object
type: array
scheduledAt:
description: when the execution has been scheduled to run
format: date-time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,15 @@ func (r *TestWorkflowExecutionReconciler) Reconcile(ctx context.Context, req ctr
if testWorkflowExecution.Spec.ExecutionRequest != nil {
interface_ := testworkflowsv1.API_TestWorkflowRunningContextInterface
actor := testworkflowsv1.TESTWORKFLOWEXECUTION_TestWorkflowRunningContextActor
callerResourceType := testworkflowsv1.TESTWORKFLOWEXECUTION_TestWorkflowRunningContextCallerResourceType
testWorkflowExecution.Spec.ExecutionRequest.RunningContext = []testworkflowsv1.TestWorkflowRunningContext{
{
Interface_: &interface_,
Actor: &actor,
Caller: &testworkflowsv1.TestWorkflowRunningContextCaller{
CallerResourceType: &callerResourceType,
CallerResourceName: testWorkflowExecution.Name,
},
},
}
}
Expand Down

0 comments on commit cdf6257

Please sign in to comment.