Options
All
  • Public
  • Public/Protected
  • All
Menu

Module balenaCLI helpers

balenaCLI helpers performs frequently executed tasks in order to keep things DRY. For one-off commands, it's recommended to not use the helpers and instead directly use the balenaCLI with the example explained below.

example

The core service where the test suites run already has balenaCLI installed. There is no need to initalise the CLI class to run/execute any CLI command inside the tests. Instead use

const { exec } = require("child_process");
await exec(`balena push joystart --source .`)

To get output from the commands being exectued, use the callback

const { exec } = require("child_process");
await exec(`balena logs alliance-fleet --service "normandy-sr0"`, (error, stdout, stderr) => {
  if (error) {
    throw new error
  }
  console.log(stdout)
})

Index

Classes

Generated using TypeDoc