【发布时间】:2015-02-14 19:38:23
【问题描述】:
我一直在尝试按照各种指南将版本推送到 GitHub,但我遗漏了一些重要信息。
这样的推动需要什么?
这是我的 .travis.yml
language: java
git:
submodules: false
deploy:
provider: releases
api_key:
secure: JjpBYKmA8ByMiNEXLQcR...
file: target/uSkyBlock.jar
release-number: latest
skip_cleanup: true
on:
tags: true
repo: rlf/uSkyBlock
branch: v2.0.0
all_branches: true
cache:
directories:
- $HOME/.m2
即如果我希望 CI 推送 SNAPSHOT 版本,我应该做什么,不应该做什么?
我尝试添加和/或删除 on:tags 子句以及其他各种努力,但无论如何,在尝试部署时我得到以下结果:
/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-3.7.0/lib/octokit/response/raise_error.rb:16:in
on_complete': GET https://api.github.com/repos/rlf/uSkyBlock/releases/latest: 404 - Not Found // See: https://developer.github.com/v3 (Octokit::NotFound) from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/lib/faraday/response.rb:9:inblock in call' 来自/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/lib/faraday/response.rb:57:inon_complete' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/lib/faraday/response.rb:8:incall' 来自/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:inbuild_response' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/lib/faraday/connection.rb:377:inrun_request' 来自/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/lib/faraday/connection.rb:140:inget' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/sawyer-0.6.0/lib/sawyer/agent.rb:94:incall' 来自/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-3.7.0/lib/octokit/client.rb:339:inrequest' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-3.7.0/lib/octokit/client.rb:135:inget' 来自 /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-3.7.0/lib/octokit/client/releases.rb:41:inrelease' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider/releases.rb:105:inblock in push_app' 来自/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider/releases.rb:102:ineach' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider/releases.rb:102:inpush_app' 来自/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider.rb:131:inblock in deploy' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/cli.rb:41:infold' 来自/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider.rb:131:indeploy' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/cli.rb:32:inrun' 来自/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/cli.rb:7:inrun' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/bin/dpl:5:in' 来自/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/dpl:23:inload' from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/dpl:23:in' 部署失败
- (现有标签)https://travis-ci.org/rlf/uSkyBlock/builds/44196529
- (不存在的标签)https://travis-ci.org/rlf/uSkyBlock/builds/44182870
releases 部署模块似乎无法在 GitHub 上找到我的快照。
那么,如果我想让 travis 将一个持续的测试发布部署到 GitHub - 我需要做什么? 我错过了什么?
【问题讨论】:
-
我做了一些更多的挖掘工作,似乎在尝试从 GitHub 获取版本时,releases.rb 失败了。我想知道是否是我添加导致问题的 api 密钥的方式 - 但我宁愿不以明文形式提交我的用户名/密码 - 因为这是一个公共回购。
-
相关问题,直接使用 Curl,无需 travis 部署的东西。 stackoverflow.com/questions/21628642/…stackoverflow.com/questions/25028765/…
标签: git github deployment release travis-ci