Deploying environment variables for nextJS and nodeJS is not working from ADO Pipeline

Shartul Kumar 5 Reputation points
2025-03-17T18:05:48.9233333+00:00

Deploying environment variables for nextJS and nodeJS is not working

Azure DevOps
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,181 Reputation points Microsoft Employee
    2025-03-27T16:07:31.49+00:00

    Hi @Shartul Kumar

    NodeTool@1 isn't used in this manner. It's responsible for finding and pulling a specific version of Node; which is probably why you're getting the error you're getting.

    To configure your app setting environment variables from your group, you need to set the appSettings property of the AzureWebApp@1 task.

    - task: AzureWebApp@1
      inputs:
        # app settings is a string of -key value
        appSettings: -AUTH_MICROSOFT_ENTRA_ID_CLIENT_ID $(AUTH_MICROSOFT_ENTRA_ID_CLIENT_ID) -GRC_MAPPER_URL $(GRC_MAPPER_URL) -GRANT_TYPE=$(GRANT_TYPE) -BASE_URL_TOKEN $(BASE_URL_TOKEN)
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.