{"id":13828750,"url":"https://github.com/travis-ci/travis-build","last_synced_at":"2025-04-08T02:42:25.816Z","repository":{"id":37768340,"uuid":"2508083","full_name":"travis-ci/travis-build","owner":"travis-ci","description":".travis.yml =\u003e build.sh converter","archived":false,"fork":false,"pushed_at":"2024-05-22T11:34:58.000Z","size":8418,"stargazers_count":655,"open_issues_count":83,"forks_count":436,"subscribers_count":47,"default_branch":"master","last_synced_at":"2024-05-22T12:19:21.966Z","etag":null,"topics":["ruby","travis-ci"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"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":"LICENSE","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-10-03T21:46:00.000Z","updated_at":"2024-05-27T13:41:14.038Z","dependencies_parsed_at":"2024-01-13T10:43:08.869Z","dependency_job_id":"782684a6-ba81-4fd3-91a7-1521163d8d49","html_url":"https://github.com/travis-ci/travis-build","commit_stats":{"total_commits":4829,"total_committers":296,"mean_commits":16.31418918918919,"dds":0.7111203147649616,"last_synced_commit":"b166cc25bf37a6fe45ddc922d06eb1bf3522467a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Ftravis-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Ftravis-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Ftravis-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Ftravis-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travis-ci","download_url":"https://codeload.github.com/travis-ci/travis-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767232,"owners_count":20992538,"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":["ruby","travis-ci"],"created_at":"2024-08-04T09:03:06.503Z","updated_at":"2025-04-08T02:42:25.790Z","avatar_url":"https://github.com/travis-ci.png","language":"Ruby","funding_links":[],"categories":["Ruby","Continuous Integration"],"sub_categories":[],"readme":"# Travis Build [![Build Status](https://travis-ci.com/travis-ci/travis-build.svg?branch=master)](https://travis-ci.com/travis-ci/travis-build)\n\nTravis Build exposes an API that [Travis\nWorkers](https://github.com/travis-ci/worker) and [Job\nBoard](https://github.com/travis-ci/job-board) use to generate a bash script\nwhich is then copied to the job execution environment and executed, with the\nresulting output streamed back to Travis.\n\nThis code base has gone through several iterations of development, and was\noriginally extracted from [the legacy Travis\nWorker](https://github.com/travis-ci/travis-worker), before taking its current\nform.\n\n## Running test suites\n\nRun\n\n``` bash\nbundle exec rake spec\n```\n\n\u003ca name=\"addon\"\u003e\u003c/a\u003e\n## Use as addon for Travis CLI\n\nYou can set travis-build up as a plugin for the [command line\nclient](https://github.com/travis-ci/travis.rb):\n\n```bash\ngit clone https://github.com/travis-ci/travis-build\ncd travis-build\nmkdir -p ~/.travis\nln -s $PWD ~/.travis/travis-build\ngem install bundler\nbundle install --gemfile ~/.travis/travis-build/Gemfile\nbundler binstubs travis\n```\n\nYou will now be able to run `travis compile`, which produces the bash script\nthat runs the specified job, except that the secure environment variables are\nnot defined, and that the build matrix expansion is not considered, e.g:\n\n``` bash\n~/.travis/travis-build/bin/travis compile\n```\n\n### _Important_\n\nThe bash script generated by the compile command contains commands that make changes \nto the system on which it is executed (e.g., edit `/etc/resolv.conf`, install software).\nSome require `sudo` privileges and they are not easily undone.\n\nIt is highly recommended that you run this in a container or other virtualized\nenvironment.\n\n### Invocation\n\nThe command can be invoked in 3 ways:\n\nWithout an argument, it produces and prints a bash script from the actions in\nthe local `.travis.yml` without considering `env` and `matrix` values\n(`travis-build` is unable to expand these keys correctly).\n\n``` bash\n~/.travis/travis-build/bin/travis compile\n```\n\nWith a single integer, it produces the script for the given build (or the first\njob of that build matrix).\n\n``` bash\n~/.travis/travis-build/bin/travis compile 8\n```\n\nWith an argument of the form `M.N`, it produces the bash script for the job\n`M.N`.\n\n``` bash\n~/.travis/travis-build/bin/travis compile 351.2\n```\n\nThe generated script can be used in a container or virtualized environment that\nclosely mimics Travis CI's build environment to aid you in debugging the build\nfailures.  Instructions for running such a container are available\n[in the Travis CI docs](https://docs.travis-ci.com/user/common-build-problems/#running-a-container-based-docker-image-locally).\n\n## Raw CLI script\n\nIn addition to the travis CLI plugin you can also run the standalone CLI script:\n\n``` bash\nbundle exec script/compile \u003c payload.json \u003e build.sh\n```\n\n## Docker container\n\nIf you want to run travis-build locally on your machine (e.g. to interact with\n[worker](https://github.com/travis-ci/worker)), you can also run it as a docker\ncontainer with docker-compose:\n\nFirst, build the image:\n\n``` bash\ndocker-compose build web\n```\n\nSecond, run the image:\n\n```bash\ndocker-compose run web\n```\n\nYou may wish to run with a different setup for local development.\nThe following shows running `travis-build` in the `development`\nenvironment, forwarding the Docker image's port 4000 to the host's\nport 4000:\n\n```bash\ndocker-compose run -e RACK_ENV=development -p 4000:4000 web\n```\n\nto build and run it. This will create a container with the contents of the `travis-build`\nrepository in the `/usr/src/app` directory, and start you off in that directory.\nFrom there, you can run the commands listed in the [Use as addon for Travis CLI](#addon)\nsection to make the compile command available to Travis CLI within the container.\n\n## License \u0026 copyright information\n\nSee [LICENSE](./LICENSE) file.\n\nCopyright (c) 2011-2016 [Travis CI development\nteam](https://github.com/travis-ci).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-ci%2Ftravis-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravis-ci%2Ftravis-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-ci%2Ftravis-build/lists"}