Skip to content

Commit 92120f2

Browse files
committed
fixes
1 parent 70d2ba6 commit 92120f2

File tree

4 files changed

+28
-238
lines changed

4 files changed

+28
-238
lines changed

articles/azure-developer-cli/TOC.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@
123123
href: project-name-validation.md
124124
- name: Customize workflows using command and event hooks
125125
href: azd-extensibility.md
126-
- name: Interactive hooks
127-
href: interactive-hooks.md
128126
- name: Enable demo mode
129127
href: demo-mode.md
130128
- name: Configure template sources

articles/azure-developer-cli/azd-extensibility.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ hooks:
165165

166166
The `azd hooks run` command allows you to execute hooks independently of their normal trigger events. This is useful for testing and debugging hooks without going through the entire workflow.
167167

168-
### Basic usage
169-
170168
```bash
171169
azd hooks run <hook-name>
172170
```
@@ -189,6 +187,33 @@ azd hooks run postup -e staging
189187
azd hooks run predeploy --service frontend --platform posix -e production --interactive
190188
```
191189

190+
## Configure interactive mode
191+
192+
Hooks run in interactive mode by default. Interactive hooks mode allows you to run hook scripts with direct console interaction, making it easier to debug, monitor, and interact with your hooks in real-time. You can explicitly set the `interactive` property in your hook configuration if you want to disable interactive mode for a specific hook:
193+
194+
```yaml
195+
hooks:
196+
postprovision:
197+
shell: sh
198+
run: ./scripts/setup-database.sh
199+
interactive: false # Default is true
200+
```
201+
202+
For service-specific hooks:
203+
204+
```yaml
205+
services:
206+
api:
207+
project: ./src/api
208+
language: js
209+
host: appservice
210+
hooks:
211+
postdeploy:
212+
shell: sh
213+
run: ./scripts/post-deploy-verification.sh
214+
interactive: false # Override the default interactive mode
215+
```
216+
192217
### Use environment variables with hooks
193218

194219
Hooks can get and set environment variables in the `.env` file using the `azd env get-values` and `azd set <key> <value>` commands. Hooks can also retrieve environment variables from your local environment using the `${YOUR_ENVIRONMENT VARIABLE}` syntax. `azd` automatically sets certain environment variables in the `.env` file when commands are run, such as `AZURE_ENV_NAME` and `AZURE_LOCATION`. Output parameters from the `main.bicep` file are also set in the `.env` file. The [manage environment variables](/azure/developer/azure-developer-cli/manage-environment-variables) page includes more information about environment variable workflows.

articles/azure-developer-cli/azd-init-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@ After initializing your project with `azd init`, you can:
159159
- [Azure Developer CLI commands](azd-commands.md)
160160
- [Azure.yaml schema reference](azd-schema.md)
161161
- [Azure Developer CLI templates](azd-templates.md)
162-
- [Template galleries](template-galleries.md)
162+
- [Template galleries](azd-template-galleries.md)

articles/azure-developer-cli/interactive-hooks.md

Lines changed: 0 additions & 233 deletions
This file was deleted.

0 commit comments

Comments
 (0)