【问题标题】:How to build with travis-ci, with no actual code build? (deploy static code to s3)如何在没有实际代码构建的情况下使用 travis-ci 构建? (将静态代码部署到 s3)
【发布时间】:2017-08-28 01:09:05
【问题描述】:

我正在使用here 提供的说明尝试将静态代码从 github 推送部署到 s3 存储桶。问题出在构建上,我收到以下错误:

No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/home/travis/.rvm/gems/ruby-2.4.1@global/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/travis/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
The command "rake" exited with 1.

似乎因为我没有默认使用 ruby​​ 的语言集,它正在尝试使用 makefile 构建。事情是:我没有任何代码要构建。我不需要用任何语言做任何事情。只需将代码上传到 S3。那么有没有办法不运行实际构建并进行这项工作?

我的 .travis.yml 看起来像:

deploy:
  provider: s3
  access_key_id: myaccesskey
  secret_access_key:
    secure: myverylongsecurysecretkey
  bucket: searchlist.org
  acl: public_read
  on:
    repo: myuser/myrepo

【问题讨论】:

    标签: amazon-s3 travis-ci


    【解决方案1】:

    出于历史原因,Travis CI 假定您的构建是 Ruby 应用程序/lib。如果你的 repo 需要其他东西,你需要覆盖这些默认值。

    要么

    language: generic # no-frills build
    ⋮
    

    # Ruby, but override default steps
    install: skip
    script: skip
    ⋮
    

    【讨论】:

      猜你喜欢
      • 2015-03-15
      • 2022-12-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多