Skip to content

Commit

Permalink
feat: [TKC-3102] generation and resource causes (#312)
Browse files Browse the repository at this point in the history
* feat: generation and resource causes

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: add causes to crd

Signed-off-by: Vladislav Sukhin <[email protected]>

---------

Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin authored Jan 22, 2025
1 parent 7fac440 commit e35b203
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/testtriggers/v1/testtrigger_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const (
)

// TestTriggerEvent defines event for test triggers
// +kubebuilder:validation:Enum=created;modified;deleted;deployment-scale-update;deployment-image-update;deployment-env-update;deployment-containers-modified;event-start-test;event-end-test-success;event-end-test-failed;event-end-test-aborted;event-end-test-timeout;event-start-testsuite;event-end-testsuite-success;event-end-testsuite-failed;event-end-testsuite-aborted;event-end-testsuite-timeout;event-queue-testworkflow;event-start-testworkflow;event-end-testworkflow-success;event-end-testworkflow-failed;event-end-testworkflow-aborted;event-created;event-updated;event-deleted
// +kubebuilder:validation:Enum=created;modified;deleted;deployment-scale-update;deployment-image-update;deployment-env-update;deployment-containers-modified;deployment-generation-modified;deployment-resource-modified;event-start-test;event-end-test-success;event-end-test-failed;event-end-test-aborted;event-end-test-timeout;event-start-testsuite;event-end-testsuite-success;event-end-testsuite-failed;event-end-testsuite-aborted;event-end-testsuite-timeout;event-queue-testworkflow;event-start-testworkflow;event-end-testworkflow-success;event-end-testworkflow-failed;event-end-testworkflow-aborted;event-created;event-updated;event-deleted
type TestTriggerEvent string

// List of TestTriggerEvents
Expand All @@ -96,6 +96,8 @@ const (
TestTriggerCauseDeploymentImageUpdate TestTriggerEvent = "deployment-image-update"
TestTriggerCauseDeploymentEnvUpdate TestTriggerEvent = "deployment-env-update"
TestTriggerCauseDeploymentContainersModified TestTriggerEvent = "deployment-containers-modified"
TestTriggerCauseDeploymentGenerationModified TestTriggerEvent = "deployment-generation-modified"
TestTriggerCauseDeploymentResourceModified TestTriggerEvent = "deployment-resource-modified"
TestTriggerCauseEventStartTest TestTriggerEvent = "event-start-test"
TestTriggerCauseEventEndTestSuccess TestTriggerEvent = "event-end-test-success"
TestTriggerCauseEventEndTestFailed TestTriggerEvent = "event-end-test-failed"
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/tests.testkube.io_testtriggers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ spec:
- deployment-image-update
- deployment-env-update
- deployment-containers-modified
- deployment-generation-modified
- deployment-resource-modified
- event-start-test
- event-end-test-success
- event-end-test-failed
Expand Down
2 changes: 2 additions & 0 deletions pkg/validation/tests/v1/testtrigger/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const (
CauseDeploymentImageUpdate Cause = "deployment-image-update"
CauseDeploymentEnvUpdate Cause = "deployment-env-update"
CauseDeploymentContainersModified Cause = "deployment-containers-modified"
CauseDeploymentGenerationModified Cause = "deployment-generation-modified"
CauseDeploymentResourceModified Cause = "deployment-resource-modified"
CauseEventStartTest Cause = "event-start-test"
CauseEventEndTestSuccess Cause = "event-end-test-success"
CauseEventEndTestFailed Cause = "event-end-test-failed"
Expand Down

0 comments on commit e35b203

Please sign in to comment.