1.0.3 • Published 5 months ago

helm-mono v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Helm Monorepo CLI

Overview

helm-mono is a CLI tool designed to manage Helm chart monorepos efficiently. It provides features such as listing, building, versioning, and publishing Helm charts to Harbor.

Features

  • Initialize Monorepo Configuration (helm-mono init)
  • List Available Charts (helm-mono list)
  • Build Helm Charts (helm-mono build <chart> or helm-mono build-all)
  • Build Only Affected Charts (helm-mono build-affected)
  • Bump Chart Versions (helm-mono version <chart> patch|minor|major|<specific version>)
  • Push Charts to Harbor (helm-mono push <chart> or helm-mono push-all)

Using helm-mono in Another Helm Monorepo

If you have another Helm monorepo and want to use helm-mono, follow these steps:

1️⃣ Install helm-mono from NPM

npm install -g helm-mono

2️⃣ Initialize the Helm Monorepo

helm-mono init

This sets up the helm.monorepo.json file in your new monorepo.

3️⃣ Use helm-mono Commands

helm-mono list        # List charts
helm-mono build-all   # Build all charts
helm-mono push-all    # Push all charts to Harbor

Usage

🔹 Initialize Configuration

helm-mono init

This command will prompt you for:

  • Chart directories
  • Harbor repository URL & project name

It will generate helm.monorepo.json with your configuration.

🔹 List Available Charts

helm-mono list

Scans configured directories and lists Helm charts that contain a Chart.yaml file.

🔹 Build Charts

Build a specific chart:

helm-mono build <chart> [-o output-folder] [--build-deps]

Build all charts:

helm-mono build-all [-o output-folder] [--build-deps]

Build only affected charts:

helm-mono build-affected [-o output-folder] [-r HEAD~1] [--build-deps]
  • --build-deps ensures dependencies are built first.

🔹 Version Bumping

helm-mono version <chart> patch|minor|major|<specific version>

Example:

helm-mono version my-chart minor  # Bumps version (1.0.0 → 1.1.0)
helm-mono version my-chart 2.3.5  # Sets version to 2.3.5

🔹 Push Charts to Harbor

Push a specific chart:

helm-mono push <chart> [-u username] [-p password]

Push all charts:

helm-mono push-all [-u username] [-p password]

The CLI uses the Harbor URL and project name from helm.monorepo.json.

Installation (for development)

1️⃣ Install Dependencies

Ensure you have Node.js (>=14.0.0) installed. Then, run:

npm install

2️⃣ Link the CLI Tool

To make helm-mono available globally:

npm link

Now, you can run helm-mono from anywhere in your terminal.

Running Tests

npm test

To test a specific command:

npx jest tests/init.test.js

To run tests with coverage:

npx jest --coverage

Contributing

Feel free to submit issues and pull requests to improve this project!

License

MIT License

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago