Bitbucket Pipeline with the pipe azure-web-apps-deploy

asked 2020-05-26T08:16:04.773+00:00
mondolq 6 Reputation points

Hello,

I am recovering a project that is on azure. The code is on bitbucket so we decided to used bitbucket pipeline in order to deploy our environments.

I see that it exists a pipe that seems to do what I want to do: https://bitbucket.org/microsoft/azure-web-apps-deploy/src/1.0.3/

I'm new to Microsoft azure so I tried to figure it out but I don't know where to find all information:

            - step:
                     name: Dev deploy
                     deployment: Test
                     caches:
                       - node
             script:
             - pipe: microsoft/azure-web-apps-deploy:1.0.3
               variables:
                  AZURE_APP_ID: 
                  AZURE_PASSWORD: 
                  AZURE_TENANT_ID: 
                  AZURE_RESOURCE_GROUP: 
                  AZURE_APP_NAME:
                  ZIP_FILE: 'app.zip'
                  SLOT: 'dev' # Optional.
                  DEBUG: 'true' # Optional.

I figure it out for AZURE_APP_NAME and AZURE_RESOURCE_GROUP but I still don't know where I can find AZURE_APP_ID, AZURE_PASSWORD, and AZURE_TENANT_ID.

Moreover, I do not understand the purpose of ZIP_FILE. Do I need to make a zip of the code before deploying it? Like I do my npm install then I package all of the code?

Regards,
Quentin

Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,305 questions
1 vote

1 answer

Sort by: Most helpful
  1. answered 2020-05-27T15:18:16.05+00:00
    BhargaviAnnadevara-MSFT 5,321 Reputation points

    Hello @mondolq ,

    Thanks for reaching out.

    As mentioned in the Prerequisites section of the document you referenced above, you need to execute the following Azure CLI command first:

    az ad sp create-for-rbac --name <service-principal-name>  
    

    This would create a Service Principal and return a response as shown under:

    8738-service-principal.png

    The appId, password and tenant correspond to AZURE_APP_ID, AZURE_PASSWORD and AZURE_TENANT_ID, respectively.

    And yes, ZIP_FILE is the path of the package you want to deploy.

    Hope this helps. Please let me know if there are further questions.