Validate

Learn how to validate a Vela pipeline.

Command

$ vela validate pipeline <parameters...> <arguments...>

Parameters

The following parameters are used to configure the command:

NameDescriptionEnvironment Variables
orgname of organization for the buildsVELA_ORG, BUILD_ORG
pipeline-typeprovide the repository pipeline typeVELA_PIPELINE_TYPE, PIPELINE_TYPE
reponame of repository for the buildsVELA_REPO, BUILD_REPO
compiler-starlark-exec-limitset the starlark execution step limit for compiling starlark pipelines (default 7500)VELA_COMPILER_STARLARK_EXEC_LIMIT, COMPILER_STARLARK_EXEC_LIMIT
filename of the file for the pipelineVELA_FILE, PIPELINE_FILE
max-template-depthset the maximum depth for nested templates (default: 3)VELA_MAX_TEMPLATE_DEPTH, MAX_TEMPLATE_DEPTH
pathpath to the file for the pipelineVELA_PATH, PIPELINE_PATH
refrepository reference for the pipelineVELA_REF, PIPELINE_REF
remoteenables validating a pipeline on a remote serverVELA_REMOTE, PIPELINE_REMOTE
templateenables templates to be included in pipeline validationVELA_TEMPLATE, PIPELINE_TEMPLATE
template-fileenables using a local template file for expansionVELA_TEMPLATE_FILE, PIPELINE_TEMPLATE_FILE
branchprovide the build branch for the pipelineVELA_BRANCH, PIPELINE_BRANCH, VELA_BUILD_BRANCH
commentprovide the build comment for the pipelineVELA_COMMENT, PIPELINE_COMMENT, VELA_BUILD_COMMENT
eventprovide the build event for the pipelineVELA_EVENT, PIPELINE_EVENT, VELA_BUILD_EVENT
file-changesetprovide a list of files changed for ruleset matchingVELA_FILE_CHANGESET, FILE_CHANGESET
statusprovide the expected build status for the local validation (default: “success”)VELA_STATUS, PIPELINE_STATUS, VELA_BUILD_STATUS
tagprovide the build tag for the pipelineVELA_TAG, PIPELINE_TAG, VELA_BUILD_TAG
targetprovide the build target for the pipelineVELA_TARGET, PIPELINE_TARGET, VELA_BUILD_TARGET
clone-imagethe clone image to use for the injected clone stepVELA_CLONE_IMAGE, COMPILER_CLONE_IMAGE
compiler.github.tokengithub compiler tokenVELA_COMPILER_GITHUB_TOKEN, COMPILER_GITHUB_TOKEN
compiler.github.urlgithub url, used by compiler, for pulling registry templatesVELA_COMPILER_GITHUB_URL, COMPILER_GITHUB_URL

Permissions

COMING SOON!

Sample

Simple Request

vela validate pipeline

Expanded Template Request (GitHub)

vela validate pipeline --template --compiler.github.token <token> --compiler.github.url https://git.example.com

Expanded Template Request (Local)

vela validate pipeline --template --template-file name:/path/to/file

Response

".vela.yml" is valid

Using a template in your pipeline? You can validate templates also.