Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Release/v1.17.54 #277

Open
wants to merge 107 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
71e7f7f
feat: cron job template field (#132) (#133)
vsukhin May 3, 2023
b1213c7
feat: deprecate args (#130)
vsukhin May 3, 2023
4224945
fix: upload variables file (#135)
vLia May 4, 2023
3306a20
add tests for develop branch (#136)
ypoplavs May 5, 2023
861c0ac
add check fir release branch (#137)
ypoplavs May 8, 2023
ffa9d74
comment out the automatic merge of release branch for now
ypoplavs May 10, 2023
8f9bb9d
fix release branch naming
ypoplavs May 10, 2023
bbb6fc0
fix typo
ypoplavs May 10, 2023
0222b15
fix path for goreleaser file
ypoplavs May 16, 2023
2f1e170
rename release branch (#142)
ypoplavs May 16, 2023
355e4bf
ci: parametrize alpine (#144)
ypoplavs May 25, 2023
b8c8300
fix: ttl for trigger condition (#143)
vsukhin May 25, 2023
4168152
ci: rename gh token var (#145)
ypoplavs May 25, 2023
5087440
fix: add missing var for alpine image for arm64 arch
ypoplavs May 26, 2023
1e9a3cf
fix: remove empty username and token (#147)
vsukhin May 26, 2023
e3870b0
ci: add docker registry description (#146)
ypoplavs May 26, 2023
86b5aba
ci: add workflow dispatch (#149)
ypoplavs May 31, 2023
eed35fe
fix: support external secrets for tests (#148)
vsukhin Jun 2, 2023
afea426
feat: webhook templlate and headers (#152)
vsukhin Jun 7, 2023
033b048
fix: secret check (#153)
vsukhin Jun 9, 2023
48fd2fa
feat: provide known condition types (#155)
vsukhin Jun 13, 2023
95faaa7
feat: parallel testsuite (#109)
vsukhin Jun 15, 2023
a2224e7
fix: remove run secrets as well (#139)
nicufk Jun 21, 2023
30d80e4
feat: postrun script (#156)
vsukhin Jun 22, 2023
89ba17b
ci: remove release branch creation in helm-charts repo (#157)
ypoplavs Jun 27, 2023
e416a8c
feat: probe conditions (#158)
vsukhin Jul 3, 2023
8815bd8
fix: don't remove non Testkube secrets (#160)
vsukhin Jul 6, 2023
bc8cd9f
feat: remove outdated description (#164)
vsukhin Jul 17, 2023
edf3c1d
fix: image registry (#166)
vsukhin Aug 7, 2023
071c677
feat: basic test execution crd (#165)
vsukhin Aug 11, 2023
9570ed2
fix: use go 1.21 (#169)
vsukhin Aug 16, 2023
870da6e
fix: context typo (#171)
vsukhin Aug 24, 2023
199e57e
feat: artifact bucket (#170)
vsukhin Aug 24, 2023
8fda604
feat: test field (#172)
vsukhin Aug 24, 2023
5c2e383
feat: template crd (#173)
vsukhin Sep 5, 2023
e93d866
feat: adjust uri descrription (#174)
vsukhin Sep 7, 2023
4d087b2
feat: trigger concurrency policy (#175)
vsukhin Sep 18, 2023
fe2d1f9
Added slaves field in executor CRD to add slaves configuration (#177)
hiteshwani Sep 26, 2023
785d106
feat: update operator to use latest kubebuilder layout (#178)
dejanzele Sep 27, 2023
688b0e1
fix invalid reference (#179)
dejanzele Sep 27, 2023
5fc2021
fix mocks (#180)
dejanzele Sep 27, 2023
457bf71
fix: make test fields optional (#181)
dejanzele Sep 27, 2023
aa5afde
feat: execute post run script before scraping field (#183)
vsukhin Oct 5, 2023
3ec1179
feat: regex field (#186)
vsukhin Oct 20, 2023
62a7951
fix: visibility for secrets (#187)
vsukhin Oct 20, 2023
11468a1
fix: back merge (#191)
vsukhin Oct 25, 2023
f61e073
feat: data dir as working dir (#192)
vsukhin Nov 2, 2023
c66d03d
feat: pass artifacts testsuite (#193)
vsukhin Nov 8, 2023
1f48caf
fix: correct downloading tools with Go 1.16+ (#195)
rangoo94 Nov 10, 2023
0a5b5ef
chore: rename default secret label (#196)
fivenp Nov 14, 2023
803ccbc
feat: support argo cd sync (#197)
vsukhin Nov 15, 2023
ab055e3
feat: slave pod spec (#199)
vsukhin Nov 27, 2023
0b0eb5b
feat: install controller-gen 0.8.0 (#202)
rangoo94 Nov 27, 2023
2fc74ce
chore: update dependencies to latest (#203)
dejanzele Nov 30, 2023
83394de
feat: add executor and webhook listers and informers [TKC-631] (#205)
vLia Dec 6, 2023
9c1a0e0
feat: step start and end time (#206)
vsukhin Dec 10, 2023
483fef2
feat: artifact enhancement (#207)
vsukhin Dec 14, 2023
bc33d02
fix: back merge (#209)
vsukhin Jan 4, 2024
4389d76
fix: update Kustomize the latest version, so it can be installed corr…
rangoo94 Jan 8, 2024
2c37729
fix: add test source scheme (#211)
vsukhin Jan 18, 2024
eb0de2b
fix: replace args mode (#213)
vsukhin Feb 7, 2024
f70b2e7
fixL sanitize cron job name (#214)
vsukhin Feb 16, 2024
c1770f0
feat: add CRD manifests for the future TestWorkflow schema (#216)
rangoo94 Feb 21, 2024
6396dbe
feat: [TKC-1055] test suite steps persistence (#219)
vLia Feb 23, 2024
1852257
feat(TKC-1466): define initial expressions language tags schema in th…
rangoo94 Feb 27, 2024
6a9821b
docs: update license conditions (#222)
vLia Feb 27, 2024
c1e3dd2
feat: execution namespace field (#218)
vsukhin Mar 1, 2024
4909488
feat(TKC-1466): force parsing Kubernetes objects with templates in ex…
rangoo94 Mar 1, 2024
b7aaa27
fix: add source scripts field (#215)
vsukhin Mar 4, 2024
d195552
feat: make test suite steps params oss (#225)
vLia Mar 6, 2024
059fddf
fix: secrets update (#227)
vsukhin Mar 7, 2024
6625e24
fix: remove step sync (#230)
vLia Mar 12, 2024
c5c7958
feat: add Volumes/VolumeMounts/Setup to TestWorkflows (#229)
rangoo94 Mar 12, 2024
07cd5e8
Revert "fix: remove step sync (#230)" (#232)
vLia Mar 12, 2024
03a6d2d
fix: add workingDir to artifacts step (#233)
rangoo94 Mar 14, 2024
fdc6429
feat: [TKC-1570] disable secret var (#235)
vsukhin Mar 21, 2024
a36d153
feat(TKC-1808): add run.shell option (#238)
rangoo94 Apr 3, 2024
42e9be4
feat: use default storage class name field (#237)
vsukhin Apr 11, 2024
3be9f81
feat(testworkflows): allow to pass matrix/shards for the TestWorkflow…
rangoo94 Apr 17, 2024
cb78b80
feat: test workflow cron job (#240)
vsukhin Apr 17, 2024
ce20f78
feat: add option to transfer data in `execute` step (#243)
rangoo94 Apr 22, 2024
14301b5
fix: move "events" to top of the spec (#244)
rangoo94 Apr 22, 2024
32189cd
feat(testworkflows): add option for pausing steps (#245)
rangoo94 Apr 25, 2024
400ed94
feat: add testworkflow for triggers (#246)
vsukhin Apr 25, 2024
eefe27f
feat(testworkflows): support advanced Pod configuration (#247)
rangoo94 Apr 25, 2024
cd47897
fix yaml docs separator (#248)
sebhoss Apr 26, 2024
cd8cd18
feat: testworkflow events (#249)
vsukhin May 6, 2024
6d9804f
fix(testworkflows): support nested expressions in "run" and config pa…
rangoo94 May 7, 2024
d7b034f
feat: test workflow execution namespace (#251)
vsukhin May 9, 2024
cb34b51
feat(testworkflows): add activeDeadlineSeconds for job (#252)
rangoo94 May 10, 2024
d7a25f5
feat: test trigger evvent causes (#254)
vsukhin May 14, 2024
9c46a4f
feat(testworkflows): parallel steps (#253)
rangoo94 May 15, 2024
6e48b6c
feat(testworkflows): add support for accompanying services (#257)
rangoo94 May 16, 2024
07a4da8
feat: sidecar scraper (#258)
vsukhin May 20, 2024
3bb64eb
feat: disable the webhook (#261)
vLia May 22, 2024
4336c33
fix(testworkflows): change services[k].logs to be expression instead …
rangoo94 May 24, 2024
5817a62
fix(testworkflows): support any kind of values in static array of Dyn…
rangoo94 May 24, 2024
7d3ddc7
chore: upgrade controller-gen to v0.15.0 (#267)
rangoo94 May 27, 2024
5e235fc
fix(testworkflows): allow to pass service description (#268)
rangoo94 May 28, 2024
c16a678
feat: test workflow execution model (#262)
vsukhin May 28, 2024
fa1c648
feat: test workflow status (#269)
vsukhin Jun 3, 2024
c5cda10
feat: disable webhooks for tests and test suites (#271)
vLia Jun 3, 2024
d47d864
fix: data typo (#272)
vsukhin Jun 3, 2024
f91b0db
fix(testworkflows): make CRD for TestWorkflowExecution valid (#274)
rangoo94 Jun 4, 2024
a56be54
feat(testworkflows): allow to pass SSH private key for cloning Git re…
rangoo94 Jun 4, 2024
f76a846
feat: disable workflow webhooks (#276)
vLia Jun 7, 2024
24d641c
Merge remote-tracking branch 'origin/main' into release/v1.17.54
exu Jun 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ manifests-create: controller-gen ## Generate WebhookConfiguration, ClusterRole a
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases

manifests-clean: yq
@for file in testworkflows.testkube.io_testworkflows.yaml testworkflows.testkube.io_testworkflowtemplates.yaml; do \
@for file in testworkflows.testkube.io_testworkflows.yaml testworkflows.testkube.io_testworkflowtemplates.yaml testworkflows.testkube.io_testworkflowexecutions.yaml; do \
for key in securityContext volumes dnsPolicy affinity tolerations hostAliases dnsConfig topologySpreadConstraints schedulingGates resourceClaims volumeMounts fieldRef resourceFieldRef configMapKeyRef secretKeyRef; do \
yq --no-colors -i "del(.. | select(has(\"$$key\")).$$key | .. | select(has(\"description\")).description)" "config/crd/bases/$$file"; \
done; \
Expand Down
2 changes: 2 additions & 0 deletions api/testexecution/v1/testexecution_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ type ExecutionRequest struct {
SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"`
// namespace for test execution (Pro edition only)
ExecutionNamespace string `json:"executionNamespace,omitempty"`
// whether webhooks should be called on execution
DisableWebhooks *bool `json:"disableWebhooks,omitempty"`
}

// ArgsModeType defines args mode type
Expand Down
5 changes: 5 additions & 0 deletions api/testexecution/v1/zz_generated.deepcopy.go

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

2 changes: 2 additions & 0 deletions api/tests/v3/test_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ type ExecutionRequest struct {
SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"`
// namespace for test execution (Pro edition only)
ExecutionNamespace string `json:"executionNamespace,omitempty"`
// whether webhooks should be called on execution
DisableWebhooks bool `json:"disableWebhooks,omitempty"`
}

// ArgsModeType defines args mode type
Expand Down
4 changes: 4 additions & 0 deletions api/testsuite/v3/testsuite_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ type TestSuiteExecutionRequest struct {
PvcTemplate string `json:"pvcTemplate,omitempty"`
// name of the template resource
PvcTemplateReference string `json:"pvcTemplateReference,omitempty"`
// whether webhooks should be called on execution
DisableWebhooks bool `json:"disableWebhooks,omitempty"`
}

type TestSuiteExecutionStatus string
Expand Down Expand Up @@ -232,4 +234,6 @@ type TestSuiteStepExecutionRequest struct {
// pvc template extensions reference
PvcTemplateReference string `json:"pvcTemplateReference,omitempty"`
RunningContext *commonv1.RunningContext `json:"runningContext,omitempty"`
// whether webhooks should be called on execution
DisableWebhooks bool `json:"disableWebhooks,omitempty"`
}
2 changes: 2 additions & 0 deletions api/testsuiteexecution/v1/testsuiteexecution_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ type Execution struct {
SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"`
// namespace for test execution (Pro edition only)
ExecutionNamespace string `json:"executionNamespace,omitempty"`
// whether webhooks should be disabled for this execution
DisableWebhooks bool `json:"disableWebhooks,omitempty"`
}

// artifact request body with test artifacts
Expand Down
3 changes: 3 additions & 0 deletions api/testworkflows/v1/base_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ type TestWorkflowSpecBase struct {

// configuration for the scheduled pod
Pod *PodConfig `json:"pod,omitempty" expr:"include"`

// configuration for notifications
Notifications *NotificationsConfig `json:"notifications,omitempty" expr:"include"`
}
4 changes: 4 additions & 0 deletions api/testworkflows/v1/content_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ type ContentGit struct {
Token string `json:"token,omitempty" expr:"template"`
// external token to fetch with
TokenFrom *corev1.EnvVarSource `json:"tokenFrom,omitempty" expr:"force"`
// plain text SSH private key to fetch with
SshKey string `json:"sshKey,omitempty" expr:"template"`
// external SSH private key to fetch with
SshKeyFrom *corev1.EnvVarSource `json:"sshKeyFrom,omitempty" expr:"force"`
// authorization type for the credentials
AuthType testsv3.GitAuthType `json:"authType,omitempty" expr:"template"`
// where to mount the fetched repository contents (defaults to "repo" directory in the data volume)
Expand Down
51 changes: 51 additions & 0 deletions api/testworkflows/v1/status_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// TestWorkflowExecutionSummary contains TestWorkflow execution summary
type TestWorkflowExecutionSummary struct {
// unique execution identifier
Id string `json:"id"`
// execution name
Name string `json:"name"`
// sequence number for the execution
Number int32 `json:"number,omitempty"`
// when the execution has been scheduled to run
ScheduledAt metav1.Time `json:"scheduledAt,omitempty"`
// when the execution result's status has changed last time (queued, passed, failed)
StatusAt metav1.Time `json:"statusAt,omitempty"`
Result *TestWorkflowResultSummary `json:"result,omitempty"`
Workflow *TestWorkflowSummary `json:"workflow"`
}

// TestWorkflowResultSummary defines TestWorkflow result summary
type TestWorkflowResultSummary struct {
Status *TestWorkflowStatus `json:"status"`
PredictedStatus *TestWorkflowStatus `json:"predictedStatus"`
// when the pod was created
QueuedAt metav1.Time `json:"queuedAt,omitempty"`
// when the pod has been successfully assigned
StartedAt metav1.Time `json:"startedAt,omitempty"`
// when the pod has been completed
FinishedAt metav1.Time `json:"finishedAt,omitempty"`
// Go-formatted (human-readable) duration
Duration string `json:"duration,omitempty"`
// Go-formatted (human-readable) duration (incl. pause)
TotalDuration string `json:"totalDuration,omitempty"`
// Duration in milliseconds
DurationMs int32 `json:"durationMs"`
// Duration in milliseconds (incl. pause)
TotalDurationMs int32 `json:"totalDurationMs"`
// Pause duration in milliseconds
PausedMs int32 `json:"pausedMs"`
}

// TestWorkflowSummary fas TestWorkflow summary
type TestWorkflowSummary struct {
Name string `json:"name,omitempty"`
Namespace string `json:"namespace,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
12 changes: 10 additions & 2 deletions api/testworkflows/v1/testworkflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ type TemplateRef struct {
Config map[string]intstr.IntOrString `json:"config,omitempty" expr:"template"`
}

// +kubebuilder:object:root=true
// test workflow status
type TestWorkflowStatusSummary struct {
LatestExecution *TestWorkflowExecutionSummary `json:"latestExecution,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:storageversion

// TestWorkflow is the Schema for the workflows API
type TestWorkflow struct {
Expand All @@ -59,7 +66,8 @@ type TestWorkflow struct {
Description string `json:"description,omitempty"`

// TestWorkflow specification
Spec TestWorkflowSpec `json:"spec" expr:"include"`
Spec TestWorkflowSpec `json:"spec" expr:"include"`
Status TestWorkflowStatusSummary `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
237 changes: 237 additions & 0 deletions api/testworkflows/v1/testworkflowexecution_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
/*
Copyright 2021.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)

// TestWorkflowExecutionSpec defines the desired state of TestWorkflowExecution
type TestWorkflowExecutionSpec struct {

Check failure on line 23 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / docker

TestWorkflowExecutionSpec redeclared in this block

Check failure on line 23 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / build

TestWorkflowExecutionSpec redeclared in this block
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

TestWorkflow *corev1.LocalObjectReference `json:"testWorkflow" expr:"include"`
ExecutionRequest *TestWorkflowExecutionRequest `json:"executionRequest,omitempty" expr:"include"`
}

// TestWorkflowExecutionRequest contains TestWorkflow execution parameters
type TestWorkflowExecutionRequest struct {

Check failure on line 32 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / docker

TestWorkflowExecutionRequest redeclared in this block

Check failure on line 32 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / build

TestWorkflowExecutionRequest redeclared in this block
// custom execution name
Name string `json:"name,omitempty" expr:"template"`
Config map[string]intstr.IntOrString `json:"config,omitempty" expr:"template"`
// test workflow execution name started the test workflow execution
TestWorkflowExecutionName string `json:"testWorkflowExecutionName,omitempty" expr:"template"`
}

// TestWorkflowExecutionStatus defines the observed state of TestWorkflowExecution
type TestWorkflowExecutionStatus struct {

Check failure on line 41 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / docker

TestWorkflowExecutionStatus redeclared in this block

Check failure on line 41 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / build

TestWorkflowExecutionStatus redeclared in this block
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
LatestExecution *TestWorkflowExecutionDetails `json:"latestExecution,omitempty"`
// test workflow execution generation
Generation int64 `json:"generation,omitempty"`
}

// TestWorkflowExecutionDetails contains the details of TestWorkflowExecution
type TestWorkflowExecutionDetails struct {

Check failure on line 50 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / docker

TestWorkflowExecutionDetails redeclared in this block

Check failure on line 50 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / build

TestWorkflowExecutionDetails redeclared in this block
// unique execution identifier
Id string `json:"id"`
// execution name
Name string `json:"name"`
// execution namespace
Namespace string `json:"namespace,omitempty"`
// sequence number for the execution
Number int32 `json:"number,omitempty"`
// when the execution has been scheduled to run
ScheduledAt metav1.Time `json:"scheduledAt,omitempty"`
// when the execution result's status has changed last time (queued, passed, failed)
StatusAt metav1.Time `json:"statusAt,omitempty"`
// structured tree of steps
Signature []TestWorkflowSignature `json:"signature,omitempty"`
Result *TestWorkflowResult `json:"result,omitempty"`
// additional information from the steps, like referenced executed tests or artifacts
Output []TestWorkflowOutput `json:"output,omitempty"`
// generated reports from the steps, like junit
Reports []TestWorkflowReport `json:"reports,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
Workflow *TestWorkflow `json:"workflow"`
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
ResolvedWorkflow *TestWorkflow `json:"resolvedWorkflow,omitempty"`
// test workflow execution name started the test workflow execution
TestWorkflowExecutionName string `json:"testWorkflowExecutionName,omitempty"`
}

// TestWorkflowSignature has signature of TestWorkflow
type TestWorkflowSignature struct {

Check failure on line 81 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / docker

TestWorkflowSignature redeclared in this block

Check failure on line 81 in api/testworkflows/v1/testworkflowexecution_types.go

View workflow job for this annotation

GitHub Actions / build

TestWorkflowSignature redeclared in this block
// step reference
Ref string `json:"ref,omitempty"`
// step name
Name string `json:"name,omitempty"`
// step category, that may be used as name fallback
Category string `json:"category,omitempty"`
// is the step/group meant to be optional
Optional bool `json:"optional,omitempty"`
// is the step/group meant to be negative
Negative bool `json:"negative,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
Children []TestWorkflowSignature `json:"children,omitempty"`
}

// TestWorkflowResult contains result of TestWorkflow
type TestWorkflowResult struct {
Status *TestWorkflowStatus `json:"status"`
PredictedStatus *TestWorkflowStatus `json:"predictedStatus"`
// when the pod was created
QueuedAt metav1.Time `json:"queuedAt,omitempty"`
// when the pod has been successfully assigned
StartedAt metav1.Time `json:"startedAt,omitempty"`
// when the pod has been completed
FinishedAt metav1.Time `json:"finishedAt,omitempty"`
// Go-formatted (human-readable) duration
Duration string `json:"duration,omitempty"`
// Go-formatted (human-readable) total duration (incl. pause)
TotalDuration string `json:"totalDuration,omitempty"`
// Duration in milliseconds
DurationMs int32 `json:"durationMs,omitempty"`
// Pause duration in milliseconds
PausedMs int32 `json:"pausedMs,omitempty"`
// Total duration in milliseconds (incl. pause)
TotalDurationMs int32 `json:"totalDurationMs,omitempty"`
Pauses []TestWorkflowPause `json:"pauses,omitempty"`
Initialization *TestWorkflowStepResult `json:"initialization,omitempty"`
Steps map[string]TestWorkflowStepResult `json:"steps,omitempty"`
}

// TestWorkflowStatus has status of TestWorkflow
// +kubebuilder:validation:Enum=queued;running;paused;passed;failed;aborted
type TestWorkflowStatus string

// List of TestWorkflowStatus
const (
QUEUED_TestWorkflowStatus TestWorkflowStatus = "queued"
RUNNING_TestWorkflowStatus TestWorkflowStatus = "running"
PAUSED_TestWorkflowStatus TestWorkflowStatus = "paused"
PASSED_TestWorkflowStatus TestWorkflowStatus = "passed"
FAILED_TestWorkflowStatus TestWorkflowStatus = "failed"
ABORTED_TestWorkflowStatus TestWorkflowStatus = "aborted"
)

// TestWorkflowPause defines pause of TestWorkflow
type TestWorkflowPause struct {
// step at which it was paused
Ref string `json:"ref"`
// when the pause has started
PausedAt metav1.Time `json:"pausedAt"`
// when the pause has ended
ResumedAt metav1.Time `json:"resumedAt,omitempty"`
}

// TestWorkflowStepResult contains step result of TestWorkflow
type TestWorkflowStepResult struct {
ErrorMessage string `json:"errorMessage,omitempty"`
Status *TestWorkflowStepStatus `json:"status,omitempty"`
ExitCode int64 `json:"exitCode,omitempty"`
// when the container was created
QueuedAt metav1.Time `json:"queuedAt,omitempty"`
// when the container was started
StartedAt metav1.Time `json:"startedAt,omitempty"`
// when the container was finished
FinishedAt metav1.Time `json:"finishedAt,omitempty"`
}

// TestWorkfloStepwStatus has step status of TestWorkflow
type TestWorkflowStepStatus string

// List of TestWorkflowStepStatus
// +kubebuilder:validation:Enum=queued;running;paused;passed;failed;timeout;skipped;aborted
const (
QUEUED_TestWorkflowStepStatus TestWorkflowStepStatus = "queued"
RUNNING_TestWorkflowStepStatus TestWorkflowStepStatus = "running"
PAUSED_TestWorkflowStepStatus TestWorkflowStepStatus = "paused"
PASSED_TestWorkflowStepStatus TestWorkflowStepStatus = "passed"
FAILED_TestWorkflowStepStatus TestWorkflowStepStatus = "failed"
TIMEOUT_TestWorkflowStepStatus TestWorkflowStepStatus = "timeout"
SKIPPED_TestWorkflowStepStatus TestWorkflowStepStatus = "skipped"
ABORTED_TestWorkflowStepStatus TestWorkflowStepStatus = "aborted"
)

// TestWorkflowOutput defines output of TestWorkflow
type TestWorkflowOutput struct {
// step reference
Ref string `json:"ref,omitempty"`
// output kind name
Name string `json:"name,omitempty"`
// value returned
Value map[string]DynamicList `json:"value,omitempty"`
}

// TestWorkflowStepReport contains report of TestWorkflow
type TestWorkflowReport struct {
// step reference
Ref string `json:"ref,omitempty"`
// report kind/type
Kind string `json:"kind,omitempty"`
// file path to full report in artifact storage
File string `json:"file,omitempty"`
Summary *TestWorkflowReportSummary `json:"summary,omitempty"`
}

// TestWorkflowStepReportSummary contains report summary of TestWorkflow
type TestWorkflowReportSummary struct {
// total number of test cases
Tests int32 `json:"tests,omitempty"`
// number of passed test cases
Passed int32 `json:"passed,omitempty"`
// number of failed test cases
Failed int32 `json:"failed,omitempty"`
// number of skipped test cases
Skipped int32 `json:"skipped,omitempty"`
// number of error test cases
Errored int32 `json:"errored,omitempty"`
// total duration of all test cases in milliseconds
Duration int64 `json:"duration,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// TestWorkflowExecution is the Schema for the workflows API
type TestWorkflowExecution struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

// TestWorkflowExecution specification
Spec TestWorkflowExecutionSpec `json:"spec" expr:"include"`
// TestWorkflowExecutionStatus specification
Status TestWorkflowExecutionStatus `json:"status,omitempty" expr:"include"`
}

//+kubebuilder:object:root=true

// TestWorkflowExecutionList contains a list of TestWorkflowExecutiom
type TestWorkflowExecutionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []TestWorkflowExecution `json:"items" expr:"include"`
}

func init() {
SchemeBuilder.Register(&TestWorkflowExecution{}, &TestWorkflowExecutionList{})
}
Loading
Loading