{"id":21497141,"url":"https://github.com/financial-times/next-ci-shared-helpers","last_synced_at":"2025-07-15T19:33:23.518Z","repository":{"id":33412353,"uuid":"136614694","full_name":"Financial-Times/next-ci-shared-helpers","owner":"Financial-Times","description":"Shared helper scripts to assist with common tasks in CI environments","archived":false,"fork":false,"pushed_at":"2023-12-15T11:57:33.000Z","size":53,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":55,"default_branch":"main","last_synced_at":"2024-04-08T16:48:26.198Z","etag":null,"topics":["customer-products","platforms-customer-products"],"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/Financial-Times.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}},"created_at":"2018-06-08T12:14:55.000Z","updated_at":"2021-11-17T14:29:19.000Z","dependencies_parsed_at":"2022-08-07T21:15:18.029Z","dependency_job_id":null,"html_url":"https://github.com/Financial-Times/next-ci-shared-helpers","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/Financial-Times%2Fnext-ci-shared-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Financial-Times%2Fnext-ci-shared-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Financial-Times%2Fnext-ci-shared-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Financial-Times%2Fnext-ci-shared-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Financial-Times","download_url":"https://codeload.github.com/Financial-Times/next-ci-shared-helpers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226065731,"owners_count":17568259,"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":["customer-products","platforms-customer-products"],"created_at":"2024-11-23T16:21:48.972Z","updated_at":"2024-11-23T16:21:49.698Z","avatar_url":"https://github.com/Financial-Times.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next CI Helper Scripts [![CircleCI](https://circleci.com/gh/Financial-Times/next-ci-shared-helpers.svg?style=svg\u0026circle-token=33bcf2eb98fe2e875cc66de93d7e4a50369c952d)](https://github.com/Financial-Times/next-ci-shared-helpers)\n\nThis repo contains a set of common bash scripts to be used in the delivery pipeline.\n\n\n## Installation\n\n```sh\ngit clone git@github.com:Financial-Times/next-ci-shared-helpers.git\ncd next-ci-shared-helpers\n```\n\n\n## Development\n\n### Working locally\n\nMany of the scripts require a Unix environment so in order to run existing scripts you'll need to be familiar with [Docker](https://www.docker.com/get-started).\n\nThe first step is to [install docker](https://www.docker.com/get-started) and once you're up and running you'll be able to run the scripts locally inside a Docker container.\n\nFor example, the following command will run the `helper-install-awscli` script inside the container (this will output many logs but if it has worked correctly the last line on the console should read `Setting up awscli (1.11.13-1) ...`.\n\n```shell\ndocker run --rm -it -w /tmp --mount type=bind,source=\"$(pwd)\",destination=/tmp circleci/node:12.18-browsers ./helper-install-awscli\n```\n\nThe command in the example can be largely re-used by simply changing the Docker image and script to run:\n\n```shell\ndocker run --rm -it -w /tmp --mount type=bind,source=\"$(pwd)\",destination=/tmp DOCKER_IMAGE_NAME ./SCRIPT_TO_RUN\n```\n\n\n### Usage\n\nTo make use of this package in your CircleCI deployment pipeline, firstly create a new `step` and clone the package:\n\n```yaml\n- run:\n    name: Checkout next-ci-shared-helpers\n    command: git clone --depth 1 git@github.com:Financial-Times/next-ci-shared-helpers.git .circleci/shared-helpers\n```\n\n_The convention across all FT repos is to put the helpers inside the `.circleci/shared-helpers` folder._\n\nThen add another step after it to run one of the scripts:\n\n```yaml\n- run:\n    name: shared-helper / npm-install-peer-deps\n    command: .circleci/shared-helpers/helper-npm-install-peer-deps\n```\n\n_The convention across all FT repos is to name the step as follows: `shared-helper / NAME_OF_SCRIPT`._\n\n### General guidelines for helper scripts\n\n- Copy `helper.example` as a starting point\n- Avoid being \"clever\" - developers shouldn't require knowledge of obscure bash syntax to understand the helper scripts that you write\n- Comment liberally - help others (and your future self) understand *why* the helper script is doing the things it's doing\n- Include links to any relevant documentation in your comments\n- Try and avoid noisy output - it's hard to debug CI builds or understand what has happened if there are lots of unnecessary messages in the shell output\n- Echo out useful messages about progress and actions taken by the script - the flip side of avoiding noisy output: humans want to know what's happening/happened with their build\n- Remember to make your script executable by running the command `chmod +x ./\u003cNAME_OF_SCRIPT\u003e`\n\n### Naming guidelines\n\nThe filename of a helper script should give a clear indication of what it does:\n\n- ❌ `helper-test`\n- ✅ `helper-run-mocha-tests`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinancial-times%2Fnext-ci-shared-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinancial-times%2Fnext-ci-shared-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinancial-times%2Fnext-ci-shared-helpers/lists"}