Deploy Gitlab-To-Azure

How to Deploy from #Gitlab into #Azure

In this article you will learn how to integrate your Gitlab repository with Azure webapp in 6 steps.

Let’s get it done within 6 steps:

Firstly you need to have your Azure webapp created

  1. Azure, Login into your azure portal and hit the following URL
    https://{web-app-name}.scm.azurewebsites.net/api/sshkey?ensurePublicKey=1
    Copy the lines between the quotations
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIRPqILCpeHwnmGonZv1cTrQLWtHw5hYps20cL/wZhMHhlTfjYTziHHHXMs3gbTGHXHWFzfIvkhpbQMrz1B/BFmyCwb51YQXnc1kz0RE20soBQv1sBVxOHk8fts5fu5Chbg9x1g6E6c1WdyvyAX/5aspCanC+WzDMgk5n37ouds4Ns9RjhCAGlsMXQU1uPS84wKexIcf3g/7C9DfD/VJw0U0jy2ji0o8FNP6pd69wQrJ5NeqZmHKOYlY5agddOnzsuT6umtWLyolZInM3XfPeT0t6V+2ilx62RO4T49LZEYoxzwHv/CldZDr8kONZlRd/ywPCXFXG8k15cj5luz9u5

  2. Gitlab, Navigate to your repository there and go to the settings then Repository Tab
    In the Deploy Keys section, paste the copied string here.

  3. Gitlab, Copy the SSH Link from your repository

  4. Azure, Navigate to your webapp.
    Go to the Deployment options and set the source as "External Repository"
    Paste the SSH copied link here

  5. Azure, go to Properties of your webapp
    Copy the “Deployment Trigger URL”

  6. Gitlab, Navigate to your repository. Click on the settings in the left sidebar then hit "Integration"
    Paste the copied Trigger Link here.

All Done! any new commit will trigger the deployment to Azure.

Comments