A Python-based CLI to analyze and maintain our containerised deployments.
Go to file
Linus Sehn 83967212b4
continuous-integration/drone/push Build is failing Details
Remove nix files
2022-12-19 16:02:06 +01:00
LICENSES Make `reuse` compliant 2022-05-16 14:04:05 +02:00
container_utils Make `reuse` compliant 2022-05-16 14:04:05 +02:00
tests Make `reuse` compliant 2022-05-16 14:04:05 +02:00
.drone.yml Fix `.drone.yml` 2022-05-16 14:05:06 +02:00
.gitignore add coverage to CI 2022-03-04 10:23:58 +01:00
.gitignore.license Make `reuse` compliant 2022-05-16 14:04:05 +02:00
README.md Add `reuse` badge 2022-05-16 14:07:45 +02:00
api.org add development files 2022-03-03 17:29:54 +01:00
api.org.license Make `reuse` compliant 2022-05-16 14:04:05 +02:00
coverage.svg increase test coverage; unify CLI 2022-03-04 16:06:44 +01:00
coverage.svg.license Make `reuse` compliant 2022-05-16 14:04:05 +02:00
poetry.lock Switch to flake (and back to Python 3.9) 2022-05-16 13:38:54 +02:00
poetry.lock.license Make `reuse` compliant 2022-05-16 14:04:05 +02:00
pyproject.toml Make `reuse` compliant 2022-05-16 14:04:05 +02:00
renovate.json New `renovate.json` 2022-07-18 15:52:33 +02:00
renovate.json.license Make `reuse` compliant 2022-05-16 14:04:05 +02:00
requirements.txt Make `reuse` compliant 2022-05-16 14:04:05 +02:00

README.md

Container Utilities

Build Status Coverage Code style: black REUSE status

The goal of this CLI tool is to simplify the regular analysis and maintenance of container deployments with Gitea and Drone.

Usage

There are two environment variables that you need to set in order to ensure proper operation of the tool. These are DRONE_TOKEN and GITEA_TOKEN. If you use direnv, simply create a file called .envrc in the repository with the following content:

export DRONE_TOKEN=***
export GITEA_TOKEN=***

Next, install the module and its dependencies by running poetry install. You can then access the command cu by running poetry run cu. If you do that you are presented with a help page that looks like this:

Usage: cu [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  analyse
  rebuild

Analysis

The analyse subcommand can be used as follows:

Usage: cu analyse [OPTIONS]

Options:
  -t, --topic TEXT  Specify topics (e.g. -t 'cont1-noris' -t cont2-noris)
                    [default: docker]
  --help            Show this message and exit.

Rebuilding

The rebuild subcommand can be used as follows:

Usage: cu rebuild [OPTIONS]

Options:
  -a, --all-repos
  -s, --slug TEXT    Specify repository slug (e.g. 'linus/dotfiles').
  -b, --branch TEXT  Specify repository target branch.  [default: default
                     branch of repository]
  -e, --event TEXT   Specify the event.  [default: push]
  -y, --no-confirm   Don't ask for confirmation.
  --help             Show this message and exit.