exam questions

Exam AZ-203 All Questions

View all questions & answers for the AZ-203 exam

Exam AZ-203 topic 24 question 20 discussion

Actual exam question from Microsoft's AZ-203
Question #: 20
Topic #: 24
[All AZ-203 Questions]

You are preparing to deploy an ASP.NET Core website to an Azure Web App from a GitHub repository. The website includes static content generated by a script.
You plan to use the Azure Web App continuous deployment feature.
You need to run the static generation script before the website starts serving traffic.
What are two possible ways to achieve this goal? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.

  • A. Create a file named .deployment in the root of the repository that calls a script which generates the static content and deploys the website.
  • B. Add a PreBuild target in the websites csproj project file that runs the static content generation script.
  • C. Create a file named run.cmd in the folder /run that calls a script which generates the static content and deploys the website.
  • D. Add the path to the static content generation tool to WEBSITE_RUN_FROM_PACKAGE setting in the host.json file.
Show Suggested Answer Hide Answer
Suggested Answer: AD 🗳️
A: To customize your deployment, include a .deployment file in the repository root.
You just need to add a file to the root of your repository with the name .deployment and the content:
[config]
command = YOUR COMMAND TO RUN FOR DEPLOYMENT
this command can be just running a script (batch file) that has all that is required for your deployment, like copying files from the repository to the web root directory for example.
D: In Azure, you can run your functions directly from a deployment package file in your function app. The other option is to deploy your files in the d:\home\site
\wwwroot directory of your function app (see A above).
To enable your function app to run from a package, you just add a WEBSITE_RUN_FROM_PACKAGE setting to your function app settings.
Note: The host.json metadata file contains global configuration options that affect all functions for a function app.
References:
https://github.com/projectkudu/kudu/wiki/Custom-Deployment-Script https://docs.microsoft.com/bs-latn-ba/azure/azure-functions/run-functions-from-deployment-package

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
anishk
Highly Voted 5 years, 1 month ago
https://docs.microsoft.com/en-us/azure/app-service/deploy-continuous-deployment
upvoted 5 times
...
nhtmyzpx
Most Recent 4 years, 5 months ago
A https://github.com/projectkudu/kudu/wiki/Customizing-deployments D https://docs.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package#enabling-functions-to-run-from-a-package
upvoted 1 times
dluk
4 years, 4 months ago
Is 'D' ok? Question says about Website deployment, not Azure Functions
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...