azure - Azure Pipeline (YAML) 将一个空解决方案部署到我的 FunctionApp
问题描述
我正在使用 YAML 构建一个 CI-CD azure 管道来部署一个 azure 函数应用程序。一切正常,我什至可以为函数应用设置一些属性,但我的函数应用仍然是空的。
我下载了 zip 工件,看起来还不错。
trigger:
- master
variables:
variables:
buildConfiguration: 'Release'
Parameters.RestoreBuildProjects: '**/TestFunction.csproj'
stages:
- stage: Build
jobs:
- job:
pool:
vmImage: 'vs2017-win2016'
continueOnError: false
steps:
- task: DotNetCoreCLI@2
displayName: 'Restore'
inputs:
command: 'restore'
projects: '$(Parameters.RestoreBuildProjects)'
feedsToUse: 'select'
vstsFeed: '/0856b234-f3a6-4052-b5a6-ed9f6ec9c635'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '$(Parameters.RestoreBuildProjects)'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Publish Build'
inputs:
command: publish
arguments: '--configuration $(BuildConfiguration)'
projects: '$(Parameters.RestoreBuildProjects)'
publishWebProjects: false
modifyOutputPath: true
zipAfterPublish: false
- task: ArchiveFiles@2
displayName: "Archive Files"
inputs:
rootFolderOrFile: "$(System.DefaultWorkingDirectory)"
includeRootFolder: false
archiveFile: "$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip"
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip'
ArtifactName: 'drop'
- stage: Deploy
jobs:
# track deployments on the environment
- deployment:
pool:
vmImage: 'vs2017-win2016'
# creates an environment if it doesn’t exist
environment: 'dev'
strategy:
# default deployment strategy
runOnce:
deploy:
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download Artifacts'
inputs:
buildType: 'current'
downloadType: 'specific'
downloadPath: '$(System.ArtifactsDirectory)'
- task: AzureFunctionApp@1
displayName: 'Azure Function App Deploy: ngproductionfetcherfuncref'
inputs:
azureSubscription: 'Agder Energi Sandbox (1aa9cf92-9d42-49a6-8d31-876ac2dff562)'
appType: functionApp
appName: myFunctionApp
package: '$(System.ArtifactsDirectory)/**/*.zip'
appSettings: '-name0 value0 -name1 value1'
管道全是绿色的:
获取 Azure 应用服务的服务连接详细信息:'myFunctionApp' 正在更新应用服务应用程序设置。数据:{"WEBSITE_RUN_FROM_PACKAGE":"1"} {"WEBSITE_RUN_FROM_ZIP":{"value":""}} 更新了 App Service 应用程序设置和 Kudu 应用程序设置。使用 ZIP Deploy 启动包部署。已成功将 Web 包部署到应用服务。更新应用服务应用程序设置。数据:{"name0":"value0","name1":"value1"} undefined 更新了 App Service 应用程序设置和 Kudu 应用程序设置。
解决方案
推荐阅读
- c# - 如何获得鼠标的圆角 x/z 位置以及某个 y 位置,然后在那里实例化一个对象?
- excel - 更改具有动态日期的工作表的名称
- python - 使用随机字符串创建mysql用户和密码
- typescript - typeorm 在 jsonb 列属性上添加索引
- ngrok - 如何从 Google Colab Notebook 中杀死 Ngrok 隧道
- python - 使用 MySQL 和 phpmyadmin 部署 Python Flask 应用程序
- swift - UITableView HeaderView 尊重可读内容指南
- c++ - 将不同类类型的数组传递给函数并循环它们
- mozilla - Thunderbird 78+:Thunderbird 插件中未定义的 Components.classes
- google-maps - 如何将最后一行谷歌表格单元格公式值转换为变量并替换谷歌文档占位符