You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
3.8 KiB
Go
50 lines
3.8 KiB
Go
package errors
|
|
|
|
// ErrorMessages maps error codes to their default error messages.
|
|
var ErrorMessages = map[ErrorCode]string{
|
|
ErrEmptyFile: "Please provide content of .gitflame-ci.yml",
|
|
ErrYamlSyntax: "YAML syntax error: %v",
|
|
ErrUnknownRootKey: "unexpected key: '%s'. Currently we not support it.",
|
|
ErrBeforeScriptInvalid: "before_script config should be a string or a nested array of strings up to 10 levels deep",
|
|
ErrJobNameTooLong: "job name is too long, probably should reduce number of symbols",
|
|
ErrServiceInvalid: "config should be a hash or a string",
|
|
ErrStageInvalid: "stage at index %d is empty; stage config should be a string",
|
|
ErrVariableNameTooLong: "variable name %s is too long, probably should reduce number of symbols",
|
|
ErrVariablesInvalid: "variables config should be a map",
|
|
ErrVariablesInvalidKey: "variable '%s' uses invalid data keys: %s",
|
|
ErrMissingJobs: "no jobs found in the configuration",
|
|
ErrJobNameBlank: "job name cannot be blank",
|
|
ErrMissingStage: "job '%s': stage must be specified for visible jobs",
|
|
ErrJobStageNotExist: "job '%s': selected stage '%s' does not exist; available stages: %v",
|
|
ErrMissingScript: "job '%s' does not contain script",
|
|
ErrUndefinedDependency: "job '%s' (Line %d, Col %d) has dependency '%s' (Line %d, Col %d-%d) which does not exist among jobs",
|
|
ErrInvalidStageOrder: "job '%s' has dependency '%s' with a stage occurring later than '%s'",
|
|
ErrDuplicateNeeds: "job '%s' contains duplicate need '%s'",
|
|
ErrNeedNameTooLong: "job '%s' contains need '%s', which exceeds the maximum length of %d",
|
|
ErrUndefinedNeed: "job '%s' (Line %d, Col %d-%d) references a non-existent job '%s'",
|
|
ErrInvalidWhen: "job '%s': invalid when value '%s'. Allowed values are: on_success, always, on_failure, never, delayed",
|
|
ErrInvalidChanges: "job '%s': rule 'changes' is empty",
|
|
ErrUnknownRulesKey: "job '%s': unknown key in rule: %s",
|
|
ErrInvalidRulesFormat: "job '%s': rule format is invalid",
|
|
ErrInvalidOnly: "job '%s': 'only' must be a non-empty string or an array of non-empty strings",
|
|
ErrNoVisibleJob: "no visible jobs found in the jobs section",
|
|
ErrCyclicDependency: "cycle detection: a cycle was detected among jobs: %v",
|
|
ErrArtifactsPathsBlank: "job '%s': artifacts paths can't be blank. Currently we supporting `paths' syntax only.",
|
|
ErrChangesTooManyEntries: "has too many entries (maximum 50)",
|
|
ErrChangesNotArrayOfStrings: "changes config should be an array of strings",
|
|
ErrChangesMissingPaths: "changes config hash must contain key 'paths'",
|
|
ErrChangesInvalidType: "should be an array or a hash",
|
|
ErrPathsNotArrayOfStrings: "paths config should be an array of strings",
|
|
ErrStartInMissing: "job '%s': start_in should be specified for delayed jobs",
|
|
ErrStartInInvalid: "job '%s': start_in should be a valid duration",
|
|
ErrStartInTooLong: "job '%s': start_in should not exceed the limit",
|
|
ErrStartInMustBeBlank: "job '%s': start_in must be blank when job is not delayed",
|
|
|
|
ErrDependencyNotInNeeds: "job '%s': dependency '%s' should be included in needs",
|
|
ErrUnknownKey: "unexpected key '%s' found in %s",
|
|
ErrInvalidExpressionSyntax: "job '%s': invalid expression syntax in rule 'if'",
|
|
ErrIncludeRulesInvalid: "include rule key '%s' should be a string or an array of strings",
|
|
ErrVariableInvalid: "variable '%s' must be a scalar or a map",
|
|
ErrInvalidStagesOrder: "job '%s' (Line %d, Col %d) has need '%s' (Line %d, Col %d-%d) with a stage occurring later than '%s'",
|
|
ErrMissingFinalNewline: "File should end with an empty line for better style"}
|