Azure pipelines agent fails to extract artifact with error: unsupported media type "undefined"
Azure pipelines agent fails to extract artifact with error: unsupported media type "undefined"
我正在使用设置为部署代理的 Azure 代理部署到本地 IIS 服务器。
我已启用 System.Debug,这是 'IIS Web App Deploy' 任务的以下日志:
2019-10-22T14:57:19.1268789Z ##[debug]Evaluating condition for step: 'IIS Web App Deploy'
2019-10-22T14:57:19.1269225Z ##[debug]Evaluating: succeeded()
2019-10-22T14:57:19.1269317Z ##[debug]Evaluating succeeded:
2019-10-22T14:57:19.1269453Z ##[debug]=> True
2019-10-22T14:57:19.1269616Z ##[debug]Result: True
2019-10-22T14:57:19.1269753Z ##[section]Starting: IIS Web App Deploy
2019-10-22T14:57:19.1430475Z ==============================================================================
2019-10-22T14:57:19.1430556Z Task : IIS web app deploy
2019-10-22T14:57:19.1430589Z Description : Deploy a website or web application using Web Deploy
2019-10-22T14:57:19.1430620Z Version : 0.156.3
2019-10-22T14:57:19.1430650Z Author : Microsoft Corporation
2019-10-22T14:57:19.1430695Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/iis-web-app-deployment-on-machine-group
2019-10-22T14:57:19.1430728Z ==============================================================================
2019-10-22T14:57:19.8001136Z ##[debug]agent.TempDirectory=C:\azagent\A1\_work\_temp
2019-10-22T14:57:19.8006122Z ##[debug]loading inputs and endpoints
2019-10-22T14:57:19.8033514Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2019-10-22T14:57:19.8133449Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2019-10-22T14:57:19.8142981Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2019-10-22T14:57:19.8143905Z ##[debug]loading INPUT_EXCLUDEFILESFROMAPPDATAFLAG
2019-10-22T14:57:19.8144393Z ##[debug]loading INPUT_JSONFILES
2019-10-22T14:57:19.8144583Z ##[debug]loading INPUT_PACKAGE
2019-10-22T14:57:19.8144756Z ##[debug]loading INPUT_REMOVEADDITIONALFILESFLAG
2019-10-22T14:57:19.8144906Z ##[debug]loading INPUT_SETPARAMETERSFILE
2019-10-22T14:57:19.8145071Z ##[debug]loading INPUT_TAKEAPPOFFLINEFLAG
2019-10-22T14:57:19.8145216Z ##[debug]loading INPUT_VIRTUALAPPLICATION
2019-10-22T14:57:19.8145377Z ##[debug]loading INPUT_WEBSITENAME
2019-10-22T14:57:19.8145524Z ##[debug]loading INPUT_XMLTRANSFORMATION
2019-10-22T14:57:19.8145712Z ##[debug]loading INPUT_XMLVARIABLESUBSTITUTION
2019-10-22T14:57:19.8145857Z ##[debug]loading SECRET_LDAPPASSWORD
2019-10-22T14:57:19.8146015Z ##[debug]loaded 14
2019-10-22T14:57:19.8146158Z ##[debug]Agent.ProxyUrl=undefined
2019-10-22T14:57:19.8146316Z ##[debug]Agent.CAInfo=undefined
2019-10-22T14:57:19.8146703Z ##[debug]Agent.ClientCert=undefined
2019-10-22T14:57:19.8147087Z ##[debug]Agent.SkipCertValidation=undefined
2019-10-22T14:57:19.8147369Z ##[debug]check path : C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_REDACTED[=10=].156.3\task.json
2019-10-22T14:57:19.8147522Z ##[debug]adding resource file: C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_REDACTED[=10=].156.3\task.json
2019-10-22T14:57:19.8147682Z ##[debug]system.culture=en-US
2019-10-22T14:57:19.8147828Z ##[debug]check path : C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_REDACTED[=10=].156.3\node_modules\webdeployment-common-v2\module.json
2019-10-22T14:57:19.8148013Z ##[debug]adding resource file: C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_REDACTED[=10=].156.3\node_modules\webdeployment-common-v2\module.json
2019-10-22T14:57:19.8148277Z ##[debug]system.culture=en-US
2019-10-22T14:57:19.8148420Z ##[debug]WebSiteName=sharedtechdev.wustl.edu
2019-10-22T14:57:19.8148567Z ##[debug]VirtualApplication=bingobongo
2019-10-22T14:57:19.8148699Z ##[debug]Package=C:\azagent\A1\_work\r1\a\_myapp\drop\publish.zip
2019-10-22T14:57:19.8148841Z ##[debug]SetParametersFile=C:\azagent\A1\_work\r1\a
2019-10-22T14:57:19.8148983Z ##[debug]RemoveAdditionalFilesFlag=false
2019-10-22T14:57:19.8149111Z ##[debug]ExcludeFilesFromAppDataFlag=false
2019-10-22T14:57:19.8149252Z ##[debug]TakeAppOfflineFlag=True
2019-10-22T14:57:19.8149380Z ##[debug]AdditionalArguments=null
2019-10-22T14:57:19.8149521Z ##[debug]XmlTransformation=false
2019-10-22T14:57:19.8151189Z ##[debug]JSONFiles=**/appsettings.json
2019-10-22T14:57:19.8151377Z ##[debug]XmlVariableSubstitution=false
2019-10-22T14:57:19.8151513Z ##[debug]Finding files matching input: C:\azagent\A1\_work\r1\a\_myapp\drop\publish.zip
2019-10-22T14:57:19.8151659Z ##[debug]Agent.TempDirectory=C:\azagent\A1\_work\_temp
2019-10-22T14:57:19.8151810Z ##[debug]Agent.TempDirectory=C:\azagent\A1\_work\_temp
2019-10-22T14:57:19.8151960Z ##[debug]extracting C:\azagent\A1\_work\r1\a\_myapp\drop\publish.zip to C:\azagent\A1\_work\_temp\temp_web_package_19525272265371552
2019-10-22T14:57:19.8152090Z ##[debug]task result: Failed
2019-10-22T14:57:19.8195539Z ##[error]Error: Unsupported file type "undefined"
2019-10-22T14:57:19.8202235Z ##[debug]Processed: ##vso[task.issue type=error;]Error: Unsupported file type "undefined"
2019-10-22T14:57:19.8202842Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error: Unsupported file type "undefined"
2019-10-22T14:57:19.8203745Z ##[section]Finishing: IIS Web App Deploy
我已验证工件的路径确实存在。这是我在网上的配置:
编辑:经过深入研究后,部署任务似乎正在尝试解压缩我的 zip 文件中的 dll。它显示 "undefined" 作为我的 zip 文件的类型,而不是 "File"。这似乎是 decompress-zip 包中的错误?
我使用 CAKE Build Zip 命令压缩我最终发布的输出,结果证明 Azure 使用的 decompress-zip NPM 不喜欢那样。使用 Azure dotnet publish zip 选项压缩后,一切正常。
我正在使用设置为部署代理的 Azure 代理部署到本地 IIS 服务器。
我已启用 System.Debug,这是 'IIS Web App Deploy' 任务的以下日志:
2019-10-22T14:57:19.1268789Z ##[debug]Evaluating condition for step: 'IIS Web App Deploy'
2019-10-22T14:57:19.1269225Z ##[debug]Evaluating: succeeded()
2019-10-22T14:57:19.1269317Z ##[debug]Evaluating succeeded:
2019-10-22T14:57:19.1269453Z ##[debug]=> True
2019-10-22T14:57:19.1269616Z ##[debug]Result: True
2019-10-22T14:57:19.1269753Z ##[section]Starting: IIS Web App Deploy
2019-10-22T14:57:19.1430475Z ==============================================================================
2019-10-22T14:57:19.1430556Z Task : IIS web app deploy
2019-10-22T14:57:19.1430589Z Description : Deploy a website or web application using Web Deploy
2019-10-22T14:57:19.1430620Z Version : 0.156.3
2019-10-22T14:57:19.1430650Z Author : Microsoft Corporation
2019-10-22T14:57:19.1430695Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/iis-web-app-deployment-on-machine-group
2019-10-22T14:57:19.1430728Z ==============================================================================
2019-10-22T14:57:19.8001136Z ##[debug]agent.TempDirectory=C:\azagent\A1\_work\_temp
2019-10-22T14:57:19.8006122Z ##[debug]loading inputs and endpoints
2019-10-22T14:57:19.8033514Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2019-10-22T14:57:19.8133449Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2019-10-22T14:57:19.8142981Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2019-10-22T14:57:19.8143905Z ##[debug]loading INPUT_EXCLUDEFILESFROMAPPDATAFLAG
2019-10-22T14:57:19.8144393Z ##[debug]loading INPUT_JSONFILES
2019-10-22T14:57:19.8144583Z ##[debug]loading INPUT_PACKAGE
2019-10-22T14:57:19.8144756Z ##[debug]loading INPUT_REMOVEADDITIONALFILESFLAG
2019-10-22T14:57:19.8144906Z ##[debug]loading INPUT_SETPARAMETERSFILE
2019-10-22T14:57:19.8145071Z ##[debug]loading INPUT_TAKEAPPOFFLINEFLAG
2019-10-22T14:57:19.8145216Z ##[debug]loading INPUT_VIRTUALAPPLICATION
2019-10-22T14:57:19.8145377Z ##[debug]loading INPUT_WEBSITENAME
2019-10-22T14:57:19.8145524Z ##[debug]loading INPUT_XMLTRANSFORMATION
2019-10-22T14:57:19.8145712Z ##[debug]loading INPUT_XMLVARIABLESUBSTITUTION
2019-10-22T14:57:19.8145857Z ##[debug]loading SECRET_LDAPPASSWORD
2019-10-22T14:57:19.8146015Z ##[debug]loaded 14
2019-10-22T14:57:19.8146158Z ##[debug]Agent.ProxyUrl=undefined
2019-10-22T14:57:19.8146316Z ##[debug]Agent.CAInfo=undefined
2019-10-22T14:57:19.8146703Z ##[debug]Agent.ClientCert=undefined
2019-10-22T14:57:19.8147087Z ##[debug]Agent.SkipCertValidation=undefined
2019-10-22T14:57:19.8147369Z ##[debug]check path : C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_REDACTED[=10=].156.3\task.json
2019-10-22T14:57:19.8147522Z ##[debug]adding resource file: C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_REDACTED[=10=].156.3\task.json
2019-10-22T14:57:19.8147682Z ##[debug]system.culture=en-US
2019-10-22T14:57:19.8147828Z ##[debug]check path : C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_REDACTED[=10=].156.3\node_modules\webdeployment-common-v2\module.json
2019-10-22T14:57:19.8148013Z ##[debug]adding resource file: C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_REDACTED[=10=].156.3\node_modules\webdeployment-common-v2\module.json
2019-10-22T14:57:19.8148277Z ##[debug]system.culture=en-US
2019-10-22T14:57:19.8148420Z ##[debug]WebSiteName=sharedtechdev.wustl.edu
2019-10-22T14:57:19.8148567Z ##[debug]VirtualApplication=bingobongo
2019-10-22T14:57:19.8148699Z ##[debug]Package=C:\azagent\A1\_work\r1\a\_myapp\drop\publish.zip
2019-10-22T14:57:19.8148841Z ##[debug]SetParametersFile=C:\azagent\A1\_work\r1\a
2019-10-22T14:57:19.8148983Z ##[debug]RemoveAdditionalFilesFlag=false
2019-10-22T14:57:19.8149111Z ##[debug]ExcludeFilesFromAppDataFlag=false
2019-10-22T14:57:19.8149252Z ##[debug]TakeAppOfflineFlag=True
2019-10-22T14:57:19.8149380Z ##[debug]AdditionalArguments=null
2019-10-22T14:57:19.8149521Z ##[debug]XmlTransformation=false
2019-10-22T14:57:19.8151189Z ##[debug]JSONFiles=**/appsettings.json
2019-10-22T14:57:19.8151377Z ##[debug]XmlVariableSubstitution=false
2019-10-22T14:57:19.8151513Z ##[debug]Finding files matching input: C:\azagent\A1\_work\r1\a\_myapp\drop\publish.zip
2019-10-22T14:57:19.8151659Z ##[debug]Agent.TempDirectory=C:\azagent\A1\_work\_temp
2019-10-22T14:57:19.8151810Z ##[debug]Agent.TempDirectory=C:\azagent\A1\_work\_temp
2019-10-22T14:57:19.8151960Z ##[debug]extracting C:\azagent\A1\_work\r1\a\_myapp\drop\publish.zip to C:\azagent\A1\_work\_temp\temp_web_package_19525272265371552
2019-10-22T14:57:19.8152090Z ##[debug]task result: Failed
2019-10-22T14:57:19.8195539Z ##[error]Error: Unsupported file type "undefined"
2019-10-22T14:57:19.8202235Z ##[debug]Processed: ##vso[task.issue type=error;]Error: Unsupported file type "undefined"
2019-10-22T14:57:19.8202842Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error: Unsupported file type "undefined"
2019-10-22T14:57:19.8203745Z ##[section]Finishing: IIS Web App Deploy
我已验证工件的路径确实存在。这是我在网上的配置:
编辑:经过深入研究后,部署任务似乎正在尝试解压缩我的 zip 文件中的 dll。它显示 "undefined" 作为我的 zip 文件的类型,而不是 "File"。这似乎是 decompress-zip 包中的错误?
我使用 CAKE Build Zip 命令压缩我最终发布的输出,结果证明 Azure 使用的 decompress-zip NPM 不喜欢那样。使用 Azure dotnet publish zip 选项压缩后,一切正常。