Documentation ¶
Index ¶
- Variables
- func CheckFile(fs afero.Afero, path string, mustBeExecutable bool) error
- func LintArtifacts(currentTask manifest.Task, previousTasks []manifest.Task) (errs []error)
- func LintCfManifest(task manifest.DeployCF, readCfManifest cf.ManifestReader) (errs []error)
- func LintConsumerIntegrationTestTask(cit manifest.ConsumerIntegrationTest, providerHostRequired bool) (errs []error)
- func LintCronTrigger(cron manifest.TimerTrigger) (errs []error)
- func LintDeployCFTask(task manifest.DeployCF, readCfManifest cf.ManifestReader, fs afero.Afero) (errs []error)
- func LintDeployKateeTask(task manifest.DeployKatee, man manifest.Manifest, fs afero.Afero) (errs []error)
- func LintDeployMLModulesTask(mlTask manifest.DeployMLModules) (errs []error)
- func LintDeployMLZipTask(mlTask manifest.DeployMLZip) (errs []error)
- func LintDockerComposeTask(dc manifest.DockerCompose, fs afero.Afero) (errs []error)
- func LintDockerPushTask(docker manifest.DockerPush, fs afero.Afero) (errs []error)
- func LintDockerTrigger(docker manifest.DockerTrigger) (errs []error)
- func LintGitTrigger(git manifest.GitTrigger, fs afero.Afero, workingDir string, ...) (errs []error)
- func LintNotifications(task manifest.Task) (errs []error)
- func LintParallelTask(parallelTask manifest.Parallel) (errs []error)
- func LintPipelineTrigger(man manifest.Manifest, pipeline manifest.PipelineTrigger) (errs []error)
- func LintPrePromoteTask(task manifest.Task) (errs []error)
- func LintRunTask(run manifest.Run, fs afero.Afero, os string) (errs []error)
- func LintSequenceTask(seqTask manifest.Sequence, cameFromAParallel bool) (errs []error)
- func NewFeatureToggleLinter(availableFeatures manifest.FeatureToggles) featureToggleLinter
- func NewTasksLinter(fs afero.Afero, os string) taskLinter
- func NewTopLevelLinter() topLevelLinter
- func NewTriggersLinter(fs afero.Afero, workingDir string, branchResolver project.GitBranchResolver, ...) triggersLinter
- func ReadFile(fs afero.Afero, path string) (content string, err error)
- type Component
- type Components
- type Env
- type Error
- type LintResult
- type LintResults
- type Linter
- type Properties
- type VelaManifest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingField = newError("required field missing") NewErrMissingField = func(field string) Error { return ErrMissingField.WithValue(field) } ErrInvalidField = newError("invalid field") NewErrInvalidField = func(field string, reason string) Error { return ErrInvalidField.WithValue(field).WithValue(reason) } ErrDeprecatedField = newError("deprecated field") NewDeprecatedField = func(field string, reason string) Error { return ErrDeprecatedField.WithValue(field).WithValue(reason) } ErrFileNotFound = newError("file not found") ErrFileCannotRead = newError("file cannot be read") ErrFileNotAFile = newError("not a file") ErrFileEmpty = newError("file is empty") ErrFileNotExecutable = newError("file is not executable") ErrFileInvalid = newError("file is invalid") ErrCFMissingRoutes = newError("cf application must have at least one route") ErrCFMissingName = newError("cf application missing 'name'") ErrCFRoutesAndNoRoute = newError("cf application cannot have both 'routes' and 'no-route'") ErrCFNoRouteHealthcheck = newError("cf application with 'no-route: true' requires 'health-check-type: process'") ErrCFRouteScheme = newError("cf application route must not start with http(s)://") ErrCFRouteMissing = newError("cf application routes must contain sso_route") ErrCFMultipleApps = newError("cf manifest must have exactly 1 application") ErrCFBuildpackUnversioned = newError("buildpack specified without version so the latest will be used on each deploy") ErrCFBuildpackMissing = newError("buildpack missing. Cloud Foundry will try to detect which system buildpack to use. Please see <https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#buildpack>") ErrCFBuildpackDeprecated = newError("'buildpack' is deprecated in favour of 'buildpacks'. Please see <http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#deprecated>") ErrCFArtifactAndDocker = newError("cannot combine 'deploy_artifact' in the halfpipe task and 'docker' in the cf manifest") ErrCFFromArtifact = newError("this file must be saved as an artifact in a previous task") ErrCFPrePromoteArtifact = newError("cannot have pre promote tasks with CF manifest restored from artifact") ErrCFCandidateRouteTooLong = newError("cf does not allow routes of more than 64 characters") ErrCFLabelTeamWillBeOverwritten = newError("deployment will overwrite metadata.labels.team that was set in the CF manifest").AsWarning() ErrCFLabelProductIsMissing = newError("CF manifest is missing 'product' label. If 'product' is set on the CF space you can safely ignore this warning.").AsWarning() ErrCFLabelEnvironmentIsMissing = newError("CF manifest is missing 'environment' label. If 'environment' is set on the CF space you can safely ignore this warning.").AsWarning() ErrUnsupportedRegistry = newError("image must be from halfpipe registry. Please see <https://ee.public.springernature.app/rel-eng/docker-registry/>") ErrDockerPushTag = newError("the field 'tag' is no longer used and is safe to delete") ErrDockerPlatformUnknown = newError("only linux/amd64 and/or linux/arm64 are supported") ErrDockerComposeVersion = newError("the docker-compose file version used is deprecated. All services must be under the 'services' key and 'Version' must be '2' or higher. Please see <https://docs.docker.com/compose/compose-file/compose-versioning/#versioning>") ErrDockerVarSecret = newError("using a secret in docker build vars is not secure. See the 'secrets' option of the docker-push task") ErrMultipleTriggers = newError("cannot have multiple triggers of this type") ErrVelaVariableMissing = newError("vela manifest variable is not specified in halfpipe manifest") ErrVelaNamespace = newError("vela namespace must start with 'katee-'") ErrVelaDeploymentCheckTimeout = newError("deployment_check_timeout is deprecated. Please use max_checks and check_interval") ErrUnsupportedManualTrigger = newError("manual_trigger on individual tasks is not supported in GitHub Actions. It is supported at the workflow level in git trigger options") ErrUnsupportedRolling = newError("cf rolling deploys are not supported in GitHub Actions") ErrDockerTriggerLoop = newError("cannot push docker image that is also a trigger as it will create a loop") ErrUnsupportedGitPrivateKey = newError("git private_key is not supported in GitHub Actions") ErrUnsupportedGitUri = newError("git uri is not supported in GitHub Actions") ErrUnsupportedPipelineTrigger = newError("pipeline triggers are not supported in GitHub Actions") ErrSlackSuccessMessageFieldDeprecated = newError("'slack_success_message' is deprecated, please use new notification structure") ErrSlackFailureMessageFieldDeprecated = newError("'slack_failure_message' is deprecated, please use new notification structure") ErrOnlySlackOrTeamsAllowed = newError("You cannot define both 'slack' and 'teams' in the notifications") )
View Source
var ( ErrUnsupportedFeature = newError("unsupported feature") ErrUnsupportedFeatureVersioned = newError("feature 'versioned' is no longer supported. The same functionality is included in the 'update-pipeline' feature") ErrUnsupportedDockerDecompose = newError("feature 'docker-decompose' is no longer supported. docker-compose tasks will not be modified") )
View Source
var ErrReadsFromSavedArtifacts = newError("reads from saved artifacts, but there are no previous tasks that saves any")
View Source
var ErrScriptMustExistInDockerImage = newError("make sure script is present in the docker image")
View Source
var ErrWindowsScriptMustBeExecutable = newError("make sure script is executable")
Functions ¶
func LintArtifacts ¶
func LintCfManifest ¶
func LintCfManifest(task manifest.DeployCF, readCfManifest cf.ManifestReader) (errs []error)
func LintConsumerIntegrationTestTask ¶
func LintConsumerIntegrationTestTask(cit manifest.ConsumerIntegrationTest, providerHostRequired bool) (errs []error)
func LintCronTrigger ¶
func LintCronTrigger(cron manifest.TimerTrigger) (errs []error)
func LintDeployCFTask ¶
func LintDeployKateeTask ¶
func LintDeployMLModulesTask ¶
func LintDeployMLModulesTask(mlTask manifest.DeployMLModules) (errs []error)
func LintDeployMLZipTask ¶
func LintDeployMLZipTask(mlTask manifest.DeployMLZip) (errs []error)
func LintDockerComposeTask ¶
func LintDockerComposeTask(dc manifest.DockerCompose, fs afero.Afero) (errs []error)
func LintDockerPushTask ¶
func LintDockerPushTask(docker manifest.DockerPush, fs afero.Afero) (errs []error)
func LintDockerTrigger ¶
func LintDockerTrigger(docker manifest.DockerTrigger) (errs []error)
func LintGitTrigger ¶
func LintGitTrigger(git manifest.GitTrigger, fs afero.Afero, workingDir string, branchResolver project.GitBranchResolver, repoURIResolver project.RepoURIResolver, platform manifest.Platform) (errs []error)
func LintNotifications ¶
func LintParallelTask ¶
func LintPipelineTrigger ¶
func LintPipelineTrigger(man manifest.Manifest, pipeline manifest.PipelineTrigger) (errs []error)
func LintPrePromoteTask ¶
func LintSequenceTask ¶
func NewFeatureToggleLinter ¶
func NewFeatureToggleLinter(availableFeatures manifest.FeatureToggles) featureToggleLinter
func NewTasksLinter ¶
func NewTopLevelLinter ¶
func NewTopLevelLinter() topLevelLinter
func NewTriggersLinter ¶
func NewTriggersLinter(fs afero.Afero, workingDir string, branchResolver project.GitBranchResolver, repoURIResolver project.RepoURIResolver) triggersLinter
Types ¶
type Component ¶
type Component struct { Name string `yaml:"name"` Type string `yaml:"type"` Properties Properties `yaml:"properties"` }
type Components ¶
type Components struct {
Components []Component `yaml:"components"`
}
type LintResult ¶
func NewLintResult ¶
func NewLintResult(linter string, docsURL string, issues []error) LintResult
func (*LintResult) Add ¶
func (lr *LintResult) Add(errs ...error)
func (*LintResult) Error ¶
func (lr *LintResult) Error() (out string)
func (*LintResult) HasErrors ¶
func (lr *LintResult) HasErrors() bool
func (*LintResult) HasWarnings ¶
func (lr *LintResult) HasWarnings() bool
type LintResults ¶
type LintResults []LintResult
func (LintResults) Error ¶
func (lrs LintResults) Error() (out string)
func (LintResults) HasErrors ¶
func (lrs LintResults) HasErrors() bool
func (LintResults) HasWarnings ¶
func (lrs LintResults) HasWarnings() bool
type Linter ¶
type Linter interface {
Lint(manifest manifest.Manifest) LintResult
}
func NewActionsLinter ¶
func NewActionsLinter(repoUriResolver project.RepoURIResolver) Linter
func NewSecretsLinter ¶
func NewSecretsLinter(secretValidator manifest.SecretValidator) Linter
type Properties ¶
type VelaManifest ¶
type VelaManifest struct { Kind string `yaml:"kind"` Spec Components `yaml:"spec"` }
Source Files ¶
- actions.go
- artifacts.go
- cf_manifest.go
- deploy-cf.go
- deploy-katee.go
- docker-compose.go
- docker-push.go
- docker.go
- errors.go
- feature_toggles.go
- filechecker.go
- git.go
- integration.go
- linter.go
- ml.go
- notifications.go
- parallel.go
- pipeline.go
- pre_promote.go
- result.go
- run.go
- secrets.go
- sequence.go
- task.go
- timer.go
- top_level.go
- triggers.go
- vela_appfile.go
Click to show internal directories.
Click to hide internal directories.