Skip to content

Commit

Permalink
feat: add docs for pipeline validation (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
Neal committed Oct 23, 2021
1 parent 2e66f72 commit b156b57
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions content/templates/working_with.md
@@ -0,0 +1,45 @@
---
title: "Working with Templates"
linkTitle: "Working with Templates"
description: >
Methods of validation and ways to improve template development
---

{{% alert title="Warning" color="warning" %}}
It is highly recommended before reviewing the below content to have a solid grasp on Vela's core concepts that are explored while taking the [Vela Tour](/docs/tour/)).
{{% /alert %}}

When writing a new template getting feedback can be a very painful process. Vela provides a few core methods to get feedback quickly to ensure the template you're writing expands in the pipeline you expect to run. The main methods for seeing expanded pipelines are:

- Pipeline endpoints _(which can be used via UI or CLI)_
- CLI pipeline validation _(`vela validate pipeline`)_


## Pipeline endpoints

This method allows you to evaluate your pipeline that exists within a VCS system. It is most commonly referenced on the build page in the pipeline tab.

Additionally, you can also interact with it the Vela CLI or API if you're trying to create more elaborate workflows.

* [API Docs](/docs/reference/api/pipeline/)

## CLI Pipeline Validation

The CLI workflow that was mentioned above has a variety of methods for local and remote validation. All of them are designed to help you quickly identify areas with your pipeline that need to be improved and should speed up development.

Available Methods:

```sh
# this will continue to validate only the file
vela validate pipeline

# this will continue to validate via the pipeline endpoints on the server
vela validate pipeline --remote --org MyOrg --repo MyRepo

# this will allow someone to validate a local file with the template expanded
# Note: this method requires the user to provide auth to the template
vela validate pipeline --template

# this will allow someone to override the `source:` and use a local template for testing
vela validate pipeline --template --template-file name:path/to/file
```

0 comments on commit b156b57

Please sign in to comment.