node-cloudfoundry-actuator-cli
v2.5.0
Published
Build time info file generation for Cloud Foundry actuator endpoints
Downloads
1,461
Maintainers
Readme
node-cloudfoundry-actuator-cli
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": "[email protected]"
}
},
"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.