Validate Stack
This section aims to guide you in validating your Stack and in correcting parameters that do not pass validation.
About Stack Validation
Stack validation ensures that all of your Stack's configuration files are as designed.
The validation is done by the command stk-legacy validate
, which removes empty folders and validates if the Stack fields were filled in correctly.
You are also free to define which files should be ignored so that they are not included in the final version of your Stack. The validation will consider the files registered in the following files:
.gitignore
: It's the file present in a Git repository at the root of your project, where you can configure which files to ignore when pushing your changes to a remote repository..stackignore
: Similar to.gitignore
, present in the root of the Stack, in this file you can configure which files will be ignored in your Stack so that they are not used.
After validation, you can have a simplified or more detailed return:
- The simplified return of the validation of a Stack presents the successes and failures of the validation.
- The detailed return of the validation of a Stack presents each file validated and the one that was ignored.
Configure ignored files
Files are skipped before validation and tests are run. You must include in the configuration file the files that you want to ignore when you finish developing your Stack.
Populate the .gitignore
and .stackignore
files with the folders and files you want to be ignored. Check out the following example:
- Ignored files in .gitignore:
- Ignored files in .stackignore:
# Dependencies
/node_modules
# Production
/build
# Generated files
.myreactapp
.cache-loader
# Misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Test cases
/test
# Documentation
/docs
*.md
# Generated files
*.png
*.jpeg
/template-test*
List of validated fields
The list below presents all the validated parameters of your Stack's configuration file (the stack.yaml
file and all the plugin.yaml
and template.yaml
files. If an error occurs when validating your Stack, check below how each field must be filled in:
- stack.yaml validation
- Template.yaml validation
- Plugin.yaml validation
description
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 500 |
required | false |
name
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 100 |
required | true |
empty | false |
regex | ^([a-z][a-z0-9]*)(-[a-z0-9]+)*$ |
display-name
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 100 |
required | false |
picture
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 200 |
required | false |
category
Attribute | Accepted Value |
---|---|
type | string |
required | false |
check_with | check_categories |
compatibility
Attribute | Accepted Value |
---|---|
type | list |
required | false |
technologies
Attribute | Accepted Value |
---|---|
type | list |
check_with | check_technologies |
required | false |
about
about | |
---|---|
Attribute | Accepted Value |
type | string |
required | false |
regex | .+\.md |
use-cases
Attribute | Accepted Value |
---|---|
type | list |
required | false |
schema | dict |
title | |
Attribute | Accepted Value |
type | string |
minlength | 0 |
maxlength | 200 |
required | true |
empty | false |
content | |
Attribute | Accepted Value |
type | string |
regex | .+\.md |
required | true |
empty | false |
stackfile | |
Attribute | Accepted Value |
type | string |
required | true |
empty | false |
regex | .+.\\(yaml|yml) |
description
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 500 |
required | false |
name
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 100 |
required | true |
empty | false |
regex | '^([a-z][a-z0-9]*)(-[a-z0-9]+)*$' |
display-name
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 100 |
required | false |
types
Attribute | Accepted Value |
---|---|
type | list |
required | false |
check_with | check_template_types |
picture
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 200 |
required | false |
category
Attribute | Accepted Value |
---|---|
type | string |
required | false |
check_with | check_categories |
compatibility
Attribute | Accepted Value |
---|---|
type | list |
required | false |
about
Attribute | Accepted Value |
---|---|
type | string |
required | false |
regex | .+\.md |
usage
Attribute | Accepted Value |
---|---|
type | string |
required | false |
regex | .+\.md |
use-case
Attribute | Accepted Value |
---|---|
type | string |
required | false |
regex | .+\.md |
implementation
Attribute | Accepted Value |
---|---|
type | string |
required | false |
regex | .+\.md |
description
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 500 |
required | false |
name
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 100 |
required | true |
empty | false |
regex | '^([a-z][a-z0-9]*)(-[a-z0-9]+)*$' |
display-name
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 100 |
required | false |
types
Attribute | Accepted Value |
---|---|
type | list |
required | false |
check_with | check_plugin_types |
picture
Attribute | Accepted Value |
---|---|
type | string |
minlength | 0 |
maxlength | 200 |
required | false |
category
Attribute | Accepted Value |
---|---|
type | string |
required | false |
check_with | check_categories |
compatibility
Attribute | Accepted Value |
---|---|
type | list |
required | false |
technologies
Attribute | Accepted Value |
---|---|
type | list |
check_with | check_technologies |
required | false |
about
Attribute | Accepted Value |
---|---|
type | string |
required | false |
regex | .+\.md |
usage
Attribute | Accepted Value |
---|---|
type | string |
required | false |
regex | .+\.md |
use-case
Attribute | Accepted Value |
---|---|
type | string |
required | false |
regex | .+\.md |
implementation
Attribute | Accepted Value |
---|---|
type | string |
required | false |
regex | .+\.md |
Was this page helpful?