Skip to content

Commit

Permalink
docs(adr): capture task output
Browse files Browse the repository at this point in the history
Signed-off-by: Ourchitecture <[email protected]>
  • Loading branch information
ourchitectureio committed Sep 20, 2023
1 parent e4b224c commit 4a9cdc0
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/docs/decisions/!template_[verb]_[the-nouns].md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# These are optional elements. Feel free to remove any of them.
status: {proposed | rejected | accepted | deprecated | … | superseded by [ADR-0005](0005-example.md)}
date: {YYYY-MM-DD when the decision was last updated}
deciders: {list everyone involved in the decision}
Expand Down
39 changes: 39 additions & 0 deletions src/docs/decisions/capture_automation-task-output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
status: accepted
date: 2023-09-19
deciders: Ourchitecture
---

# Capture automation task output

## Context and Problem Statement

Streaming task automation output to the terminal is useful for humans, but
writing the output to a file can be useful for referencing long after the
task is executed, used for task cache optimizations e.g. wireit, as well
as can be uploaded for specific DevOps pipeline builds e.g. Continuous
Integration.

## Considered Options

- Pipe command output
- Capture "stderr" and "stdout"

## Decision Outcome

Building on the decision to [use NodeJS scripts](./script_automation-tasks.md)
as well as [using Wireit](./optimize_automation-tasks.md),
building on top of Node's built-in `exec` function was selected along with
logging through the "winston" library. The team is already familiar with
these technologies.

### Consequences

- Good, because it enables Wireit output caching
- Good, because winston is a fairly ubiquitous solution for NodeJS logging
- Good, because it enables artifact uploads during DevOps pipeline runs
e.g. Continuous Integration

## More Information

- [winston website](https://github.com/winstonjs/winston#readme)
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# These are optional elements. Feel free to remove any of them.
status: accepted
date: 2023-09-19
deciders: Ourchitecture
Expand All @@ -9,7 +8,7 @@ deciders: Ourchitecture

## Context and Problem Statement

Building on top of the decision ["Use NodeJS scripts for developer task automation"](./dev-tasks-using-node-scripts.md),
Building on top of the decision ["Use NodeJS scripts for developer task automation"](./script_automation-tasks.md),
the NodeJS package management offers a handful of unique tool choices.

## Considered Options
Expand Down
3 changes: 1 addition & 2 deletions src/docs/decisions/optimize_automation-tasks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# These are optional elements. Feel free to remove any of them.
status: accepted
date: 2023-09-19
deciders: Ourchitecture
Expand All @@ -21,7 +20,7 @@ Automation can benefit drastically from caching, dependency management, and more

## Decision Outcome

Building on the decision to [use NodeJS scripts](./dev-tasks-using-node-scripts.md),
Building on the decision to [use NodeJS scripts](./script_automation-tasks.md),
Wireit was selected. The team is already familiar with the choice and the
advantages of Wireit including task dependencies, localized caching as well
as Continuous Integration caching across independent executions, performance
Expand Down
1 change: 0 additions & 1 deletion src/docs/decisions/script_automation-tasks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# These are optional elements. Feel free to remove any of them.
status: accepted
date: 2023-09-19
deciders: Ourchitecture
Expand Down

0 comments on commit 4a9cdc0

Please sign in to comment.