Introduction
This article explains how to implement CI/CD (Continuous Integration and Continuous Delivery) for a simple Azure function app using Atlassian Bamboo. Bamboo does continuous delivery of the project from source code to deployment. It has stages including Build, Test and Deploy.
In this article we will discuss Bitbucket as the Git repository, but you can use any other Git repository (Like TFS Git) for source control of the code.
We will follow the below steps during this article:
- Create Azure function app using Visual Studio
- Create Bitbucket cloud remote repository and push the project source code
- Create the Azure function app in Azure
- Configure a Bamboo build plan
- Configure a Bamboo deployment project
- Test the function app
Pre-requisites (Environment Details)
- Azure subscription
- Bamboo Server
- Bitbucket, TFS git or any other Git Remote Repository
- Visual Studio 2017/2019
- Git for Windows
Create Azure function app using Visual Studio
Open Visual Studio, click on Create Project, choose Azure Function app template.

Click on “Create” button, it will redirect to the below screen.

Select the “Http trigger” function and click the “Create” button, it will generate the function app project in Visual Studio.
Click on the bottom right corner “Add to source Control." If you have Git for Windows Installed it will add the project to git as shown in the below image.

Click on “Team Explorer” tab, it will have the following option to push the code to Remote Repositories.

Depending on your Git remote repositories you can push the code. In this article we will be using Bitbucket Cloud Git Repository.
Create Bitbucket cloud remote repository and Push the Project Source Code
Go to bitbucket cloud, click on + button as highlighted below

You will be redirected to the below screen.

Click on “Create repository” as highlighted above
Once repository created you can have the screen as below

Now you can push the Existing Azure function app repository using either the git commands or add the Repository path in Visual Studio as in the below image.

Click on “Publish” button to push the code to the Bitbucket cloud repository, if it requires it, please provide your Remote Repository credentials.
Now you can go to bitbucket cloud repository to see your code as below

So now we have created the Azure Function app using Visual Studio and pushed the code to Atlassian Bitbucket Cloud Git repository successfully.
Create the Azure function app in Azure
Go to Azure Portal
Go to Azure Function app creation and you will be redirected as in the below screen.

Click on “Review+Create” button you will be redirected to the below screen.

Click on “Create” button, an Azure deployment process will run and create the Function app as below.

So now we have an Azure function app Project Source Code in Bitbucket Repository and an Azure function empty app without any functions. Next we will use Bamboo server to deploy the code to Azure Function app.
Create and Configure a Bamboo Build Plan
Go to Bamboo server and it will display the already created plans as below.

Click on “Create Plan” button as highlighted above, you will be redirected to the below screen.

Provide project name, Plan Name and Plan Description and click on “Configure Plan”. Link your newly created repository to the build plan.




















Join the conversation! Your thoughts help the community grow.