Azure function app deployed successfully from the azure Devops pipeline, but not showing function app
Shayaan Kaleem Barday
0
Reputation points
Hi team,
when we try to deploy the python code into azure function app from the azure CI/CD pipeline by using the ARM template. deployment is going fine without any issue but code not showing in azure funcation app.
Kindly assist me to fix this issue ASAP?
plz find the below ARM template for your references.
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
pr:
- "dev"
trigger:
paths:
include:
- "user-shopreq-order-purge"
pool:
vmImage: "ubuntu-latest"
variables:
isRelease: ${{startsWith(variables['Build.SourceBranch'], 'refs/heads/Releases')}}
stages:
- stage: Build_azure_shopreq_order_purge
displayName: "Build Azure shopreq-order-purge artifacts"
jobs:
- job: Verify
displayName: "Verify templates"
steps:
# ARM Template Validation
- template: azure-pipeline-template-validate.yaml
parameters:
subscriptionId: 'fdba77aa-2f9f-4f6e-8b45-371a0223ebf0'
azureResourceManagerConnection: 'Endpoint-dev'
functionResourceGroup: 'sis-functions-linux-dev'
environment: 'dev'
location: 'South Central US'
- template: azure-pipeline-template-validate.yaml
parameters:
subscriptionId: 'c4b75e2a-aabe-4882-b40d-4f026610be5c'
azureResourceManagerConnection: 'Endpoint-qa'
functionResourceGroup: 'sis-functions-linux-qa'
environment: 'qa'
location: 'South Central US'
- template: azure-pipeline-template-validate.yaml
parameters:
subscriptionId: 'c14fbdb9-85c1-4398-8fbd-b897f657215c'
azureResourceManagerConnection: 'Endpoint-prod'
functionResourceGroup: 'sis-functions-linux-prod'
environment: 'prod'
location: 'South Central US'
- job: Build
displayName: "Build the functions"
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.8'
inputs:
versionSpec: 3.8
- bash: |
python3.8 -m venv worker_venv
source worker_venv/bin/activate
pip3.8 install setuptools
pip install --target="$(System.DefaultWorkingDirectory)/user-shopreq-order-purge/.python_packages/lib/site-packages" -r user-shopreq-order-purge/requirements.txt
npm install --prefix="$(System.DefaultWorkingDirectory)/user-shopreq-order-purge/shopreq-order-purge-task/cosmos_scripts"
displayName: 'Install Application Dependencies'
- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/user-shopreq-order-purge'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/user-shopreq-order-purge/$(Build.BuildId).zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/user-shopreq-order-purge/$(Build.BuildId).zip'
- task: PublishPipelineArtifact@1
displayName: "Publish templates"
inputs:
targetPath: "$(Build.SourcesDirectory)/user-shopreq-order-purge/templates"
artifactName: templates
- stage: DEV
displayName: "DEV Environment"
jobs:
- deployment: Deploy
displayName: "Deploy"
environment: sis-functions-dev
strategy:
runOnce:
deploy:
steps:
- template: azure-pipeline-template.yaml
parameters:
subscriptionId: 'fdba77aa-2f9f-4f6e-8b45-371a0223ebf0'
azureResourceManagerConnection: 'Endpoint-dev'
functionName: 'shopreq-order-purge-functions-dev'
functionResourceGroup: 'sis-functions-linux-dev'
environment: 'dev'
location: 'South Central US'
- stage: QA
displayName: "QA Environment"
jobs:
- deployment: Deploy
displayName: "Deploy"
environment: sis-functions-qa
strategy:
runOnce:
deploy:
steps:
- template: azure-pipeline-template.yaml
parameters:
subscriptionId: 'c4b75e2a-aabe-4882-b40d-4f026610be5c'
azureResourceManagerConnection: 'Endpoint-qa'
functionName: 'shopreq-order-purge-functions-qa'
functionResourceGroup: 'sis-functions-linux-qa'
environment: 'qa'
location: 'South Central US'
- stage: PROD
displayName: "PROD Environment"
jobs:
- deployment: Deploy
displayName: "Deploy"
environment: sis-functions-prod
strategy:
runOnce:
deploy:
steps:
- template: azure-pipeline-template.yaml
parameters:
subscriptionId: 'c14fbdb9-85c1-4398-8fbd-b897f657215c'
azureResourceManagerConnection: 'Endpoint-prod'
functionName: 'shopreq-order-purge-functions-prod'
functionResourceGroup: 'sis-functions-linux-prod'
environment: 'prod'
location: 'South Central US'