Skip to content

Commit

Permalink
fix: add documentation for wrapping steps
Browse files Browse the repository at this point in the history
  • Loading branch information
d2lam committed Jul 10, 2017
1 parent b6cfc37 commit da2eeca
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/user-guide/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ jobs:
- NPM_TOKEN
```

### Wrap
Wrapping is when you add commands to run before and/or after an existing step. To wrap a step from a template, add a `pre` or `post` in front of the step name.

Example:
```yaml
jobs:
main:
template: template_name@1.3.0
steps:
- preinstall: echo pre-install
- postinstall: echo post-install
```

This will run the command `echo pre-install` before the template's `install` step, and `echo post-install` after the template's `install` step.

## Creating a template

### Writing a template yaml
Expand Down

0 comments on commit da2eeca

Please sign in to comment.