Serverless website deployment 100% automated in multiple environments (Test, QA and Production) using Azure DevOps Repos and Pipelines (CI/CD).

Mat Skildum
4 min readJul 15, 2024

In another project based on a real-world scenario, I worked as a Cloud Engineer using DevOps, where I deployed a serverless website in a 100% automated way using Azure DevOps Repos and Azure DevOps Pipelines resources.

Azure DevOps Organization and a new project have been created. The Azure DevOps Repos stored the website files, and the CI/CD Pipelines automated the entire website deployment process in 3 different environments (Test, QA, and Production).

To accomplish this task, I had to first request access to Azure DevOps Parallelism. This required that I created my DevOps Project a few days ago them make the request as it takes a few days for Microsoft to approve and enable this support.

After parallelism was enabled, I was able to start the process in full. For this example, I first needed to create three storage accounts, test, QA, and Production, where the target website would be deployed. Once the accounts were provisioned and available, I needed to enable website access to the accounts which only took a few minutes.

I now went and created a new DevOps project in my organization. I then had to push the source code to the internal repository in the project so that the CI/CD pipeline that will be created can reference it.

Now on to the actual bread and butter of creating the CI/CD pipeline and testing the deployment process.

I first created a basic build pipeline to zip up the source from the Git repository. I had to make sure that I enabled the setting to watch the Git repository and build when changes were made.

I then created a release pipeline to take the zipped up source and deploy it to the test and QA storage accounts. I enable the setting to force approval before the production site could be deployed. This allows for the verification of the site to make sure there were no errors during the test and QA deployments and also verify that the site is functioning correctly.

I now needed to test the pipeline and make sure it was working as expected. To do this, I manually started the initial run and after a few minutes the deployment failed. After some debugging and reviewing the YAML version of each build step, I found a typo and made the needed changes and ran the build again.

This time the deployment went through and I was able to test the the web site. After making sure everything was deployed correctly to the test and QA locations and both site were running running, I was able to approve the deployment to production.

I now wanted to see the full pipeline in action so I made a minor change to the index.html and pushed that to the repository. I was not able to watch the pipeline in action, from start to finish. I watched the build step complete and then watched as the build step went up to the production deployment. I now validated the test and QA sites were updated with the new version and approved the deployment to production.

At this point the project is complete and I have have a working CI/CD pipeline using Azure DevOps.

Here are some screen shots of the three deployed sites.

Test:

AQ:

Production:

After doing some cleanup work by removing the DevOps project and the storage accounts, I can now move on to the final project in the Azure Bootcamp and wrapup this chapter of my learning.

--

--

Mat Skildum
Mat Skildum

Written by Mat Skildum

Certified Scrum Master | Build and Release Management

No responses yet