oute-services-deployment-sdk
v0.0.19
Published
- Initialization
Downloads
7
Readme
This module expose helper functions
- Initialization
params = {
url: @server url
token: @access token
}
Deployment = require("oute-services-deployment-sdk")
deployment_instance = new Deployment(params)
Cache functions
Core functions
- Save deployment
body = {
"_id": "vaPyYqHZD",
"project_id" : "1ZXZKMvvE",
"name" : "test",
"description" : "test",
"port" : 1234,
"db_type": "NA",
"db_config": {},
"deploy_status": "NA",
"state": "ACTIVE"
}
await deployment_instance.save(body)
- Find One
query = {
"_id": "vaPyYqHZD"
}
await deployment_instance.findOne(query)
- get list
query = {
"project_id" : "1ZXZKMvvE"
}
await deployment_instance.list(query)
- delete deployment
deployment_id = "vaPyYqHZD"
await deployment_instance.delete(deployment_id)
- get deploy command
deployment_id = "vaPyYqHZD"
environment_id = null //for specific environment please send the id
await deployment_instance.getDeployCommand(deployment_id, environment_id)
- generate postman collection
deployment_id = "vaPyYqHZD"
environment_id = null //for specific environment please send the id
await deployment_instance.generatePostmanCollection(deployment_id, environment_id)