{"id":24503684,"url":"https://github.com/plus3it/tardigrade-ci","last_synced_at":"2026-02-25T00:08:35.192Z","repository":{"id":36967287,"uuid":"219560065","full_name":"plus3it/tardigrade-ci","owner":"plus3it","description":"Tardigrade CI framework","archived":false,"fork":false,"pushed_at":"2024-04-08T06:38:55.000Z","size":1916,"stargazers_count":4,"open_issues_count":0,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-08T07:41:34.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plus3it.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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}},"created_at":"2019-11-04T17:39:24.000Z","updated_at":"2024-08-06T20:41:15.833Z","dependencies_parsed_at":"2023-01-17T09:30:55.156Z","dependency_job_id":"49e1722f-fcf0-4728-b4fc-39817b98d144","html_url":"https://github.com/plus3it/tardigrade-ci","commit_stats":null,"previous_names":[],"tags_count":92,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus3it%2Ftardigrade-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus3it%2Ftardigrade-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus3it%2Ftardigrade-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus3it%2Ftardigrade-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plus3it","download_url":"https://codeload.github.com/plus3it/tardigrade-ci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243703990,"owners_count":20334089,"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":"2025-01-21T23:18:11.808Z","updated_at":"2025-12-24T16:11:59.901Z","avatar_url":"https://github.com/plus3it.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tardigrade-ci\n\nA docker based test framework\n\nThis project packages the make targets that provide the tools and command shortcuts\nPlus3IT uses to develop and maintain projects of all sorts.\n\nThe targets in this tardigrade-ci Makefile are included when using the accompanying\ndocker image with your own project. A list of the available make targets are provided\nbelow:\n\n```bash\nAvailable targets:\n\n  bumpversion/major                   Uses 'bumpversion' to update the major version\n  bumpversion/minor                   Uses 'bumpversion' to update the minor version\n  bumpversion/patch                   Uses 'bumpversion' to update the patch version\n  cfn/lint                            Lints CloudFormation files\n  clean                               Clean build-harness\n  docker/build                        Builds the tardigrade-ci docker image\n  docker/clean                        Cleans local docker environment\n  docker/run                          Runs the tardigrade-ci docker image\n  docs/generate                       Generates Terraform documentation\n  docs/lint                           Lints Terraform documentation\n  ec/lint                             Runs editorconfig-checker, aka 'ec', against the project\n  hcl/format                          Formats hcl files\n  hcl/lint                            Lints hcl files\n  hcl/validate                        Validates hcl files\n  help                                This help screen\n  init                                Init build-harness\n  json/format                         Formats json files\n  json/lint                           Lints json files\n  python/format                       Formats Python files\n  python/lint                         Checks format and lints Python files\n  sh/lint                             Lints bash script files\n  terraform/format                    Formats terraform files\n  terraform/lint                      Lints terraform files\n  test                                Runs terraform tests under the tests directory\n  yaml/lint                           Lints YAML files\n```\n\n## How to use\n\nThis project can be utilized one of two ways, via Docker or via Makefile include.\n\n### Prerequisite\n\nRegardless of the method for using `tardigrade-ci`, the `tardigrade-ci` framework requires a Makefile to function as intended. A simple Makefile will suffice:\n\n```bash\nSHELL := /bin/bash\n\ninclude $(shell test -f .tardigrade-ci || curl -sSL -o .tardigrade-ci \"https://raw.githubusercontent.com/plus3it/tardigrade-ci/master/bootstrap/Makefile.bootstrap\"; echo .tardigrade-ci)\n```\n\n### Via Docker\n\nRefer to [Prerequisite](#Prerequisite) section for Makefile setup.\n\n**NOTE:** The target project _must_ be added as a bindmount to the docker WORKDIR.\n\n```bash\nIMAGE=\"plus3it/tardigrade-ci:latest\"\ndocker pull \"$IMAGE\"\ndocker run --rm -ti -v \"$PWD/:/workdir/\" -w /workdir \"$IMAGE\" help\n```\n\n### Makefile Include\n\nThis option uses `make` to invoke the targets. It is recommended to use the target\n`make docker/run`, with a Dockerfile based on the plus3it/tardigrade-ci image,\nas this container includes all the tools needed by all the targets. In this case,\nyou need only `make` and `docker` on your system. See below for an example.\n\nHowever, you may invoke any make target directly, e.g. `make ec/lint`. Be aware\nif you do so, the make target will attempt to install the tools it requires to your\nsystem. Generally, this option requires more expertise to utilize (and more\nflexibility/understanding), as the install routines may not be tailored for your\nsystem.\n\n1. Create a Dockerfile in the project in which you wish to utilize these ci tools\nwith the following content (updated to the current version).\n\n    **NOTE:** This Dockerfile is intended to be used to enable version pinning of\n    the underlying toolset.\n\n    ```bash\n    FROM plus3it/tardigrade-ci:0.8.0\n    ```\n\n2. Refer to [Prerequisite](#Prerequisite) section for Makefile setup.\n\n3. Add the following to your `.gitignore` file\n\n    ```bash\n    # tardigrade-ci\n    .tardigrade-ci\n    tardigrade-ci/\n    ```\n\n4. Run `make docker/run target=\u003cTARGET\u003e`.\n\n5. Additionally, you can use the tardigrade-ci/Makefile vars and targets\ndirectly in your own Makefile. For example, there is a target for installing\na binary from GitHub releases, which you can utilize pretty easily:\n\n    ```\n    ## Install gomplate\n    gomplate/% GOMPLATE_VERSION ?= latest\n    gomplate/install:\n      @ $(MAKE) install/gh-release/$(@D) FILENAME=\"$(BIN_DIR)/$(@D)\" OWNER=hairyhenderson REPO=$(@D) VERSION=$(GOMPLATE_VERSION) QUERY='.name | endswith(\"$(OS)-$(ARCH)\")'\n    ```\n\n    The target `install/gh-release/%` as well as the vars `$(OS)` and `$(ARCH)` are\n    provided by the tardigrade-ci/Makefile, and do not need to be redefined in your\n    local Makefile.\n\n## Makefile prerequisites\n\nUsing the Makefile approach involves calling `make` directly. This means make,\nas well as a few other prerequisites must be installed on the system for it to\nwork.\n\n* `make` v4.2 or later\n* `jq` v1.5 or later\n* `git` v2.20 or later\n* `bash` v4 or later\n* `sed` v4 or later\n* `awk` v4 or later\n* `grep` v3 or later\n* `xargs` v4.7 or later\n* `curl` v7 or later\n\nThe Makefile is written with Debian-based systems in mind, including Ubuntu, and\nall those packages can be installed using `apt` from default repos. Other platforms\nought to work fine, as long as these packages/versions can be installed. For example,\nMacOS is known to work, using `brew` to get a modern version of `bash` and GNU\ntools (there are many guides, [here is one](https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/)).\n\nThere are a couple make targets that call out to `apt` directly. You can avoid\nthat requirement by pre-installing these packages using your own package manager,\nor simply do not invoke targets that rely on these packages:\n\n* `zip`\n* `nodejs`\n\n## Makefile \"operating modes\"\n\nWhen using the Makefile approach, the `include` directive is a shell command that\nretrieves the \"bootstrap\" Makefile from this project, saves it to the current working\ndirectory, and then echoes back the name of the saved file. The `include` directive\ntells `make` to read the specified Makefile and process its directives and targets.\n\nThe bootstrap Makefile is very barebones. Its primary purpose is to bootstrap this\n`tardigrade-ci` project so all the `make` targets are available. It does this through\nits own `include` directive. The bootstrap `include` directive processes a shell\ncommand with logic to determine the operating mode (described below), and then echoes\nback the path to the tardigrade-ci Makefile.\n\nThe bootstrap Makefile supports two \"operating modes\" that we're calling **user mode**\nand **developer mode**.\n\nIn **user mode**, the bootstrap Makefile automatically clones the `tardigrade-ci`\nrepo to a subdirectory of the calling project, e.g. `/{project}/tardigrade-ci/`.\nThis feature is called **auto-init**. In this mode, the `tardigrade-ci` subdirectory\nis considered \"owned\" by the bootstrap Makefile. The bootstrap Makefile will\nmanage and update the clone (through the `include` logic), ensuring the checkout\nmatches the git branch or tag specified by the env `TARDIGRADE_CI_BRANCH`. By\ndefault, this env will resolve to either the version specified in the `Dockerfile`\n(if present) or the `master` branch (if the Dockerfile is missing or is not\nspecifying a version). The user may override the default behavior by providing\nthe env explicitly to `make`, e.g. `TARDIGRADE_CI_BRANCH={branch} make help`.\n\nIn **developer mode**, the user is responsible for cloning the `tardigrade-ci`\nrepo to a sibling directory of the current project, e.g. `/{project}/` and\n`/tardigrade-ci/`. When the bootstrap Makefile detects this condition, it will\ninclude the tardigrade-ci Makefile from the user-managed clone. This makes it easier\nfor a developer to edit the tardigrade-ci project, and test those changes from\na calling project.\n\nThe bootstrap Makefile provides two make targets to help manage these modes:\n\n- `make init` will enable **user mode** explicitly, by cloning the `tardigrade-ci`\nrepo as a subdirectory of the calling project. This way a developer who has a separate\nclone of the `tardigrade-ci` repo can easily switch to **user mode**.\n\n- `make clean` will delete both the `tardigrade-ci` subdirectory and the bootstrap\nMakefile. The next call to `make` will then retrieve the bootstrap Makefile and\neither auto-init to **user mode** or fall into **developer mode**, based on the\nlogic described above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplus3it%2Ftardigrade-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplus3it%2Ftardigrade-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplus3it%2Ftardigrade-ci/lists"}