如何配置 Shippable 以从单个存储库构建所有项目?
How to configure Shippable to build all projects from single repository?
我有一个包含 3 个项目的 bitbucket 存储库。
我的仓库
app1(ruby-on-rails)
app2(node.js)
app3(node.js)
现在我正在尝试使用此存储库配置 Shippable (https://app.shippable.com/) 以构建所有这 3 个项目和 运行 对它们的所有测试。
我知道我应该在我的存储库的根目录中配置 shippable.yml 文件,到目前为止,我幸运地达到了我所拥有的,你可以在这里看到...
language: ruby
rvm:
- 2.2.2
env:
- CI_REPORTS=shippable/testresults COVERAGE_REPORTS=shippable/codecoverage
before_script:
- cd app1 && mkdir -p shippable/testresults
- bundle install
- mvn build
script:
- rake db:setup
- cd ../app2 && mvn build
- cd ../app3 && mvn build
我的问题是如何以正确的方式做到这一点?
到目前为止,我尝试过做这样的事情,但运气不好。
现在使用这个脚本我遇到了这个错误。
mvn build
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.146 s
[INFO] Finished at: 2015-11-21T22:32:28+00:00
[INFO] Final Memory: 14M/965M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/home/shippable/workspace/src/bitbucket.org/etibartartu/approot/app1). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
我想知道是否有人可以建议如何编写 .yml 文件以使其工作。
在Shippable中构建app的正常流程是这样的。
Clone/Pull the project from Github. This depends on whether the minion is in pristine state or not
cd into the workspace
Checkout the commit that is getting built
Run the before_install section. This is typically used to prep your minion and update any packages
Run install section to install any project specific libraries or packages
Run before_script section to create any folders and unzip files that might be needed for testing. Some users also restore DBs etc. here
Run the script command which runs build and all your tests
Run either after_success or after_failure commands
Run after_script commands
不知道以后有没有人需要。但是我找到了解决方案...
- cd app1 && mkdir -p shippable/testresults
- bundle install
- rake db:setup
- rails s -p 8081 -b 0.0.0.0 &
我基本上忘记了在 运行 服务器的末尾添加符号 (&),所以它 运行 不在后台并且 VM 卡住了。
我有一个包含 3 个项目的 bitbucket 存储库。
我的仓库 app1(ruby-on-rails) app2(node.js) app3(node.js)
现在我正在尝试使用此存储库配置 Shippable (https://app.shippable.com/) 以构建所有这 3 个项目和 运行 对它们的所有测试。
我知道我应该在我的存储库的根目录中配置 shippable.yml 文件,到目前为止,我幸运地达到了我所拥有的,你可以在这里看到...
language: ruby
rvm:
- 2.2.2
env:
- CI_REPORTS=shippable/testresults COVERAGE_REPORTS=shippable/codecoverage
before_script:
- cd app1 && mkdir -p shippable/testresults
- bundle install
- mvn build
script:
- rake db:setup
- cd ../app2 && mvn build
- cd ../app3 && mvn build
我的问题是如何以正确的方式做到这一点?
到目前为止,我尝试过做这样的事情,但运气不好。
现在使用这个脚本我遇到了这个错误。
mvn build
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.146 s
[INFO] Finished at: 2015-11-21T22:32:28+00:00
[INFO] Final Memory: 14M/965M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/home/shippable/workspace/src/bitbucket.org/etibartartu/approot/app1). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
我想知道是否有人可以建议如何编写 .yml 文件以使其工作。
在Shippable中构建app的正常流程是这样的。
Clone/Pull the project from Github. This depends on whether the minion is in pristine state or not
cd into the workspace
Checkout the commit that is getting built
Run the before_install section. This is typically used to prep your minion and update any packages
Run install section to install any project specific libraries or packages
Run before_script section to create any folders and unzip files that might be needed for testing. Some users also restore DBs etc. here
Run the script command which runs build and all your tests
Run either after_success or after_failure commands
Run after_script commands
不知道以后有没有人需要。但是我找到了解决方案...
- cd app1 && mkdir -p shippable/testresults
- bundle install
- rake db:setup
- rails s -p 8081 -b 0.0.0.0 &
我基本上忘记了在 运行 服务器的末尾添加符号 (&),所以它 运行 不在后台并且 VM 卡住了。