{"id":19140089,"url":"https://github.com/circleci/circle-env","last_synced_at":"2025-04-19T10:32:26.844Z","repository":{"id":66004238,"uuid":"57309919","full_name":"circleci/circle-env","owner":"circleci","description":null,"archived":true,"fork":false,"pushed_at":"2024-02-16T20:29:16.000Z","size":28,"stargazers_count":12,"open_issues_count":2,"forks_count":10,"subscribers_count":45,"default_branch":"master","last_synced_at":"2025-03-12T02:38:33.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/circleci.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-04-28T14:52:40.000Z","updated_at":"2024-10-12T01:58:29.000Z","dependencies_parsed_at":"2024-02-06T16:27:32.902Z","dependency_job_id":null,"html_url":"https://github.com/circleci/circle-env","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/circleci%2Fcircle-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circleci%2Fcircle-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circleci%2Fcircle-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circleci%2Fcircle-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circleci","download_url":"https://codeload.github.com/circleci/circle-env/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249675722,"owners_count":21309339,"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-09T07:16:13.148Z","updated_at":"2025-04-19T10:32:26.479Z","avatar_url":"https://github.com/circleci.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# circle-env\n\n[![Circle CI](https://circleci.com/gh/circleci/circle-env.svg?style=svg)](https://circleci.com/gh/circleci/circle-env)\n\n## What is this?\n\n`circle-env` is a collection of bash scripts that abstracts the way custom software to be installed on CircleCI container. It provides a simple interface: `circle-env install` and it will take care of trivial things such as OS version, where to get the package from, etc.\n\n## Project Status\n\nThis project is still under heavy development and not officially supported by CircleCI. Please create a Github issue if you find bugs.\n\n## Install\n\nAdd the following lines to your circle.yml\n\n```\nmachine:\n  pre:\n    - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circle-env.sh | bash\n```\n\n## Usage\n\n```\ncircle-env install \u003cpackage\u003e \u003cversion\u003e\n```\n\n`\u003cpackage\u003e` is the name of the package that you want to install. `\u003cversion\u003e` is the version of the package. `\u003cversion\u003e` is optional and the default version of the package will be used if not specified.\n\n\nExample:\n\n```\ncircle-env install google-chrome 50\n```\n\nThis will install Google Chrome v50.\n\n## Development\n\nThe actual scripts must be stored under `src/scripts/\u003cdistro\u003e`. Currently there are three `\u003cdistro\u003e` directories.\n\n`trusty`: scripts that must be compatible with [CircleCI Ubuntu 14.04](https://circleci.com/docs/build-image-trusty/) build image.\n\n`precise`: scripts that must be compatible with [CircleCI Ubuntu 12.04](https://circleci.com/docs/build-image-precise/) build image.\n\n`common`: scripts that must be compatible both with trusty and precise build images.\n\n### Build\n\nWhen you run `./build.sh` it will compile all scripts under `src/scripts/\u003cdistro\u003e` into big `circle-env-precise` and `circle-env-trusty` scripts.\n\n### Hosting Files\n\nCircleCI AWS S3 bucket is the best place to host files that need to be downloaded in your scripts. Please create a Github issue if you have files to upload.\n\n### Test (manually)\n\nBecause the scripts are meant to be run on CircleCI build images, they may be broken when you run on your local Linux box.\n\n\nThe best way to test locally is using Docker. Here is how you can build the Docker image and test locally.\n\n```\n$ docker build -t circle-env-test .\n$ docker run -it -v \u003cpath-to-circle-env\u003e:/tmp/circle-env circle-env-test bash\n```\n\nOnce you are in the Docker container, you can build and test the scripts.\n\n```\n$ cd /tmp/circle-env\n$ ./build.sh\n$ ./dist/circle-env-trusty\n```\n\nYou can modify the scripts locally and the scripts in the container will be updated since the directory is mounted into the container. Just remember to run `./build.sh` every time you make changes.\n\n**Note:**\nthe procedures only work for Trusty since CircleCI doesn't have a Precise Docker image to test. If you want to test Precise, the best way is [ssh](https://circleci.com/docs/ssh-build/) into a CircleCI container.\n\n### Test (automatically)\n\nPlease write tests when you add new scripts. There are [bats](https://github.com/sstephenson/bats) tests under `tests/` directory.\n\nTo run the tests\n\n```\n$ docker build -t circle-env-test .\n$ docker run circle-env-test bats /home/ubuntu/tests/chrome.bats\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircleci%2Fcircle-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcircleci%2Fcircle-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircleci%2Fcircle-env/lists"}