0

假设我有一个逻辑应用标准,其工作流包含以下内容:

在此处输入图像描述

我的文件具有以下结构:

|   .gitignore
|   azure-pipelines.yml
|   
+---Integrations
|   +---Artifacts
|   |   +---Maps
|   |   |       myMap.xslt
|   |   |       
|   |   \---Schemas
|   +---LogicApp
|   |       LogicApp-template.json
|   |       
|   +---RequiredIntegerations
|   |       storage-template.json
|   |       
|   \---Workflows
|       |   azure.parameters.json
|       |   connections.json
|       |   host.json
|       |   parameters.json
|       |      
|       \---testXsltWorkflow
|               workflow.json
|               
\---releasePipeline
   |   commit.yml
   |   release.yml
   |   requiredDeployment.yml
   |   
   +---commitJobs
   |       integrations.yml
   |       
   \---releaseJobs
           deployIntegrations.yml

我尝试以与在 yaml 文件中部署工作流相同的方式部署地图文件夹(zip 部署):

我像这样构建地图工件:

# Build Maps Artifacts
- job: Build_Maps
    displayName: Build_Maps
    dependsOn: Build_LA_Artifact

    pool:
      vmImage: 'ubuntu-18.04'

    # Copy the files to project_output folders
    steps:
    - task: CopyFiles@2
      displayName: 'Create project folder'
      inputs:
        SourceFolder: 'Integrations/'
        Contents: |
          Artifacts/**
        TargetFolder: 'project_output'

    ## convert the files in project_output/Artifacts folder to a zip files 
    ## (i.e. compress the worklflow files into a zip file) and save it in artifiact folder
    - task: ArchiveFiles@2   
      displayName: 'Create project zip'
      inputs:
        rootFolderOrFile: '$(System.DefaultWorkingDirectory)/project_output/Artifacts'
        includeRootFolder: false
        archiveType: 'zip'
        archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
        replaceExistingArchive: true

    ## Publish/deploy the maps inside the LA.
    - task: PublishPipelineArtifact@1
      displayName: 'Publish project zip artifact'
      inputs:
        targetPath: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
        artifact: 'mapsArtifact' 
        publishLocation: 'pipeline'

我像这样部署工件:

# deploy maps
- deployment: DeployMapsArtifact
    dependsOn: DeployLogicAppArtifact
    
    pool:
      vmImage: 'ubuntu-18.04'
    environment: "${{parameters.environment}}"
    strategy:
      runOnce:
        deploy:
          steps:
            - download: current
              artifact: 'mapsArtifact'             
            - task: AzureFunctionApp@1
              displayName: 'Deploy logic app maps'
              inputs:
                azureSubscription: "${{ parameters.connectedServiceName }}"
                appType: 'functionApp'
                appName:  "${{parameters.LA_name}}-${{ parameters.environment }}" 
                package: '$(Pipeline.Workspace)/mapsArtifact/*.zip'
                deploymentMethod: 'zipDeploy'

部署成功,但我仍然无法在标准逻辑应用程序的地图选项卡内看到我的 XSLTmap。

4

0 回答 0