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

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

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 App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,936 questions
{count} vote

1 answer

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

    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.

    1 person found this answer helpful.