mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Setup travis to be able to run CI tests against S3
This commit is contained in:
parent
ba12811db2
commit
a9cb1968b6
5 changed files with 33 additions and 33 deletions
|
@ -40,6 +40,8 @@ script: 'ci/travis.rb'
|
|||
env:
|
||||
global:
|
||||
- "JRUBY_OPTS='--dev -J-Xmx1024M'"
|
||||
- "AWS_ACCESS_KEY_ID=AKIAIDIA2E7SSMYGNB7A"
|
||||
- secure: "XohvFnYff1yf8qlawCujI+CIqHK08KOw34pPprd4QYuG0SJCzBdNN7efBBj5gLX1PI6DwkDLNv51Oi31xPh7yJFuzRAkB0FPdyKM7UyYZ7BMaTqx8LVC89lZJ8VIu19kDP/8sdOm0HN/huOM5kO3jZJFLpi2Tj313TjmzWZFPq0="
|
||||
matrix:
|
||||
- "GEM=railties"
|
||||
- "GEM=ap,ac"
|
||||
|
|
1
activestorage/test/service/.gitignore
vendored
1
activestorage/test/service/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
configurations.yml
|
|
@ -1,31 +0,0 @@
|
|||
# Copy this file to configurations.yml and edit the credentials to match your IAM test account and bucket
|
||||
s3:
|
||||
service: S3
|
||||
access_key_id:
|
||||
secret_access_key:
|
||||
region:
|
||||
bucket:
|
||||
|
||||
gcs:
|
||||
service: GCS
|
||||
keyfile: {
|
||||
type: "service_account",
|
||||
project_id: "",
|
||||
private_key_id: "",
|
||||
private_key: "",
|
||||
client_email: "",
|
||||
client_id: "",
|
||||
auth_uri: "https://accounts.google.com/o/oauth2/auth",
|
||||
token_uri: "https://accounts.google.com/o/oauth2/token",
|
||||
auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs",
|
||||
client_x509_cert_url: ""
|
||||
}
|
||||
project:
|
||||
bucket:
|
||||
|
||||
azure:
|
||||
service: Azure
|
||||
path: ""
|
||||
storage_account_name: ""
|
||||
storage_access_key: ""
|
||||
container: ""
|
30
activestorage/test/service/configurations.yml
Normal file
30
activestorage/test/service/configurations.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
s3:
|
||||
service: S3
|
||||
access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %>
|
||||
secret_access_key: <%= ENV["AWS_SECRET_KEY"] %>
|
||||
region: us-east-2
|
||||
bucket: rails-ci-activestorage
|
||||
|
||||
# gcs:
|
||||
# service: GCS
|
||||
# keyfile: {
|
||||
# type: "service_account",
|
||||
# project_id: "",
|
||||
# private_key_id: "",
|
||||
# private_key: "",
|
||||
# client_email: "",
|
||||
# client_id: "",
|
||||
# auth_uri: "https://accounts.google.com/o/oauth2/auth",
|
||||
# token_uri: "https://accounts.google.com/o/oauth2/token",
|
||||
# auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs",
|
||||
# client_x509_cert_url: ""
|
||||
# }
|
||||
# project:
|
||||
# bucket:
|
||||
#
|
||||
# azure:
|
||||
# service: Azure
|
||||
# path: ""
|
||||
# storage_account_name: ""
|
||||
# storage_access_key: ""
|
||||
# container: ""
|
|
@ -14,7 +14,7 @@ require "active_storage"
|
|||
|
||||
require "yaml"
|
||||
SERVICE_CONFIGURATIONS = begin
|
||||
YAML.load_file(File.expand_path("../service/configurations.yml", __FILE__)).deep_symbolize_keys
|
||||
YAML.load(ERB.new(Pathname.new(File.expand_path("../service/configurations.yml", __FILE__)).read).result).deep_symbolize_keys
|
||||
rescue Errno::ENOENT
|
||||
puts "Missing service configuration file in test/service/configurations.yml"
|
||||
{}
|
||||
|
|
Loading…
Reference in a new issue