question

mondolq-4747 avatar image
1 Vote"
mondolq-4747 asked ·

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

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-webapps
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

bhargaviannadevara-msft avatar image
1 Vote"
bhargaviannadevara-msft answered ·

Hello @mondolq-4747,

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.




service-principal.png (106.0 KiB)
· 2 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@mondolq-4747 Hope you had a chance to check the above response. Are there any further questions here?

0 Votes 0 · ·

@mondolq-4747 Let us know if there is anything else related to this thread that we can assist you with, else please feel free to mark and close this out if any of the above responses have been of help. Thanks again for reaching out!

0 Votes 0 · ·