我正在尝试使用http://docs.travis-ci.com/user/uploading-artifacts/中的文档让Travis在构建结束时上传工件。我的.travis.yml文件的内容如下:
sudo: false
branches:
only:
- master
language: node_js
python:
- '2.7'
node_js:
- '0.10'
addons:
artifacts: true
env:
global:
- secure: "encrypted string"
- secure: "encrypted string"
- ARTIFACTS_DEBUG=1
- ARTIFACTS_BUCKET=fireplacetests
- API=dev
before_script:
- make install
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- bash tests/serve.sh
- make install-webqa
script:
- make uitest-webqa
构建完成后,我会看到以下消息:
Uploading Artifacts (BETA)
$ travis_artifacts_install
artifacts version v0.7.8-9-g0908379 revision=09083791933418ce154332d7ef83bdee4330adb8
$ export ARTIFACTS_PATHS="$(git ls-files -o | tr \"\\n\" \":\")"
/home/travis/build.sh: line 73: /bin/uname: Argument list too long
/home/travis/build.sh: line 81: /bin/date: Argument list too long
$ artifacts upload
/home/travis/build.sh: line 41: /home/travis/bin/artifacts: Argument list too long
/home/travis/build.sh: line 73: /bin/uname: Argument list too long
/home/travis/build.sh: line 81: /bin/date: Argument list too long
/home/travis/build.sh: line 65: -: syntax error: operand expected (error token is "-")
Done uploading artifacts
我在构建过程中尝试查看/home/travis/build.sh
的内容,但无法将其与上述错误相关联。
任何人都可以建议问题可能是什么,和/或是否有人将此Travis神器上传内容起作用?
答案 0 :(得分:2)
事实证明路径存在问题。文档建议您不需要指定任何特定路径,但我发现如果我添加了显式路径,那么上传至少会尝试工作。例如,
addons:
artifacts:
paths:
- my_path
允许上传继续。