{"id":18657830,"url":"https://github.com/lightsofapollo/gaia-taskcluster","last_synced_at":"2025-04-11T18:31:44.890Z","repository":{"id":14451835,"uuid":"17163500","full_name":"lightsofapollo/gaia-taskcluster","owner":"lightsofapollo","description":"Github/Gaia taskrunner prototype","archived":false,"fork":false,"pushed_at":"2015-03-24T16:09:29.000Z","size":10492,"stargazers_count":1,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T17:14:34.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightsofapollo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-25T06:19:34.000Z","updated_at":"2015-01-20T18:15:22.000Z","dependencies_parsed_at":"2022-09-16T19:01:03.662Z","dependency_job_id":null,"html_url":"https://github.com/lightsofapollo/gaia-taskcluster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fgaia-taskcluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fgaia-taskcluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fgaia-taskcluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fgaia-taskcluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightsofapollo","download_url":"https://codeload.github.com/lightsofapollo/gaia-taskcluster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248458537,"owners_count":21107099,"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-11-07T07:29:58.652Z","updated_at":"2025-04-11T18:31:44.300Z","avatar_url":"https://github.com/lightsofapollo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gaia-taskcluster\n\n## Environment variables added to tasks\n\nA number of environment variables are added to each task to enable\ndifferent workflows for both pull requests and other branches.\n\nThese do _not_ override values set in the tasks if set.\n\nThese are inspired by [travis-ci](http://docs.travis-ci.com/user/ci-environment/#Environment-variables)\n\n  - `CI=true`: always true\n\n  - `GH_BRANCH`: branch this task was triggered for \n     (this is the base/target branch in a pull request not the head)\n\n  - `GH_COMMIT`: commit this task was triggered for\n     (this is the most recent commit in the head in a pull request)   \n\n  - `GH_PULL_REQUEST`: `true` when triggered by a pull request\n\n  - `GH_PULL_REQUEST_NUMBER`: the number of the given pull request \n     (not set if this task was not triggered by a pull request)\n\n  - `GH_REPO_SLUG`: username/repo of the target repository\n\n## Project configuration\n\nTreeherder has a per-project authentication strategy... In order to keep\ntrack of which repos we can accept requests for and what credentials to\nuse to update treeherder of the status we have a configuration file\nwhich lives on S3 which keeps track of this.\n\nHere is what the configuration file looks like:\n\n```js\n[\n  {\n    // treeherder project name\n    name: 'gaia',\n\n    // treeherder authentication (you must get this from the treeherder\n    // team).\n    consumerKey: '...',\n    consumerSecret: '...'\n\n    // github repository name\n    repo: 'gaia',\n\n    // github owner \n    user: 'mozilla-b2g'\n  }\n]\n```\n\n## Configuring Github\n\nTo link a project to treeherder from github some hooks are required:\n\n  - A `Pull Request` hook to the /github/pull_request url\n\nTODO: Add auto configuration script from repo (or via a UI)\n\n## Env configuration\n    - `GAIA_TASKCLUSTER_QUEUE`: queue name to create and bind to.\n\n    - `TASKCLUSTER_ROUTING_KEY`: routing key to use when posting tasks\n      and binding to task queues.\n\n    - `TASKCLUSTER_PROVISIONER_ID`: Default provisioner id if none is\n      specified in the task.\n\n    - `TASKCLUSTER_WORKER_TYPE`: Default worker type if none is\n      specified in the task.\n\n    - `GITHUB_OAUTH_TOKEN` : github oauth token to use when making\n      github api calls (currently optional)\n\n    - `TREEHEDER_PROJECT_CONFIG_URI` : where the treeherder project\n      configuration file lives... This can be a local path (defaults to\n      ./project.json) or a path on s3 (s3://bucket/key/in/bucket.json)\n\n    - `AWS_SECRET_ACCESS_KEY` : Only needed if\n       TREEHEDER_PROJECT_CONFIG_URI is set to a s3 url\n\n    - `AWS_ACCESS_KEY_ID` : Only needed if TREEHEDER_PROJECT_CONFIG_URI\n       is set to an s3 url.\n\n## Deployment\n\nEvery commit in master will be pushed to heroku if master is in a green\nstate (continuous deployment via travis-ci). Current staging url is: http://gaia-taskcluster.herokuapp.com/\n\n## Development\n\nAll dependencies are packaged in the node_modules folder but you may\nneed to run `npm rebuild` if you encounter errors with the ngrok\nmodule (it downloads platform specific code).\n\n### Tests\n\nCommands:\n  \n  - All tests: `npm run-script test-all`\n  - Unit tests: (these don't require credentials): `npm run-script\n  test-unit`\n  - Integration tests: (these require credentials): `npm run-script\n    test-integration`\n\nSome tests (particularly those under resources) are written to hit real\nservers without mocking or any kind of other abstraction and are\nintended to be completely end-to-end (hooks, pull requests, everything).\nThis means there are some extra steps required to setup the tests.\n\n  1. copy projects.json.tpl to projects.json.tpl (or set TREEHEDER_PROJECT_CONFIG_URI) and fill in the credentials.\n\n  2. Set GH_TESTING_TOKEN to a real github token for a real \"bot\" user.\n\n  3. Some tests require the bot user to actually have credentials to the\n     [example graph](https://github.com/taskcluster/github-graph-example) repository. This is the \"bots\" team. You can ping :lightsofapollo (or any other owner) for help with this if you need to run these tests locally.\n\nNOTE: If your running treeherder locally you can also set the `TREEHERDER_URL` environment variable to override the location of treeherder.\n\nTODO: Ideally to setup the integration testing environment we could\nbuild a docker container which could be reused (and saved) locally\nwithout the need to remember custom environment variables.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fgaia-taskcluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightsofapollo%2Fgaia-taskcluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fgaia-taskcluster/lists"}