Add series task branch flow
This commit is contained in:
+24
-24
@@ -18,19 +18,19 @@ Typowy przepływ pracy:
|
||||
|
||||
```bash
|
||||
./rvctl tokens compare
|
||||
./rvctl series cards show inf 03
|
||||
./rvctl series cards tasks list inf 03
|
||||
./rvctl containers show inf 03
|
||||
./rvctl containers start inf 03 --session rv-inf03 --attach
|
||||
./rvctl series cards show inf bss
|
||||
./rvctl series cards tasks list inf bss
|
||||
./rvctl containers show inf bss
|
||||
./rvctl containers start inf bss --session rv-inf-bss --attach
|
||||
./rvctl containers list
|
||||
./rvctl containers stop rv-inf03
|
||||
./rvctl containers stop rv-inf-bss
|
||||
```
|
||||
|
||||
## Model
|
||||
|
||||
Docelowo komendy `containers` pracują na trzech warstwach:
|
||||
|
||||
- karta pracy, np. `inf 03`
|
||||
- karta pracy, np. `inf bss`
|
||||
- opcjonalne zadanie, np. `--task task1`
|
||||
- instancja środowiska, np. `--instance shell`
|
||||
|
||||
@@ -52,19 +52,19 @@ defaults.tmux_window
|
||||
Pokazuje plan uruchomienia środowiska bez tworzenia sesji `tmux`.
|
||||
|
||||
```bash
|
||||
./rvctl containers show inf 03
|
||||
./rvctl containers show inf/03 --task task1
|
||||
./rvctl containers show inf bss
|
||||
./rvctl containers show inf/bss --task task1
|
||||
```
|
||||
|
||||
Typowe pola:
|
||||
|
||||
```text
|
||||
selector inf/03
|
||||
selector inf/bss
|
||||
task task1
|
||||
card_path ~/dev/workspace/rv/series/inf/03
|
||||
task_path ~/dev/workspace/rv/series/inf/03/task1
|
||||
card_path ~/dev/workspace/rv/series/inf/lab-rv32i-strlen-bss-data-stack
|
||||
task_path ~/dev/workspace/rv/series/inf/lab-rv32i-strlen-bss-data-stack/task1
|
||||
tools_root ~/dev/workspace/rv/tools/rv32i-hazard3-env
|
||||
session rv-inf03
|
||||
session rv-inf-bss
|
||||
window rv
|
||||
instance shell
|
||||
```
|
||||
@@ -72,7 +72,7 @@ instance shell
|
||||
Ta komenda jest odpowiednikiem obecnego trybu:
|
||||
|
||||
```bash
|
||||
./rvctl tmux-container inf 03 --dry-run
|
||||
./rvctl tmux-container inf bss --dry-run
|
||||
```
|
||||
|
||||
### `containers start [SERIES] [CARD]`
|
||||
@@ -80,9 +80,9 @@ Ta komenda jest odpowiednikiem obecnego trybu:
|
||||
Uruchamia sesję `tmux` i kontener dla wybranej karty.
|
||||
|
||||
```bash
|
||||
./rvctl containers start inf 03
|
||||
./rvctl containers start inf/03 --session rv-inf03
|
||||
./rvctl containers start inf 03 --task task1 --instance shell --attach
|
||||
./rvctl containers start inf bss
|
||||
./rvctl containers start inf/bss --session rv-inf-bss
|
||||
./rvctl containers start inf bss --task task1 --instance shell --attach
|
||||
```
|
||||
|
||||
Przełączniki:
|
||||
@@ -112,7 +112,7 @@ Przykładowy wynik:
|
||||
```text
|
||||
session selector task instance window
|
||||
-------- -------- ----- -------- ------
|
||||
rv-inf03 inf/03 task1 shell rv
|
||||
rv-inf-bss inf/bss task1 shell rv
|
||||
```
|
||||
|
||||
### `containers attach SESSION`
|
||||
@@ -120,13 +120,13 @@ rv-inf03 inf/03 task1 shell rv
|
||||
Podłącza terminal do istniejącej sesji.
|
||||
|
||||
```bash
|
||||
./rvctl containers attach rv-inf03
|
||||
./rvctl containers attach rv-inf-bss
|
||||
```
|
||||
|
||||
Technicznie odpowiada to:
|
||||
|
||||
```bash
|
||||
tmux attach -t rv-inf03
|
||||
tmux attach -t rv-inf-bss
|
||||
```
|
||||
|
||||
### `containers stop SESSION`
|
||||
@@ -134,13 +134,13 @@ tmux attach -t rv-inf03
|
||||
Zamyka sesję `tmux`, a razem z nią uruchomiony w niej proces kontenera.
|
||||
|
||||
```bash
|
||||
./rvctl containers stop rv-inf03
|
||||
./rvctl containers stop rv-inf-bss
|
||||
```
|
||||
|
||||
Technicznie odpowiada to:
|
||||
|
||||
```bash
|
||||
tmux kill-session -t rv-inf03
|
||||
tmux kill-session -t rv-inf-bss
|
||||
```
|
||||
|
||||
## Aliasowanie Starej Komendy
|
||||
@@ -148,9 +148,9 @@ tmux kill-session -t rv-inf03
|
||||
Stara komenda może zostać jako alias kompatybilności:
|
||||
|
||||
```text
|
||||
tmux-container inf 03 --dry-run -> containers show inf 03
|
||||
tmux-container inf 03 --session NAME -> containers start inf 03 --session NAME
|
||||
tmux-container inf/03 --attach -> containers start inf/03 --attach
|
||||
tmux-container inf bss --dry-run -> containers show inf bss
|
||||
tmux-container inf bss --session NAME -> containers start inf bss --session NAME
|
||||
tmux-container inf/bss --attach -> containers start inf/bss --attach
|
||||
```
|
||||
|
||||
Dokumentacja i nowe przykłady powinny promować namespace `containers`.
|
||||
|
||||
Reference in New Issue
Block a user