Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions pipelines/types/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,21 @@ func (s *ProwJobStep) IsWellFormedOverInputs() bool {
return true
}

// ProwJobValidationStep represents a shell step that is a validation step.
type ProwJobValidationStep struct {
ProwJobStep `json:",inline"`
Validation []string `json:"validation,omitempty"`
}

func (s *ProwJobValidationStep) Validations() []string {
return s.Validation
}

func (s *ProwJobValidationStep) IsWellFormedOverInputs() bool {
// raw shell steps capture the whole repository as an archive input, so they are not well-formed
return false
}

const StepActionGrafanaDashboards = "GrafanaDashboards"

type GrafanaDashboardsStep struct {
Expand Down
6 changes: 6 additions & 0 deletions pipelines/types/resourcegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ func (s *Steps) UnmarshalJSON(data []byte) error {
step = &GenevaHealthStep{}
case StepActionPublishGenevaAutomation:
step = &PublishGenevaAutomationStep{}
case StepActionProwJob:
step = &ProwJobStep{}
case StepActionGrafanaDashboards:
step = &GrafanaDashboardsStep{}
default:
step = &GenericStep{}
}
Expand Down Expand Up @@ -166,6 +170,8 @@ func (s *ValidationSteps) UnmarshalJSON(data []byte) error {
switch stepMeta.Action {
case StepActionShell:
step = &ShellValidationStep{}
case StepActionProwJob:
step = &ProwJobValidationStep{}
default:
step = &GenericValidationStep{}
}
Expand Down
17 changes: 17 additions & 0 deletions pipelines/types/testdata/zz_fixture_TestNewPipelineFromFile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,32 @@ resourceGroups:
configRef: ev2.assistedId.certificate.keyVault
workflowPath: path/to/workflow
- action: GrafanaDashboards
grafanaName:
name: whatever
resourceGroup: regional
step: deploy
identityFrom:
name: whatever
resourceGroup: regional
step: deploy
name: dashboards
observabilityConfig: ./observability.yaml
subscription: hcp-uksouth
subscriptionProvisioning:
displayName:
configRef: svc.subscription.displayName
roleAssignment: test.bicepparam
validationSteps:
- action: ProwJob
gatePromotion: true
identityFrom:
name: whatever
resourceGroup: regional
step: deploy
jobName: test-me
name: e2e
tokenKeyvault: arohcpint-global.vault.azure.net
tokenSecret: prow-token
validation:
- Internal
rolloutName: Test Rollout
Expand Down
Loading