Optimizing jar Artifact Deployment process to Non-Prod & Prod

Click : Project Tracking & MOM

Session 📅 Schedule :6:45 PM IST, 14-Feb-2023 Click : Git Conflict Resolution

Session Date 📅 Schedule : 8:00 PM IST, 16-Feb-2023 Click – Optimizing jar Artifact Deployment Process to Non-Prod & Prod

Session Date 📅 Schedule : 7:00 PM IST, 20-Feb-2023 Current Doc : Optimizing jar Artifact Deployment process to Non-Prod & Prod

Runbook

Design & Architecture

Problem Statement – Developer 

Status – Tested and finalized below solution.
Solution :  

Successfully Completed in Test env

Step by step Procedure : 
  1. Update azure-pipelines.yml files with below code

# Maven

# Build your Java project and run tests with Apache Maven.

# Add steps that analyze code, save build artifacts, deploy, and more:

# https://docs.microsoft.com/azure/devops/pipelines/languages/java

trigger:

branches:

include:

# – master

– feature/*

paths:

include:

– FILE-TRANSFER-FUNCTION

pool:

vmImage: ubuntu-latest

steps:

– task: DownloadPipelineArtifact@2

inputs:

buildType: ‘specific’

project: ‘f3d92645-941a-4600-885f-0f2ea0ab007f’

definition: ‘165’

buildVersionToDownload: ‘latest’

targetPath: ‘$(Pipeline.Workspace)’

– task: AzureFunctionApp@2

inputs:

azureSubscription: ‘Azure.NPE.Quantum_AzureFunctions’

appType: ‘functionAppLinux’

appName: ‘common-funapp-test’

package: ‘$(Pipeline.Workspace)’

runtimeStack: ‘JAVA|11’

appSettings: ‘-APPINSIGHTS_INSTRUMENTATIONKEY 4024822e-1c56-4160-b76a-b69cff92ecf4 -APPLICATIONINSIGHTS_CONNECTION_STRING InstrumentationKey=4024822e-1c56-4160-b76a-b69cff92ecf4;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/ -AzureWebJobsDashboard DefaultEndpointsProtocol=https;AccountName=qtmprdcdrwu2sa0;AccountKey=QeVYkN1e6nxLzhsmxfuy8zdQ3RAuzBRTKgUpO8P/vpd6oeMcGyl8nRSoynT5p1JueywhGI+S2qEd+AStTK64JQ==;EndpointSuffix=core.windows.net -AzureWebJobsStorage DefaultEndpointsProtocol=https;AccountName=qtmprdcdrwu2sa0;AccountKey=QeVYkN1e6nxLzhsmxfuy8zdQ3RAuzBRTKgUpO8P/vpd6oeMcGyl8nRSoynT5p1JueywhGI+S2qEd+AStTK64JQ==;EndpointSuffix=core.windows.net -FUNCTIONS_EXTENSION_VERSION ~4 -FUNCTIONS_WORKER_RUNTIME java -QueueName ookla-common-prod -RunEnvironment prod -UserManagedIdentityClientID 1427e3c8-0eae-47a8-ab83-c43cd9d64f3c -WEBSITE_HTTPLOGGING_RETENTION_DAYS 30’

deploymentMethod: ‘auto’

There are two tools in above classic azure pipeline :

  1. Tool Name : Download pipeline Artifacts

2. Tools Name : Azure Functions Deploy

This tools will help to deploy downloaded artifact to function App.

Conclusion

With above pipline for Production deployment we avoid rebuiding the artifact for production deployment and use the artifact which is validated and working fine in Pre-prod environment.

Please comment if you have any inputs. Thank You

Leave a Comment

MFH IT Solutions (Regd No -LIN : AP-03-46-003-03147775)

Consultation & project support organization.

Contact

MFH IT Solutions (Regd)
NAD Kotha Road, Opp Bashyam School, Butchurajupalem, Jaya Prakash Nagar Visakhapatnam, Andhra Pradesh – 530027