{"id":13542668,"url":"https://github.com/travis-ci/travis-hub","last_synced_at":"2025-04-05T07:05:40.077Z","repository":{"id":1813715,"uuid":"2737881","full_name":"travis-ci/travis-hub","owner":"travis-ci","description":"Job State Central Command","archived":false,"fork":false,"pushed_at":"2025-01-21T10:59:43.000Z","size":4264,"stargazers_count":66,"open_issues_count":13,"forks_count":48,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-03-29T06:06:51.516Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://travis-ci.org","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"klazuka/Kal","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/travis-ci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"MIT-LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-11-08T22:51:49.000Z","updated_at":"2025-01-21T10:52:08.000Z","dependencies_parsed_at":"2024-01-03T14:03:34.262Z","dependency_job_id":"f1140a45-4985-4211-a199-5eb044fad02d","html_url":"https://github.com/travis-ci/travis-hub","commit_stats":{"total_commits":1736,"total_committers":52,"mean_commits":33.38461538461539,"dds":0.7373271889400922,"last_synced_commit":"ef6a51122dbc4e422bd1dcc2475daebadb45c10c"},"previous_names":[],"tags_count":261,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Ftravis-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Ftravis-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Ftravis-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Ftravis-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travis-ci","download_url":"https://codeload.github.com/travis-ci/travis-hub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299832,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T10:01:14.330Z","updated_at":"2025-04-05T07:05:40.057Z","avatar_url":"https://github.com/travis-ci.png","language":"Ruby","funding_links":[],"categories":["others","Ruby"],"sub_categories":[],"readme":"# Travis Hub [![Build Status](https://travis-ci.org/travis-ci/travis-hub.svg?branch=master)](https://travis-ci.org/travis-ci/travis-hub)\n\n*Keeper of the statuses*\n\nTravis Hub is the application that, in the life-cycle of accepting,\nevaluating, and executing a build request, sits in the fifth position,\nnext to [Travis Logs](http://github.com/travis-ci/travis-logs).\n\nIn short Hub deals with updates to the job and build status coming in from\nthe workers, while Logs deals with collecting build log output from them.\n\nOnce a build request has been:\n\n* accepted by [Listener](https://github.com/travis-ci/travis-listener),\n* approved and configured by [Gatekeeper](https://github.com/travis-ci/travis-gatekeeper),\n* and its jobs have been scheduled by [Scheduler](https://github.com/travis-ci/travis-scheduler),\n\nthey will be picked by a [Worker](https://github.com/travis-ci/worker)\nwhich will execute the build Bash script as generated by the\n[build script compiler](http://github.com/travis-ci/travis-build)).\n\nThe worker goes through a series of stages while acquiring and preparing a VM,\nand running the build script. Each time the state of the job changes the worker\nwill send a message that will be processed by Hub. These messages are:\n\n* `job:receive` signals that the worker has picked up a job and is going\n  to boot a VM for it. (This state is displayed as \"booting\" in the UI.)\n* `job:start` signals that the worker has started executing the build script.\n* `job:finish` signals that the worker has finished executing the build script.\n* `job:restart` occurs when the worker has troubles booting a VM, or looses\n  connection to it while running the build script. (In this case the job's\n  state will be reset to `:created` so that Scheduler will queue it again,\n  and Worker will try again.\n\nProcessing these messages Hub will change the job's `state` in the database,\nset attributes such as `received_at`, potentially change the respective build's\nstate as well. It will then emit events such as `job:started` or\n`build:finished` which will send out notifications to other parties (such as\nthe web UI via Pusher, GitHub commit status or check run updates, email, \nIRC, webhook notifications etc).\n\n## Setup \n\nFirst, run `bundle install` to retrieve dependencies from rubygems. Once key dependency, Sidekiq Pro required additional username/password config:\n\n```bash\nBUNDLE_GEMS__CONTRIBSYS__COM=username:password\nbundle config https://gems.contribsys.com/ $BUNDLE_GEMS__CONTRIBSYS__COM \n```\n\nThen, you'll need to install:\n * postgresql\n * rabbitmq\n * redis \n\n### Database Config\n\nOnce postgresql is installed, you'll need to setup a local test database: \n```bash\ncreatedb travis_test\ncurl -fs https://raw.githubusercontent.com/travis-ci/travis-migrations/master/db/main/structure.sql | psql travis_test\n```\nMake sure you can use `postgresql` as the database adapter, i.e. if you're \nusing homebrew, your `postgresql@x.y` should be `brew link`ed to `postgresql`. \n\n### Testing\n\nOnce everything is [setup](#setup), start the following services:\n* postgresql\n* rabbitmq \n* redis\n\nrun tests with: \n```bash\nbundle exec rspec\n```\n\n## History\n\nTravis Hub was the first service that we extracted from our Rails application\napart from Travis Listener. It was huge, and did all the things that now\nare being split up into 6 applications (Gatekeeper, Scheduler, Hub, Logs,\nSync, Tasks). Nowadays it is one of the smallest service that deals with\nour core models directly.\n\n## Contributing\n\nWe appreciate suggestions and contributions! See the [CONTRIBUTING.md](/CONTRIBUTING.md) file for information on how to contribute to travis-hub. To chat about improvements, check out our community forum [travis-ci.community](https://travis-ci.community/) and [central issue tracker, travis-ci/travis-ci](https://github.com/travis-ci/travis-ci/issues). \n\n## License \u0026 copyright\n\nSee [MIT-LICENSE](MIT-LICENSE.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-ci%2Ftravis-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravis-ci%2Ftravis-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-ci%2Ftravis-hub/lists"}