Oryx icon indicating copy to clipboard operation
Oryx copied to clipboard

Support RUN_BUILD_COMMAND on all platforms

Open anthonychu opened this issue 4 years ago • 4 comments

Feature Request

Currently, RUN_BUILD_COMMAND is only supported in nodejs builds. Providing the ability to control the build command is useful for other platforms too. Please add support for it in other supported platforms, like:

  • .NET
  • Python
  • Ruby/Jekyll
  • Hugo

@arroyc @qianz2

anthonychu avatar May 28 '21 21:05 anthonychu

More context on this.

Currently, Azure Static Web Apps allows the customer to specify a custom build command. This build command is meant to replace the build command that is detected by oryx. For npm, the build command is npm run build, for dotnet it is dotnet publish …, etc.

When a custom build command is specified, Static Web Apps calls oryx build with RUN_BUILD_COMMAND. Currently, only Node.js apps use this variable. Others do not. The request here is to support this for other platforms.

anthonychu avatar Oct 01 '21 20:10 anthonychu

@anthonychu Is there way to pass the "finished product" (typically a site folder) to Azure Static Web Apps?

It's pretty easy to install the necessary tools and run commands on a hosted agent, but the AzureStaticWebApp@0 task fails as Oryx tries to build stuff (e.g. mkdocs) it can't handle. Is there way to bypass the built-in build step, build everything on my own, and pass the end result to Azure Static Web Apps until the above RUN_BUILD_COMMAND feature is implemented?

smholvoet avatar Nov 02 '21 20:11 smholvoet

@smholvoet Yes, see the skip_app_build flag: https://docs.microsoft.com/en-us/azure/static-web-apps/build-configuration?tabs=azure-devops#skip-building-front-end-app

anthonychu avatar Nov 02 '21 23:11 anthonychu

@anthonychu Exactly what I needed, thanks! 🥳

smholvoet avatar Nov 03 '21 08:11 smholvoet