After my cd pipeline is completed running on Azure DevOps and the deployment is succeded, the changes are not reflected on my Standard Logic App.
Any ideas why this might be ocurring? This is my template for the deployment.
parameters:
- name: integrationId
type: string
default: ''
- name: environmentName
type: string
default: ''
jobs:
- job: Publish
displayName: Publish
steps:
- task: CopyFiles@2
inputs:
contents: |
$(System.DefaultWorkingDirectory)/LogicApps/${{ parameters.integrationId }}/**
targetFolder: 'project_output'
- task: ArchiveFiles@2
displayName: 'Create project zip'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/project_output'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
- task: PublishPipelineArtifact@1
displayName: 'Publish LogicApp Artifacts'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
artifact: 'artifact${{ parameters.environmentName }}'
publishLocation: 'pipeline'
- job: logicAppDeploy
displayName: 'Deploy the Logic apps'
steps:
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: 'artifact${{ parameters.environmentName }}'
targetPath: '$(Build.ArtifactStagingDirectory)'
- task: AzureFunctionApp@1
displayName: 'Deploy logic app workflows'
inputs:
azureSubscription: $(ARMConnection)
appType: 'functionApp'
resourceGroupName: rg-integrations-${{ parameters.environmentName }}
appName: ${{ parameters.integrationId }}-${{ parameters.environmentName }}-temp
package: $(Build.ArtifactStagingDirectory)/**/*.zip
deploymentMethod: 'zipDeploy'
I this is my project structure:
| Artifacts
|| Maps
||| MapName1
||| ...
|| Schemas
||| SchemaName1
||| ...
| WorkflowName1
|| workflow.json
|| ...
| WorkflowName2
|| workflow.json
|| ...
| .funcignore
| connections.json
| host.json
Not sure what is the issue, because the deployment is marked as succeded, and on the standar logic app the logs for the deployment are also successful, i even tried restarting the logica app but the changes still not reflected.
Also when i do the deployment throught Visual Studio Code, the apps gets deployed wihtout issue. But i would like it to be deployed automatically with Azure DevOps pipeline
You can use below yaml pipeline to deploy 2 Azure Logic App projects successfully even after they are modified:-
My Azure Repos:-
YAML code:-
trigger:
branches:
include:
- main
- development
pool:
vmImage: 'ubuntu-latest'
steps:
- task: CopyFiles@2
displayName: 'Copy files to artifact staging directory'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: |
**/*.json
!**/bin/**
!**/obj/**
TargetFolder: '$(Build.ArtifactStagingDirectory)/LogicApp'
- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/LogicApp'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/MyBuildArtifact.zip'
replaceExistingArchive: true
- task: AzureFunctionApp@1
displayName: 'Deploy logic app workflows'
inputs:
azureSubscription: 'xxxx subscription (xxxxxxxxxxxe97cb2xx7)'
appType: 'functionAppLinux'
appName: 'siliconLA'
package: '$(Build.ArtifactStagingDirectory)/MyBuildArtifact.zip'
deploymentMethod: zipDeploy
Output:-
StateLess1:-
StateLess2 is empty:-
Created sample connector in Stateless2 and pushed the updated code to Azure repos, And ran the pipeline again. The new connectors where deployed successfully in Stateless2 Workflow:-
Added the connector locally and pushed this code to Azure repos:-
Azure DevOps pipeline output:-
Stateless2 was updated with the connector successfully when I ran the pipeline again:-