types

package
v0.0.0-...-3b8b6db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const (
	StepActionRPLogs      = "RPLogsAccount"
	StepActionClusterLogs = "ClusterLogsAccount"
)
View Source
const StepActionARM = "ARM"
View Source
const StepActionARMStack = "ARMStack"
View Source
const StepActionCreateCertificate = "CreateCertificate"
View Source
const StepActionDelegateChildZone = "DelegateChildZone"
View Source
const StepActionEv2Registration = "Ev2Registration"
View Source
const StepActionFeatureRegistration = "FeatureRegistration"
View Source
const StepActionHelm = "Helm"
View Source
const StepActionImageMirror = "ImageMirror"
View Source
const StepActionKusto = "Kusto"
View Source
const StepActionPav2 = "Pav2"
View Source
const StepActionProviderFeatureRegistration = "ProviderFeatureRegistration"
View Source
const StepActionResourceProviderRegistration = "ResourceProviderRegistration"
View Source
const StepActionSecretSync = "SecretSync"
View Source
const StepActionSetCertificateIssuer = "SetCertificateIssuer"
View Source
const StepActionShell = "Shell"

Variables

View Source
var OnDemandSyncScript []byte

Functions

func SortDependencies

func SortDependencies(a, b StepDependency) int

func ValidatePipelineSchema

func ValidatePipelineSchema(pipelineContent []byte) error

Types

type ARMStackStep

type ARMStackStep struct {
	StepMeta        `json:",inline"`
	Variables       []Variable `json:"variables,omitempty"`
	Template        string     `json:"template,omitempty"`
	Parameters      string     `json:"parameters,omitempty"`
	DeploymentLevel string     `json:"deploymentLevel,omitempty"`

	// ActionOnUnmanage specifies what action to take when a resource previously owned by the deployment stack is no longer
	// specified. 'delete' will delete the resource, 'detach' will leave it as-is.
	ActionOnUnmanage string `json:"actionOnUnmanage,omitempty"`
	// BypassStackOutOfSyncError allows bypassing service errors that indicate the stack resource list is not correctly synchronized.
	BypassStackOutOfSyncError bool `json:"bypassStackOutOfSyncError,omitempty"`
}

ARMStackStep represents an ARM stack deployment step.

func (*ARMStackStep) Description

func (s *ARMStackStep) Description() string

Description Returns:

  • A string representation of this ShellStep

func (*ARMStackStep) RequiredInputs

func (s *ARMStackStep) RequiredInputs() []StepDependency

type ARMStep

type ARMStep struct {
	StepMeta        `json:",inline"`
	Variables       []Variable `json:"variables,omitempty"`
	Template        string     `json:"template,omitempty"`
	Parameters      string     `json:"parameters,omitempty"`
	DeploymentLevel string     `json:"deploymentLevel,omitempty"`
	OutputOnly      bool       `json:"outputOnly,omitempty"`
	DeploymentMode  string     `json:"deploymentMode,omitempty"`
}

ARMStep represents an ARM deployment step.

func (*ARMStep) Description

func (s *ARMStep) Description() string

Description Returns:

  • A string representation of this ShellStep

func (*ARMStep) RequiredInputs

func (s *ARMStep) RequiredInputs() []StepDependency

type AdoArtifactDownloadPipelineReference

type AdoArtifactDownloadPipelineReference struct {
	ADOProject   string `json:"adoProject,omitempty"`
	ArtifactName string `json:"artifactName,omitempty"`
	BuildID      string `json:"buildId,omitempty"`

	// FileSourceToDestination is a mapping of source file paths within the artifact to destination file paths in the local filesystem.
	FileSourceToDestination map[string]string `json:"fileSourceToDestination,omitempty"`
}

type AutomatedRetry

type AutomatedRetry struct {
	// ErrorContainsAny determines when a retry should run - if the output of a step contains any of
	// the strings in this array, matching in a case-insensitive manner, a retry will fire.
	// Must contain 16 or fewer items; the total encoded length of this array may not be more than 1KB.
	ErrorContainsAny []string `json:"errorContainsAny,omitempty"`

	// MaximumRetryCount is the maximum number of retires that should fire. Between 1 and 10, defaults to 1.
	MaximumRetryCount int `json:"maximumRetryCount,omitempty"`

	// DurationBetweenRetries is the amount of time to wait between retries. Must be between 1 minute and 3 hours.
	// Formatted using Go's time.Duration syntax.
	DurationBetweenRetries string `json:"durationBetweenRetries,omitempty"`
}

AutomatedRetry configures automated retry for failed steps.

type BuildStep

type BuildStep struct {
	// Command is the command to run for the build step.
	Command string `json:"command"`

	// Args are the command-line arguments to pass to the build step.
	Args []string `json:"args"`
}

BuildStep describes how artifacts should be built before any shell steps are run. The command specified here will run with the working directory set to the directory holding this pipeline specification.

type CreateCertificateStep

type CreateCertificateStep struct {
	StepMeta        `json:",inline"`
	VaultBaseUrl    Value `json:"vaultBaseUrl,omitempty"`
	CertificateName Value `json:"certificateName,omitempty"`
	ContentType     Value `json:"contentType,omitempty"`
	SAN             Value `json:"san,omitempty"`
	Issuer          Value `json:"issuer,omitempty"`
	SecretKeyVault  Value `json:"secretKeyVault,omitempty"`
	SecretName      Value `json:"secretName,omitempty"`
	ApplicationId   Value `json:"applicationId,omitempty"`
	CommonName      Value `json:"commonName,omitempty"`
}

func (*CreateCertificateStep) Description

func (s *CreateCertificateStep) Description() string

func (*CreateCertificateStep) RequiredInputs

func (s *CreateCertificateStep) RequiredInputs() []StepDependency

type DelegateChildZoneStep

type DelegateChildZoneStep struct {
	StepMeta       `json:",inline"`
	ParentZone     Value `json:"parentZone,omitempty"`
	ChildZone      Value `json:"childZone,omitempty"`
	SecretKeyVault Value `json:"secretKeyVault,omitempty"`
	SecretName     Value `json:"secretName,omitempty"`
	DstsHost       Value `json:"dstsHost,omitempty"`
}

func (*DelegateChildZoneStep) Description

func (s *DelegateChildZoneStep) Description() string

func (*DelegateChildZoneStep) RequiredInputs

func (s *DelegateChildZoneStep) RequiredInputs() []StepDependency

type DryRun

type DryRun struct {
	Variables []Variable `json:"variables,omitempty"`
	Command   string     `json:"command,omitempty"`
}

type Ev2RegistrationStep

type Ev2RegistrationStep struct {
	StepMeta     `json:",inline"`
	IdentityFrom Input `json:"identityFrom,omitempty"`
}

func (*Ev2RegistrationStep) Description

func (s *Ev2RegistrationStep) Description() string

func (*Ev2RegistrationStep) RequiredInputs

func (s *Ev2RegistrationStep) RequiredInputs() []StepDependency

type Event

type Event struct {
	Name    string `json:"name,omitempty"`
	Account string `json:"account,omitempty"`
}

type ExecutionConstraint

type ExecutionConstraint struct {
	// Singleton defines this pipeline to run once - ever - in the entire history of the universe. No re-deployments
	// will be allowed.
	Singleton bool `json:"singleton"`

	// Clouds define the clouds in which this pipeline should run. If unset, execution will be unconstrained across clouds.
	Clouds []string `json:"clouds,omitempty"`
	// Environments define the environments in which this pipeline should run, for the given clouds. If unset, execution will be unconstrained across environments.
	Environments []string `json:"environments,omitempty"`
	// Regions define the regions in which this pipeline should run, for the given clouds and environments. If unset, execution will be unconstrained across regions.
	Regions []string `json:"regions,omitempty"`
}

ExecutionConstraint defines a set of parameters for which the pipeline should execute. For each type of parameter, values are evaluated with logical OR - e.g. specifying two clouds will specify either cloud. The different types of parameters are evaluated with logical AND - e.g., specifying a cloud and an environment will constrain the pipeline to run in that cloud AND that environment.

type ExternalStepDependency

type ExternalStepDependency struct {
	// ServiceGroup declares which service group the external dependency belongs to.
	ServiceGroup   string `json:"serviceGroup"`
	StepDependency `json:",inline"`
}

type FeatureRegistrationStep

type FeatureRegistrationStep struct {
	StepMeta          `json:",inline"`
	SecretKeyVault    Value  `json:"secretKeyVault,omitempty"`
	SecretName        Value  `json:"secretName,omitempty"`
	ProviderConfigRef string `json:"providerConfigRef,omitempty"`
}

func (*FeatureRegistrationStep) Description

func (s *FeatureRegistrationStep) Description() string

func (*FeatureRegistrationStep) RequiredInputs

func (s *FeatureRegistrationStep) RequiredInputs() []StepDependency

type GenericStep

type GenericStep struct {
	StepMeta `json:",inline"`
}

func (*GenericStep) Description

func (s *GenericStep) Description() string

func (*GenericStep) IsWellFormedOverInputs

func (s *GenericStep) IsWellFormedOverInputs() bool

func (*GenericStep) RequiredInputs

func (s *GenericStep) RequiredInputs() []StepDependency

type GenericValidationStep

type GenericValidationStep struct {
	StepMeta   `json:",inline"`
	Validation []string `json:"validation,omitempty"`
}

func (*GenericValidationStep) Description

func (s *GenericValidationStep) Description() string

func (*GenericValidationStep) IsWellFormedOverInputs

func (s *GenericValidationStep) IsWellFormedOverInputs() bool

func (*GenericValidationStep) RequiredInputs

func (s *GenericValidationStep) RequiredInputs() []StepDependency

func (*GenericValidationStep) Validations

func (s *GenericValidationStep) Validations() []string

type HelmStep

type HelmStep struct {
	StepMeta `json:",inline"`

	// AKSCluster is the name of the AKS cluster onto which this Helm release will be deployed.
	AKSCluster string `json:"aksCluster"`
	// SubnetName is an optional specifier for the name of the subnet to which the deployer must connect to before
	// accessing the AKS cluster. Provide this value when deploying to private clusters.
	SubnetName string `json:"subnetName,omitempty"`

	// ReleaseName is the semantically-meaningful name of the Helm release. The first deployment for a given name
	// will install the Helm chart, further deployments to the same name will upgrade it.
	ReleaseName string `json:"releaseName"`
	// ReleaseNamespace is the name of the namespace in which the Helm release should be deployed, analogous to the
	// --namespace flag for the Helm CLI. This namespace will be created before the Helm release is installed.
	ReleaseNamespace string `json:"releaseNamespace"`
	// NamespaceFiles specify namespaces that must be created before the Helm release is installed. It is *not* required
	// to specify the release namespace manifest here, but it may be present if a complex configuration (with labels,
	// annotations, spec, etc.) is required. By default, the release namespace will be created with no additional fields
	// set if no additional manifests are specified in this field.
	// NOTE: These files will be pre-processed as Go templates to resolve configuration fields and input variables.
	NamespaceFiles []string `json:"namespaceFiles,omitempty"`
	// ChartDir is the relative path from the pipeline configuration to the chart being deployed.
	ChartDir string `json:"chartDir"`
	// ValuesFile is the path to the Helm values file to use when deploying the Helm release.
	// NOTE: This file will be pre-processed as a Go template to resolve configuration fields and input variables.
	ValuesFile string `json:"valuesFile,omitempty"`

	// KustoDatabase is the name of the Kusto database within the cluster that holds the logs for this Helm deployment.
	KustoDatabase string `json:"kustoDatabase,omitempty"`
	// KustoTable is the name of the Kusto table that holds the logs for this Helm deployment within the appropriate cluster/database.
	KustoTable string `json:"kustoTable,omitempty"`
	// KustoEndpoint is the input that provides the Kusto endpoint URI for this Helm deployment.
	KustoEndpoint *Input `json:"kustoEndpoint,omitempty"`

	// InputVariables records a mapping from variable names to the output variable that provides the value.
	// For some input variable like:
	//     inputVariables:
	//       someImportantThing:
	//         resourceGroup: regional
	//         step: output
	//         name: outputVariableName
	// Refer to this value in the namespace files or values.yaml with __someImportantThing__.
	InputVariables map[string]Input `json:"inputVariables,omitempty"`

	// IdentityFrom specifies the managed identity with which this deployment will run in Ev2.
	IdentityFrom Input `json:"identityFrom,omitempty"`

	// Timeout is the amount of time to wait for the Helm release to be deployed.
	Timeout string `json:"timeout,omitempty"`

	// RollbackOnFailure indicates whether to rollback to previous version after upgrade failure and uninstall on install failure.
	RollbackOnFailure bool `json:"rollbackOnFailure,omitempty"`
}

func (*HelmStep) Description

func (s *HelmStep) Description() string

func (*HelmStep) RequiredInputs

func (s *HelmStep) RequiredInputs() []StepDependency

type ImageMirrorStep

type ImageMirrorStep struct {
	StepMeta `json:",inline"`

	TargetACR             Value  `json:"targetACR,omitempty"`
	SourceRegistry        Value  `json:"sourceRegistry,omitempty"`
	Repository            Value  `json:"repository,omitempty"`
	Digest                Value  `json:"digest,omitempty"`
	CopyFrom              string `json:"copyFrom,omitempty"`
	ImageFilePath         Value  `json:"imageFilePath,omitempty"` // optional, if path is same as pipeline.yaml
	ImageTarFileName      Value  `json:"imageTarFileName,omitempty"`
	ImageMetadataFileName Value  `json:"imageMetadataFileName,omitempty"`
	PullSecretKeyVault    Value  `json:"pullSecretKeyVault,omitempty"`
	PullSecretName        Value  `json:"pullSecretName,omitempty"`
	ShellIdentity         Value  `json:"shellIdentity,omitempty"`
	ADOProject            string `json:"adoProject,omitempty"`
	ArtifactName          string `json:"artifactName,omitempty"`
	BuildID               string `json:"buildId,omitempty"`
}

ImageMirrorStep is a handy wrapper over a ShellStep that allows many users of this tooling to mirror images in the same way without having to worry about the shell script itself.

func (*ImageMirrorStep) Description

func (s *ImageMirrorStep) Description() string

func (*ImageMirrorStep) RequiredInputs

func (s *ImageMirrorStep) RequiredInputs() []StepDependency

type Input

type Input struct {
	// StepDependency declares from which step we are consuming the output variable.
	StepDependency `json:",inline"`
	// Name is the output variable we consume for input chaining.
	Name string `json:"name"`
}

Input describes a variable that some other step produces, which we consume.

type KustoStep

type KustoStep struct {
	StepMeta         `json:",inline"`
	SecretKeyVault   Value `json:"secretKeyVault,omitempty"`
	SecretName       Value `json:"secretName,omitempty"`
	ApplicationId    Value `json:"applicationId,omitempty"`
	ConnectionString Value `json:"connectionString,omitempty"`
	Command          Value `json:"command,omitempty"`
}

func (*KustoStep) Description

func (s *KustoStep) Description() string

func (*KustoStep) RequiredInputs

func (s *KustoStep) RequiredInputs() []StepDependency

type LogsStep

type LogsStep struct {
	StepMeta             `json:",inline"`
	RolloutKind          string           `json:"rolloutKind,omitempty"`
	TypeName             Value            `json:"typeName"`
	SecretKeyVault       Value            `json:"secretKeyVault,omitempty"`
	SecretName           Value            `json:"secretName,omitempty"`
	Environment          Value            `json:"environment"`
	AccountName          Value            `json:"accountName"`
	MetricsAccount       Value            `json:"metricsAccount"`
	AdminAlias           Value            `json:"adminAlias"`
	AdminGroup           Value            `json:"adminGroup"`
	SubscriptionId       Value            `json:"subscriptionId,omitempty"`
	Namespace            Value            `json:"namespace,omitempty"`
	CertSAN              Value            `json:"certsan,omitempty"`
	CertDescription      Value            `json:"certdescription,omitempty"`
	ConfigVersion        Value            `json:"configVersion,omitempty"`
	MonikerDefaultRegion Value            `json:"monikerDefaultRegion,omitempty"`
	Database             Value            `json:"database,omitempty"`
	EventSources         map[string]Event `json:"eventSources,omitempty"`
}

func (*LogsStep) Description

func (s *LogsStep) Description() string

func (*LogsStep) RequiredInputs

func (s *LogsStep) RequiredInputs() []StepDependency

type Pav2Step

type Pav2Step struct {
	StepMeta                   `json:",inline"`
	SecretKeyVault             Value  `json:"secretKeyVault,omitempty"`
	SecretName                 Value  `json:"secretName,omitempty"`
	StorageAccount             Value  `json:"storageAccount,omitempty"`
	SMEEndpointSuffixParameter Value  `json:"smeEndpointSuffixParameter,omitempty"`
	SMEAppidParameter          Value  `json:"smeAppidParameter,omitempty"`
	Operation                  string `json:"operation,omitempty"`
}

func (*Pav2Step) Description

func (s *Pav2Step) Description() string

func (*Pav2Step) RequiredInputs

func (s *Pav2Step) RequiredInputs() []StepDependency

type Pipeline

type Pipeline struct {
	Schema         string           `json:"$schema,omitempty"`
	ServiceGroup   string           `json:"serviceGroup"`
	RolloutName    string           `json:"rolloutName"`
	ResourceGroups []*ResourceGroup `json:"resourceGroups"`
	BuildStep      *BuildStep       `json:"buildStep,omitempty"`
}

func NewPipelineFromBytes

func NewPipelineFromBytes(pipelineBytes []byte, cfg types2.Configuration) (*Pipeline, error)

func NewPipelineFromFile

func NewPipelineFromFile(pipelineFilePath string, cfg types2.Configuration) (*Pipeline, error)

NewPipelineFromFile prepocesses and creates a new Pipeline instance from a file.

Parameters:

  • pipelineFilePath: The path to the pipeline file.
  • cfg: The configuration object used for preprocessing the file.

Returns:

  • A pointer to a new Pipeline instance if successful.
  • An error if there was a problem preprocessing the file, validating the schema, unmarshaling the pipeline, or validating the pipeline instance.

func (*Pipeline) Validate

func (p *Pipeline) Validate() error

Validate checks the integrity of the pipeline and its resource groups. It ensures that there are no duplicate step names, that all dependencies exist, and that each resource group is valid.

Returns:

  • An error if the pipeline or any of its resource groups are invalid.
  • nil if the pipeline and all its resource groups are valid.

type ProviderFeatureRegistrationStep

type ProviderFeatureRegistrationStep struct {
	StepMeta          `json:",inline"`
	ProviderConfigRef string `json:"providerConfigRef,omitempty"`
	IdentityFrom      Input  `json:"identityFrom,omitempty"`
}

func (*ProviderFeatureRegistrationStep) Description

func (s *ProviderFeatureRegistrationStep) Description() string

func (*ProviderFeatureRegistrationStep) RequiredInputs

func (s *ProviderFeatureRegistrationStep) RequiredInputs() []StepDependency

type Reference

type Reference struct {
	// Environment variable name
	Name string `json:"name"`

	// The path to a file.
	FilePath string `json:"filepath"`
}

Reference represents a configurable reference

type ResourceGroup

type ResourceGroup struct {
	*ResourceGroupMeta `json:",inline"`

	SubscriptionProvisioning *SubscriptionProvisioning `json:"subscriptionProvisioning,omitempty"`

	Steps           Steps           `json:"steps"`
	ValidationSteps ValidationSteps `json:"validationSteps,omitempty"`
}

ResourceGroup represents a group of steps, targeting one resource group in one subscription.

func (*ResourceGroup) Validate

func (rg *ResourceGroup) Validate() error

type ResourceGroupMeta

type ResourceGroupMeta struct {
	// Name is the semantic identifier for this group of steps - it must be short and should be shared between pipelines that
	// do work in the same Azure resource group.
	Name string `json:"name"`
	// ResourceGroup is the name of the Azure resource group in which work will occur.
	ResourceGroup string `json:"resourceGroup"`
	// Subscription is the subscription *key* in which work will occur.
	Subscription string `json:"subscription"`

	// ExecutionConstraints define a set of constraints on where this pipeline should be executed.
	// If unset, the default behavior is to deploy to all clouds, environments, regions, and stamps.
	// The set of constraints are evaluated using logical OR - adding to the list adds a set of possible
	// deployment environments.
	ExecutionConstraints []ExecutionConstraint `json:"executionConstraints,omitempty"`
}

ResourceGroupMeta holds metadata required to fully qualify a resource group execution context. Subscription provisioning is explicitly omitted as any code in which execution context is important is necessarily a space in which it is not safe to run subscription provisioning, as only one subscription provisioning block is allowed per Ev2 rollout.

type ResourceProviderRegistrationStep

type ResourceProviderRegistrationStep struct {
	StepMeta                   `json:",inline"`
	ResourceProviderNamespaces Value `json:"resourceProviderNamespaces,omitempty"`
}

func (*ResourceProviderRegistrationStep) Description

func (s *ResourceProviderRegistrationStep) Description() string

func (*ResourceProviderRegistrationStep) RequiredInputs

func (s *ResourceProviderRegistrationStep) RequiredInputs() []StepDependency

type SecretSyncStep

type SecretSyncStep struct {
	StepMeta          `json:",inline"`
	ConfigurationFile string `json:"configurationFile,omitempty"`
	KeyVault          string `json:"keyVault,omitempty"`
	EncryptionKey     string `json:"encryptionKey,omitempty"`
	IdentityFrom      Input  `json:"identityFrom,omitempty"`
}

func (*SecretSyncStep) Description

func (s *SecretSyncStep) Description() string

func (*SecretSyncStep) RequiredInputs

func (s *SecretSyncStep) RequiredInputs() []StepDependency

type SetCertificateIssuerStep

type SetCertificateIssuerStep struct {
	StepMeta       `json:",inline"`
	VaultBaseUrl   Value `json:"vaultBaseUrl,omitempty"`
	Issuer         Value `json:"issuer,omitempty"`
	SecretKeyVault Value `json:"secretKeyVault,omitempty"`
	SecretName     Value `json:"secretName,omitempty"`
	ApplicationId  Value `json:"applicationId,omitempty"`
}

func (*SetCertificateIssuerStep) Description

func (s *SetCertificateIssuerStep) Description() string

func (*SetCertificateIssuerStep) RequiredInputs

func (s *SetCertificateIssuerStep) RequiredInputs() []StepDependency

type ShellStep

type ShellStep struct {
	StepMeta   `json:",inline"`
	AKSCluster string      `json:"aksCluster,omitempty"`
	Command    string      `json:"command,omitempty"`
	Variables  []Variable  `json:"variables,omitempty"`
	DryRun     DryRun      `json:"dryRun,omitempty"`
	References []Reference `json:"references,omitempty"`
	SubnetName string      `json:"subnetName,omitempty"`
	// WorkingDir is the relative path from the pipeline definition to the directory which will be the *only* content
	// available to the shell during execution. If and only if this is set will a shell step be eligible for being skipped
	// during incremental execution; it is in the best interest of the author to contain the smallest amount of content
	// in the directory, as any change to any input will cause a re-run. Validation will ensure that this directory does
	// not escape the root directory of the pipeline. `$PWD` for the shell commands will be this directory.
	WorkingDir string `json:"workingDir,omitempty"`
	// ShellIdentity is the ID of the managed identity with which the shell step will execute in an Ev2 context. Required.
	ShellIdentity Value `json:"shellIdentity"`
	// AdoArtifacts is a list of Azure DevOps artifacts to download before executing the shell step.
	AdoArtifacts []AdoArtifactDownloadPipelineReference `json:"adoArtifacts,omitempty"`
}

ShellStep represents a shell step

func ResolveImageMirrorStep

func ResolveImageMirrorStep(input ImageMirrorStep, scriptFile string) (*ShellStep, error)

ResolveImageMirrorStep resolves an image mirror step to a shell step. It's up to the user to write the contents of the OnDemandSyncScript to disk somewhere and pass the file name in as a parameter here, as we likely don't want to inline 100+ lines of shell into a `bash -C "<contents>"` call and hope all the string interpolations work.

func (*ShellStep) Description

func (s *ShellStep) Description() string

Description Returns:

  • A string representation of this ShellStep

func (*ShellStep) IsWellFormedOverInputs

func (s *ShellStep) IsWellFormedOverInputs() bool

func (*ShellStep) RequiredInputs

func (s *ShellStep) RequiredInputs() []StepDependency

type ShellValidationStep

type ShellValidationStep struct {
	ShellStep  `json:",inline"`
	Validation []string `json:"validation,omitempty"`
}

ShellValidationStep represents a shell step that is a validation step.

func (*ShellValidationStep) IsWellFormedOverInputs

func (s *ShellValidationStep) IsWellFormedOverInputs() bool

func (*ShellValidationStep) Validations

func (s *ShellValidationStep) Validations() []string

type Step

type Step interface {
	WellFormedChecker
	StepName() string
	ActionType() string
	Description() string
	Dependencies() []StepDependency
	RequiredInputs() []StepDependency
	ExternalDependencies() []ExternalStepDependency
	AutomatedRetries() *AutomatedRetry
	ConsideredForServiceGroupCompletion() bool
}

Step divulges common metadata about a step.

type StepDependency

type StepDependency struct {
	// ResourceGroup is the (semantic/display) name of the group to which the step belongs.
	ResourceGroup string `json:"resourceGroup"`
	// Step is the name of the step being depended on.
	Step string `json:"step"`
}

StepDependency describes a step that must run before the dependent step may begin.

type StepMeta

type StepMeta struct {
	Name              string                   `json:"name"`
	Action            string                   `json:"action"`
	AutomatedRetry    *AutomatedRetry          `json:"automatedRetry,omitempty"`
	DependsOn         []StepDependency         `json:"dependsOn,omitempty"`
	ExternalDependsOn []ExternalStepDependency `json:"externalDependsOn,omitempty"`

	// OmitFromServiceGroupCompletion influences how this step is treated in execution graphs containing multiple
	// service groups - by default, *all* leaf nodes of a service group must finish before *any* root nodes of
	// dependent service groups begin. Setting this flag will omit this particular step from that set of leaf nodes
	// that block execution of dependent steps.
	OmitFromServiceGroupCompletion bool `json:"omitFromServiceGroupCompletion,omitempty"`
}

StepMeta contains metadata for a steps.

func (*StepMeta) ActionType

func (m *StepMeta) ActionType() string

func (*StepMeta) AutomatedRetries

func (m *StepMeta) AutomatedRetries() *AutomatedRetry

func (*StepMeta) ConsideredForServiceGroupCompletion

func (m *StepMeta) ConsideredForServiceGroupCompletion() bool

func (*StepMeta) Dependencies

func (m *StepMeta) Dependencies() []StepDependency

Dependencies exposes the dependencies this step has on other steps for the same service group.

func (*StepMeta) ExternalDependencies

func (m *StepMeta) ExternalDependencies() []ExternalStepDependency

ExternalDependencies exposes the dependencies this step has on steps in *other* service groups. When provided, this will add to the default behavior of depending on "all" leaf outputs from the parent service group as configured in the topology. Be careful when using this to encode intent directly. Depending on steps from many service groups is supported. In single-service-group contexts, these dependencies are ignored.

func (*StepMeta) IsWellFormedOverInputs

func (m *StepMeta) IsWellFormedOverInputs() bool

func (*StepMeta) StepName

func (m *StepMeta) StepName() string

type Steps

type Steps []Step

func (*Steps) UnmarshalJSON

func (s *Steps) UnmarshalJSON(data []byte) error

type SubscriptionProvisioning

type SubscriptionProvisioning struct {
	DisplayName                   Value  `json:"displayName"`
	AIRSRegisteredUserPrincipalId *Value `json:"airsRegisteredUserPrincipalId,omitempty"`
	CertificateDomains            *Value `json:"certificateDomains,omitempty"`
	BackfillSubscriptionId        *Value `json:"backfillSubscriptionId,omitempty"`

	// RoleAssignmentParameters is a relative path to the .bicepparam file used to deploy the bootstrapping role-assignments
	// for this subscription. Keep in mind that once Ev2 marks a subscription as provisioned, this will not run, so the contents
	// of this ARM template cannot change over time as the template will not be re-executed on existing subscriptions.
	RoleAssignmentParameters string `json:"roleAssignment,omitempty"`
}

func (*SubscriptionProvisioning) Validate

func (s *SubscriptionProvisioning) Validate() error

type ValidationStep

type ValidationStep interface {
	Step
	Validations() []string
}

type ValidationSteps

type ValidationSteps []ValidationStep

func (*ValidationSteps) UnmarshalJSON

func (s *ValidationSteps) UnmarshalJSON(data []byte) error

type Value

type Value struct {
	Value     any    `json:"value,omitempty"`
	ConfigRef string `json:"configRef,omitempty"`
	Input     *Input `json:"input,omitempty"`
}

Value Use this to pass in values to pipeline steps. Values can come from various sources:

  • Value: Use the value field to "hardcode" a value.
  • ConfigRef: Use this to reference an entry in a config.Configuration.
  • Input: Use this to specify an output chaining input.

func (*Value) String

func (v *Value) String() string

type Variable

type Variable struct {
	Name  string `json:"name,omitempty"`
	Value `json:",inline"`
}

Variable Use this to pass in values to shell steps. Pairs a value with the environment variable name.

func (*Variable) String

func (v *Variable) String() string

type WellFormedChecker

type WellFormedChecker interface {
	// IsWellFormedOverInputs determines if, given the same (visible) inputs, this step will have the same outputs.
	// Implicit inputs on the filesystem outside the purview of any configuration make a step ill-formed.
	IsWellFormedOverInputs() bool
}

WellFormedChecker allows introspection of how well-formed this step is over inputs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL