Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions lib/travis/yml/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,34 @@
module Travis
module Yml
class Config < Travis::Config
class << self
def auth_keys
ENV['TRAVIS_AUTH_KEYS'].split(',') || ['abc123']
end

def auth_internal
ENV['TRAVIS_AUTH_INTERNAL'] || 'token'
end

def travis_token
ENV['TRAVIS_TOKEN'] || 'token'
end

def vcs_token
ENV['TRAVIS_VCS_TOKEN'] || 'token'
end
end

define enterprise: false,
auth_keys: ['abc123'],
auth: { internal: 'token' },
auth_keys: auth_keys,
auth: { internal: auth_internal },
oauth2: {},
github: { url: 'https://api.github.com', ssl: {} },
travis: { url: 'https://api.travis-ci.com', app: 'yml', token: 'token', ssl: {} },
travis: { url: 'https://api.travis-ci.com', app: 'yml', token: travis_token, ssl: {} },
metrics: { reporter: 'librato' },
imports: { max: 25 },
ssl: {},
vcs: { url: 'https://vcs.travis-ci.com', token: 'token' },
vcs: { url: 'https://vcs.travis-ci.com', token: vcs_token },
log_level: ENV.fetch("LOG_LEVEL", Logger::WARN)

def metrics
Expand Down