TravisCI部署到失败为“ Aws :: S3 :: Errors :: NotFound”的多个S3存储桶

时间:2018-10-20 10:07:55

标签: amazon-web-services amazon-s3 deployment travis-ci aws-cli

该错误最近出现,我回到了先前的travis.yml版本,并且得到了相同的错误:

Deploying application
uploading "favicon.ico" with {:content_type=>"image/x-icon", :cache_control=>"max-age=21600", :acl=>"public-read"}
uploading "js/jquery.i18n.messagestore.min.js" with {:content_type=>"application/javascript", :cache_control=>"max-age=21600", :acl=>"public-read"}
uploading "js/CLDRPluralRuleParser.min.js" with {:content_type=>"application/javascript", :cache_control=>"max-age=21600", :acl=>"public-read"}
uploading "js/jquery.i18n.language.min.js" with {:content_type=>"application/javascript", :cache_control=>"max-age=21600", :acl=>"public-read"}
uploading "js/jquery.i18n.min.js" with {:content_type=>"application/javascript", :cache_control=>"max-age=21600", :acl=>"public-read"}
/home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call': Aws::S3::Errors::NotFound
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:19:in `call'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/aws-sdk-core/plugins/s3_dualstack.rb:24:in `call'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/aws-sdk-core/plugins/s3_accelerate.rb:34:in `call'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/seahorse/client/plugins/response_target.rb:21:in `call'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/seahorse/client/request.rb:70:in `send_request'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-core-2.11.144/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-resources-2.11.144/lib/aws-sdk-resources/services/s3/file_uploader.rb:42:in `block in put_object'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-resources-2.11.144/lib/aws-sdk-resources/services/s3/file_uploader.rb:49:in `open_file'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-resources-2.11.144/lib/aws-sdk-resources/services/s3/file_uploader.rb:41:in `put_object'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-resources-2.11.144/lib/aws-sdk-resources/services/s3/file_uploader.rb:34:in `upload'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-resources-2.11.144/lib/aws-sdk-resources/services/s3/object.rb:252:in `upload_file'
    from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-s3-1.10.3/lib/dpl/provider/s3.rb:114:in `block (2 levels) in upload_multithreaded'

这是我的travis.yml

sudo: false
language: node_js
node_js:
  - "node"
install: npm install
script:
  - npm test
  - ...
cache:
  directories:
    - node_modules
# Deploy using awscli to enable pruning of removed files
# pip install --user awscli
deploy:
  provider: s3
  access_key_id: $AWS_ACCESS_KEY_ID
  secret_access_key: $AWS_SECRET_ACCESS_KEY
  bucket: ***
  skip_cleanup: true
  local_dir: build
  acl: public_read
  endpoint: ***
  on:
    branch: master
  region: eu-central-1
  cache_control: "max-age=21600"
after_deploy:
  # Allow `awscli` to make requests to CloudFront.
  - aws configure set preview.cloudfront true
  # Invalidate every object in the targeted distribution.
  - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"

存储桶和端点设置正确,我只是仔细检查了一下。构建日志在这里:https://travis-ci.org/CirclesUBI/circles-website

0 个答案:

没有答案