【问题标题】:Unable to upload artifacts from a Travis build无法从 Travis 构建上传工件
【发布时间】:2015-10-10 03:18:55
【问题描述】:

我正在尝试让 Travis 在我的构建结束时使用 http://docs.travis-ci.com/user/uploading-artifacts/ 中的文档上传工件。我的 .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 工件上传工作正常?

【问题讨论】:

    标签: travis-ci


    【解决方案1】:

    原来路径有问题。文档建议您不需要指定任何特定路径,但我发现如果我添加了显式路径,那么上传至少会尝试工作。例如,

    addons:
      artifacts:
        paths:
        - my_path
    

    允许继续上传。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-23
      • 2017-05-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-05
      相关资源
      最近更新 更多