node-cloudfoundry-actuator-cli

Build time info file generation for Cloud Foundry actuator endpoints

Usage no npm install needed!

<script type="module">
  import nodeCloudfoundryActuatorCli from 'https://cdn.skypack.dev/node-cloudfoundry-actuator-cli';
</script>

README

node-cloudfoundry-actuator-cli

Build Status Dependency Status DevDependency Status Npm downloads Npm Version Git tag Github issues License

Build time info file generation for Cloud Foundry actuator endpoints.

Generates a .json file, that can be consumed by Express Cloud Foundry Actuator Middleware to show build information in the Cloud Foundry Apps Manager.

The file is by default placed in .actuator and is called info.json.

See Express Actuator Middleware Example for an example application with full integration of this cli and Express Cloud Foundry Actuator Middleware.

Installation

npm install node-cloudfoundry-actuator-cli --save

Example

Add actuator script to your package.json:

{
    "scripts": {
        "actuator": "cloudfoundry-actuator-cli --git --npm"
    }
}

Available options are:

  • --git: Enables git repository information contribution
  • --npm: Enables npm build information contribution
  • --mvn: Enables maven build information contribution

No option is enabled by default.

Run actuator script:

npm run actuator

VoilĂ , see generated File .actuator/info.json:

{
  "git": {
    "branch": "dev",
    "tag": null,
    "remote": {
      "origin": {
        "type": "git",
        "url": "https://github.com/stfsy/node-cloudfoundry-actuator-cli.git"
      }
    },
    "commit": {
      "id": "fdaea68f36",
      "time": "2017-11-03T10:58:12.000Z",
      "message": {
        "short": "chore: ignore vs code files"
      }
    },
    "user": {
      "email": "none@gmail.com"
    }
  },
  "build": {
    "name": "express-cloudfoundry-actuator-middleware",
    "version": "0.1.0",
    "description": "Express actuator middleware for Cloud Foundry Applications"
  }
}

License

This project is distributed under the MIT license.