SpringBoot + GitHub + Azure Pipeline + Azure Web App

I still admire the ease to deploy Heroku with Java. But since I got some credit on Azure, let me try to make a similar workflow.

I would assume one have an Azure account.

First step, as usual, create a SpringBoot web app. Note the final target might need to be named as app.jar to be picked by Azure without configure.

One can put the code on GitHub or BitBucket or Azure Repos (I think it comes with Azure DevOps) or else.

I wrote a simple webapp to auto-detect charset of uploaded text file and convert to UTF-8, no database yet.

Second step, on Azure, create Azure Web App. Choose Java SE on Linux platform (ongoing support for Windows). There is a free tier F1 SKU (it is slow, as expected, but free of charge).

This step could also be done as Java code (infrastructure as code) via Azure CLI or Java (among other options).

Third step, create Azure Pipeline to build and deploy. It connects the code from one’s repository and webapp deployment on Azure. One can enter Azure DevOps from either GitHub Marketplace or Azure.

Create a new Builds Pipeline, select the repository. DevOps would automatically detect the build tool. Choose “Maven package Java project Web App to Linux on Azure” (I would assume similar for Gradle).

Connect with Azure and choose the Web App name created in second step. Review the final YAML configure (it should contains 3 jobs in Build stage, and 1 job in Deploy stage).

And it is done. First build/deploy would be ongoing, and next time code change on master new build/deploy would run automatically.

Code committed to repository would be live in a few minutes.

PS, a few side notes:

  1. tika-core has the interface, but to detect charset, tika-parsers is required.
  2. There is still bugs in Azure Pipeline (like status not updated), hence there is comment trigger.
This entry was posted in Cloud, Computer and Internet and tagged . Bookmark the permalink.

1 Response to SpringBoot + GitHub + Azure Pipeline + Azure Web App

  1. Pingback: Web app as proxy to manage Azure resource | Weidong Xu -> Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s