packer-cn/website/pages/docs/provisioners/breakpoint.mdx

63 lines
1.6 KiB
Plaintext
Raw Normal View History

2018-11-29 17:47:06 -05:00
---
2020-03-18 18:46:47 -04:00
description: >
The breakpoint provisioner will pause until the user presses "enter" to resume
the build. This is intended for debugging purposes, and allows you to halt at
a
particular part of the provisioning process.
2018-11-29 17:47:06 -05:00
layout: docs
2020-03-18 18:46:47 -04:00
page_title: breakpoint - Provisioners
sidebar_title: Breakpoint
2018-11-29 17:47:06 -05:00
---
# Breakpoint Provisioner
2018-11-29 17:47:06 -05:00
Type: `breakpoint`
2019-01-11 17:06:15 -05:00
The breakpoint provisioner will pause until the user presses "enter" to resume
the build. This is intended for debugging purposes, and allows you to halt at a
particular part of the provisioning process.
This is independent of the `-debug` flag, which will instead halt at every step
and between every provisioner.
2018-11-29 17:47:06 -05:00
## Basic Example
```json
2018-11-29 17:47:06 -05:00
{
"type": "breakpoint",
"note": "foo bar baz"
}
```
## Configuration Reference
### Optional
2020-03-18 18:46:47 -04:00
- `disable` (boolean) - If `true`, skip the breakpoint. Useful for when you
have set multiple breakpoints and want to toggle them off or on. Default:
`false`
2020-03-18 18:46:47 -04:00
- `note` (string) - a string to include explaining the purpose or location of
the breakpoint. For example, you may find it useful to number your
breakpoints or label them with information about where in the build they
occur
2020-03-23 20:02:12 -04:00
@include 'provisioners/common-config.mdx'
2019-04-08 10:05:04 -04:00
## Usage
Insert this provisioner wherever you want the build to pause. You'll see ui
output prompting you to press "enter" to continue the build when you are ready.
For example:
2020-03-27 14:22:33 -04:00
```shell
==> docker: Pausing at breakpoint provisioner with note "foo bar baz".
==> docker: Press enter to continue.
```
Once you press enter, the build will resume and run normally until it either
2019-01-11 17:06:15 -05:00
completes or errors.