Skip to content

Commit

Permalink
Merge pull request #95 from screwdriver-cd/wrapdocs
Browse files Browse the repository at this point in the history
fix: add documentation for wrapping steps
  • Loading branch information
d2lam authored Jul 10, 2017
2 parents b6cfc37 + da2eeca commit 7a72142
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 7a72142

Please sign in to comment.