Travis CI run scripts in parallel

一曲冷凌霜 提交于 2019-12-10 23:06:38

问题


My Travis YML runs 3 scripts that are not dependent on each other.

I'd like to run them in parallel to increase speed.

Following this article: https://docs.travis-ci.com/user/speeding-up-the-build/

I modified my _travis.yml as such:

language: ruby
cache: bundler
env:
  - BUILD=buildPDF.sh
  - BUILD=buildPages.sh
  - BUILD=buildHosting.sh
script: "./$BUILD"

When Travis runs I get the error The command "./$BUILD" exited with 126.

Things I've tried so far:

  • script: "./${BUILD}"
  • Remove the spaces in the list (-BUILD=...)

回答1:


You need to put name of your scripts in quotes and then put $BUILD variable into curly braces as @набиячлэвэли suggested. Following worked for me:

env:
- TEST_SUITE="travis-job-codecov-linter.sh"
- TEST_SUITE="travis-job-cypress-boxes.sh"
- TEST_SUITE="travis-job-cypress-products.sh"
- TEST_SUITE="travis-job-cypress-signup.sh"
- TEST_SUITE="travis-job-cypress-controls.sh"
- TEST_SUITE="travis-job-build.sh"
script: ./${TEST_SUITE}


来源:https://stackoverflow.com/questions/34117441/travis-ci-run-scripts-in-parallel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!