出版博览会挂在蔚蓝的管道中

Publishing expo hangs in azure pipelines

正在处理本机反应应用程序并正在尝试设置管道以自动部署到我们的 QA 环境。我想我的一切都设置得相当好并且 npm 命令在本地工作。

我已经设置了一个 azure 管道并且该管道正在运行。看起来我编写的用于登录的命令正在运行,但发布者似乎已挂起。管道在30分钟后自行关闭,本地只需要一分钟左右。

因此构建开始...加载、npm、登录报告成功然后挂起。有什么建议吗?

Package.json 命令

"scripts": {
  "start": "expo start",
  "android": "expo start --android",
  "ios": "expo start --ios",
  "eject": "expo eject",
  "test:watch": "node ./node_modules/jest/bin/jest.js --watchAll --detectOpenHandles",
  "test": "node ./node_modules/jest/bin/jest.js --forceExit --detectOpenHandles",
  "loginToExpo": "expo login -u [id] -p [pwd]--non-interactive",
  "publishToExpo": "expo publish --non-interactive"
 },

相关天蓝色-pipelines.yml

pool:
vmImage: 'Ubuntu 16.04'

steps:
- task: NodeTool@0
 inputs:
   versionSpec: '8.x'
 displayName: 'Install Node.js'

- script: |
  npm install
  # npm test
  npm run loginToExpo
  npm run publishToExpo
displayName: 'npm install and build'

找到这个讨论:https://forums.expo.io/t/exp-cli-exp-login-hangs-in-bitbucket-pipelines/11676/14

将构建升级到节点 10.x 并且成功了。

新天青-pipelines.yml(大致)

# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

pool:
  vmImage: 'Ubuntu 16.04'

steps:
  - task: NodeTool@0
  inputs:
    versionSpec: '10.x'
  displayName: 'Install Node.js'

- script: |
    npm install
    npm test
    npm run publish
  displayName: 'npm install and build'