1.0.14 • Published 3 years ago

@maroche/hydra v1.0.14

Weekly downloads
274
License
ISC
Repository
-
Last release
3 years ago

CLI that builds multiple projects from a single configuration file.

Install

npm install -g @maroche/hydra

Usage

Given a mono repo

mono-repo
  |- libs
       |- common
           |- package.json
       |- messaging
           |- package.json
  |- apps
       |- price-service
           |- package.json

Create a configuraton file named hydra.json in the rootof your mono repo

{
    "version": "0.0.1",
    "properties": {
        "DOCKER_REPO": "https://10.0.0.0:5000"
    },
    "actions": {
        "build-node": {
            "steps": [
                "npm update",
                "npm install",
                "npm run build",
                "npm run test",
                "npm publish"
            ]
        },
        "build-docker": {
            "steps": [
                "docker build -t ${DOCKER_REPO}/${ARTIFACT}:${VERSION} .",
                "docker push ${DOCKER_REPO}/${ARTIFACT}:${VERSION}"
            ]
        }
    },
    "artifacts": {
        "common" : {
            "name": "Libs :: common",
            "path": "libs/common",
            "actions": [
                "build-node"
            ]
        },
        "messaging" : {
            "name": "Libs :: messaging",
            "path": "libs/messaging",
            "actions": [
                "build-node"
            ]
        },
        "price-service" : {
            "name": "Apps :: price-service",
            "path": "apps/price-service",
            "actions": [
                "build-node",
                "build-docker"
            ]
        }
    }
}

Execute the hydra build tool from the root of your mono repo

hydra build

[INFO] ---------------------------------------------------------------------------
[INFO] Hydra Summary
[INFO]
[INFO] Libs :: common ................................ SUCCESS (00:00:39)
[INFO] Libs :: messaging ............................. SUCCESS (00:00:33)
[INFO] Apps :: price-service ......................... SUCCESS (00:00:45)
[INFO]
[INFO] ---------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ---------------------------------------------------------------------------
[INFO] Total time : 00:02:07
[INFO] Finished at 2021-02-18T17:34:42+00:00
[INFO] ---------------------------------------------------------------------------

Author

👤 Rob Hutton rob@maroche.co.uk (http://maroche.co.uk)

Show your support

Give a ⭐️ if this project helped you!

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago