通过Azure管道发布android应用

时间:2020-09-09 04:29:30

标签: android azure-devops azure-pipelines

我在Azure DevOps上创建发布管道,然后尝试在Google Play中发布Android应用程序。

现在我使用Google Play extension,并且在启动该过程时发生错误

npm start

我的VSTS代理安装在代理服务器后面的Windows服务器上。在代理服务器上,有一个白名单,其Google地址为{ "name": "amazon-clone", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.5.0", "@testing-library/user-event": "^7.2.1", "react": "^16.13.1", "react-dom": "^16.13.1", "react-scripts": "3.4.3" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": "react-app" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }

代理配置

2020-09-09T03:43:27.0917248Z ##[section]Запускается: Release app.apk
2020-09-09T03:43:27.8780592Z ==============================================================================
2020-09-09T03:43:27.8781175Z Task         : Google Play - Release Bundle
2020-09-09T03:43:27.8781808Z Description  : Release an app bundle to the Google Play Store
2020-09-09T03:43:27.8782024Z Version      : 3.174.0
2020-09-09T03:43:27.8782441Z Author       : Microsoft Corporation
2020-09-09T03:43:27.8782859Z Help         : 
2020-09-09T03:43:27.8783075Z ==============================================================================
2020-09-09T03:43:35.1490887Z Found main bundle to upload: .../app.apk (version code %s)
2020-09-09T03:43:35.1776730Z (node:7588) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-09-09T03:43:56.1999306Z ##[error]FetchError: request to https://www.googleapis.com/oauth2/v4/token failed, reason: connect ETIMEDOUT 108.177.14.95:443
2020-09-09T03:43:56.2066653Z ##[section]Завершается: Release app.apk

YAML配置从管道发布的步骤

*.googleapis.com

我认为此扩展不适用于代理。

如何解决此错误?

1 个答案:

答案 0 :(得分:0)

要解决卸载问题,我们必须创建其他环境变量

http_proxy=...
https_proxy=...

我的代理用自己的证书替换了证书,因此最初系统不信任我组织的CA,因此决定忽略证书的有效性。 我又创建了一个环境变量

NODE_TLS_REJECT_UNAUTHORIZED=0

并对npm设置进行了调整

npm config set strict-ssl false

之后,可以连接到Google服务器并发布应用程序。