我正在使用YAML构建CI-CD天蓝色管道以部署天蓝色功能应用程序。 一切正常,我什至可以为功能应用设置一些属性,但是我的功能应用仍然为空。
我下载了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”的服务连接详细信息 更新App Service应用程序设置。数据:{“ WEBSITE_RUN_FROM_PACKAGE”:“ 1”} {“ WEBSITE_RUN_FROM_ZIP”:{“ value”:“”}} 更新了App Service应用程序设置和Kudu应用程序设置。 使用ZIP部署启动了包部署。 已成功将Web程序包部署到App Service。 更新App Service应用程序设置。数据:{“ name0”:“ value0”,“ name1”:“ value1”}未定义 更新了App Service应用程序设置和Kudu应用程序设置。