Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/travis-ci/travis-config
How does one configure :dancer:
https://github.com/travis-ci/travis-config
configuration heroku yaml
Last synced: about 2 months ago
JSON representation
How does one configure :dancer:
- Host: GitHub
- URL: https://github.com/travis-ci/travis-config
- Owner: travis-ci
- License: mit
- Created: 2014-10-18T19:22:34.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-02-27T12:35:53.000Z (10 months ago)
- Last Synced: 2024-11-02T03:18:06.289Z (about 2 months ago)
- Topics: configuration, heroku, yaml
- Language: Ruby
- Homepage:
- Size: 107 KB
- Stars: 6
- Watchers: 20
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Travis Config
Shared way of loading and reading configuration in Travis CI.
Internal documentation for Travis CI Builders on how configs are loaded for Travis apps can be found [here](https://github.com/travis-pro/team-teal/wiki/How-config-files-are-handled). (not publicly accessible)
Users can either set defaults and include logic directly to the class
`Travis::Config` or extend the class to, e.g. `Travis::Logs::Config`.E.g.
```ruby
require 'travis/config'module Travis
class Config < Hashr
define host: 'travis-ci.org'def foo
:foo
end
end
end
```Or:
```ruby
require 'travis/config'module Travis::Logs
class Config < Travis::Config
define host: 'logs.travis-ci.org'def foo
:foo
end
end
end
```### Config sources
Serveral config sources are supported:
* Files: All files `config/travis.yml` and `config/travis/*.yml` are read and
merged (alpabetically sorted).
* Env: `ENV['travis_config']` is parsed as YAML and merged, if present.
* Heroku: The env vars `DATABASE_URL` or `SHARED_DATABASE_URL`, and `DB_POOL`
or `DATABASE_POOL_SIZE`, `REDIS_URL`, and `REDIS_POOL_SIZE` are merged into
the database config.
* Docker: The env vars `POSTGRESQL_PORT`, `RABBITMQ_PORT`, and `REDIS_PORT` are
interpreted as resource URLs, and merged into the database config.Configuration from all sources is merged before it is passed to the `Hashr`
instance. All merging is deep merging of Hashes on any level.### Doing a Rubygem release
Any tool works. The current releases were done with
[`gem-release`](https://github.com/svenfuchs/gem-release) which allows creating
a Git tag, pushing it to GitHub, building the gem and pushing it to Rubygems in
one go:```bash
$ gem install gem-release
$ gem bump --push --tag --release
```