Skip to content

CI/CD of simple Java-Springboot application. Build and package the application into .jar . Created Dockerfile and dockerised the application. Built and pushed image to ACR and deployed to ACA. Integrated jacoco for code coverage and tested using Junit test cases. The infrastructure is built using bicep templates.

Notifications You must be signed in to change notification settings

HIMA10SHREE/CI-CD-Java-Springboot-to-Azure-container-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

CI-CD-Java-Springboot-to-Azure-container-app

Install java and maven

Java  :   https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.exe 
maven :  https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.zip 

Extensions for vscode:

   1. Extension Pack for Java 
   2. Spring Boot Extension Pack  [which includes Spring Boot dashboard , Spring Boot initializer,Spring Boot tools]

building the code locally:

1 mvn spring-boot: run 
2.  a. mvn clean install 

    b. java -jar target/hello-0.0.1-SNAPSHOT.jar  (for eg: let snapshot be hello-0.0.1-SNAPSHOT.jar) 

                           OR 

    b. go to the Springboot dashboard and click on Run icon. Hit the required page. 

Testing the code locally:

To run all the test cases 
mvn test 

To run a particular test class 
mvn -Dtest=HelloTest test 

After testing locally push the code to ADO

Creating infrastructure in Azure through bicep script:

ACR 
ACA

Deploying the application to Azure Container App

  1. taken the compatible maven version , extracting it and doing the maven build in the pipeline. 

  2. Dockerised the application and build and pushed the image to ACR 

  3. Managed identity generated and passed it to authenticate newly created container app. Specified port and other configurations added.
Screenshot 2023-10-15 102818 Screenshot 2023-10-15 103044

About

CI/CD of simple Java-Springboot application. Build and package the application into .jar . Created Dockerfile and dockerised the application. Built and pushed image to ACR and deployed to ACA. Integrated jacoco for code coverage and tested using Junit test cases. The infrastructure is built using bicep templates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published