Skip to content

Commit 8d4d48f

Browse files
authored
Adds pre/post build hooks to service hooks definitions (#4068)
Pre/Post build hooks already exist but are missing from schema definition. This enables more discoverability for scenarios where users need to perform an action after restoring but before package. One scenario is for the VITE integration for front-end web apps. Docker builds happen at the build state of the azd pipeline so users can hook into prebuild to set any VITE_ environment variables needed for building container images. Adds missing docs for prebuild and postbuild service lifecycle hook. MicrosoftDocs/azure-dev-docs#1399
1 parent 1ca99cd commit 8d4d48f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

schemas/alpha/azure.yaml.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,16 @@
161161
"description": "Runs after the service dependencies are restored",
162162
"$ref": "#/definitions/hook"
163163
},
164+
"prebuild": {
165+
"title": "pre build hook",
166+
"description": "Runs before the service is built",
167+
"$ref": "#/definitions/hook"
168+
},
169+
"postbuild": {
170+
"title": "post build hook",
171+
"description": "Runs after the service is built",
172+
"$ref": "#/definitions/hook"
173+
},
164174
"prepackage": {
165175
"title": "pre package hook",
166176
"description": "Runs before the service is deployment package is created",

schemas/v1.0/azure.yaml.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@
156156
"description": "Runs after the service dependencies are restored",
157157
"$ref": "#/definitions/hook"
158158
},
159+
"prebuild": {
160+
"title": "pre build hook",
161+
"description": "Runs before the service is built",
162+
"$ref": "#/definitions/hook"
163+
},
164+
"postbuild": {
165+
"title": "post build hook",
166+
"description": "Runs after the service is built",
167+
"$ref": "#/definitions/hook"
168+
},
159169
"prepackage": {
160170
"title": "pre package hook",
161171
"description": "Runs before the service is deployment package is created",

0 commit comments

Comments
 (0)