octopus-deploy
Version:
Node scripts to package up applications, create releases, and deploy with Octopus Deploy. This package leverages the Octopus Deploy REST API in order to deploy from Windows and non-Windows machines.
25 lines (18 loc) • 457 B
JavaScript
const client = require('../octopus-client')
const find = async id => {
const url = `/deployments/${id}`
return client.get(url)
}
const create = async params => {
const url = '/deployments'
const { formValues, machineIds, ...data } = params
if (formValues) {
data.formValues = formValues
}
if (machineIds) {
data.specificMachineIds = machineIds
}
return client.post(url, data)
}
module.exports = { create, find }