Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Temporal Bash Workflow

Durable bash, orchestrated by Temporal — the harness design that verified a 1,273-repository migration 🚀

Two pieces :

  • BashWorkflow — the atom : run any bash command as a durable workflow (retries, history, UI)
  • CheckRepositoriesWorkflow — the harness : discover a user's GitHub repositories, fan out one child workflow per repository, check each one, aggregate a markdown ✅/⚠️/❌ report
CheckRepositoriesWorkflow(username)              # parent
 ├─ gh repo list …                               # discovery (bash activity)
 ├─ CheckRepositoryWorkflow(…/repo-1)            # one child per repo,
 ├─ CheckRepositoryWorkflow(…/repo-2)            # all in flight at once
 ├─ …                                            # one failure hurts nobody else
 └─ report_<runId>.md                            # | Repo | Default branch | Branches |

Install

brew install temporal gh
gh auth login

Start temporal server

temporal server start-dev

# or with persisted db
temporal server start-dev --db-filename temporal.db

Launch a Worker

./mvnw spring-boot:run

Fleet report 🐙

Check every repository of a GitHub user — one child workflow each :

temporal workflow start \
--task-queue DefaultTaskQueue \
--type CheckRepositoriesWorkflow \
--workflow-id check-my-repos \
--input '"vspiewak"'

Open the Temporal Web UI : the parent + one child workflow per repository — durable, retryable, one failure hurting nobody else :

Temporal Web UI — the parent workflow and one named child per repository

When it completes, the report lands in reports/report_<runId>.md :

| Repository | Default branch | Branches |
|---|---|---|
| gh-auto-updater | ✅ main | 1 — main |
| twitter-sentiment-analysis | ⚠️ master | 1 — master |
| some-unreachable-repo | ❌ | ❌ |

At work, this exact design — durable parent, one child per repository, bash activities, markdown report — verified branches, tags and CI/CD parity for 1,273 migrated repositories. Full story here 😉

Launch a single bash workflow

temporal workflow start \
--task-queue DefaultTaskQueue \
--type BashWorkflow \
--workflow-id my-first-workflow \
--input '"echo 1; echo 2"'

One-shot mode

Run worker + workflow in a single command, exit code reflects the workflow result

# single command
./mvnw spring-boot:run -Dspring-boot.run.jvmArguments="-Dcmd='echo 1; echo 2'"

# fleet report
./mvnw spring-boot:run -Dspring-boot.run.jvmArguments="-Dreport=vspiewak"

About

Durable bash with Temporal

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages