Skip to content

Deploying with Azure DevOps pipeline #7

@gustavlrsn

Description

@gustavlrsn

Hello and thank you for this example, very useful to get up and running with Azure SWA.

I'm trying to set up the deployment with an Azure DevOps pipeline instead of a GitHub workflow. This is my azure-pipelines.yml:

trigger:
  - main

pool:
  vmImage: ubuntu-latest

steps:
  - task: AzureStaticWebApp@0
    inputs:
      app_location: "client"
      api_location: "api"
      output_location: "out"
    env:
      azure_static_web_apps_api_token: $(deployment_token)

But running into the Oryx not installing the prisma client issue that you fixed in the GitHub workflow file like this:

    env: # Add environment variables here
      NODE_VERSION: 12     
      PRE_BUILD_COMMAND: "npm install -g prisma@3.11.0"      
      CUSTOM_BUILD_COMMAND: "npm install @prisma/client@3.11.0 && npm run build"               
      POST_BUILD_COMMAND: "npm install @prisma/client@3.11.0"     

Do you know how to fix this for an Azure DevOps pipeline too?

There seems to be an api_build_command variable to pass, but not anything for prebuild or postbuild. Not sure how to proceed.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions