Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
Simplify runner (#115)
Browse files Browse the repository at this point in the history
This removes the usage of AWS IoT jobs to orchestrate the runs of firmware CI jobs.
Instead, [GitHub Actions are used](NordicSemiconductor/asset-tracker-cloud-docs#194).

BREAKING CHANGE: this removes the CLI

See NordicSemiconductor/cloud-aws-firmware-ci-feature-runner-action#282
  • Loading branch information
coderbyheart committed Jun 16, 2021
1 parent 69552c8 commit 1e5286d
Show file tree
Hide file tree
Showing 22 changed files with 1,134 additions and 1,390 deletions.
94 changes: 0 additions & 94 deletions cli/cli.ts

This file was deleted.

6 changes: 0 additions & 6 deletions cli/commands/CommandDefinition.ts

This file was deleted.

21 changes: 0 additions & 21 deletions cli/commands/cancelJob.ts

This file was deleted.

80 changes: 0 additions & 80 deletions cli/commands/run.ts

This file was deleted.

33 changes: 0 additions & 33 deletions cli/commands/runFromFile.ts

This file was deleted.

53 changes: 0 additions & 53 deletions cli/commands/scheduleJob.ts

This file was deleted.

37 changes: 0 additions & 37 deletions cli/commands/waitForJob.ts

This file was deleted.

27 changes: 25 additions & 2 deletions cli/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env node

const fs = require('fs')

const die = (err, origin) => {
console.error(`An unhandled exception occured!`)
console.error(`Exception origin: ${JSON.stringify(origin)}`)
Expand All @@ -10,5 +12,26 @@ const die = (err, origin) => {
process.on('uncaughtException', die)
process.on('unhandledRejection', die)

// eslint-disable-next-line
require('../dist/cli/cli')
const { run } = require('../dist/run')
run({
target: process.env.RUN_TARGET ?? 'nrf9160dk_nrf9160ns',
device: process.env.RUN_DEVICE ?? '/dev/ttyACM0',
})(JSON.parse(fs.readFileSync(0, 'utf-8')))
.then((res) => {
if (res.timeout) {
console.error(`Timed out.`)
process.exit(-1)
}
if (res.abort) {
console.error('Aborted.')
process.exit(-2)
}
if (!res.connected) {
console.error('Did not connect.')
process.exit(-3)
}
})
.catch((err) => {
console.error(err.message)
process.exit(-99)
})
Loading

0 comments on commit 1e5286d

Please sign in to comment.