Commit e3aec66

Eric Bower  ·  2026-05-06 20:34:07 -0400 EDT
parent b95ae48
refactor: name is now `pici`
4 files changed,  +10, -8
M go.mod
+1, -0
......@@ -0,0 +1 @@
1+ci
+1, -0
......@@ -0,0 +1 @@
1+{"type":"git.push","name":"pico","workspace":"/home/erock/dev/pico/"}
M go.mod
+1, -1
......@@ -1,4 +1,4 @@
1-module github.com/picosh/ci
1+module github.com/picosh/pici
22
33 go 1.26.2
44
+7, -7
......@@ -59,7 +59,7 @@ func NewCfg() *Cfg {
5959 var structured bool
6060 flag.StringVar(&keyLoc, "pk", "", "ssh private key used to authenticate with pico services")
6161 flag.StringVar(&certLoc, "ck", "", "ssh certificate public key used to authenticate with pico services (only required if using ssh certificates)")
62- flag.StringVar(&artifactDir, "artifact-dir", "/tmp/pico-ci-artifacts", "local directory to stage artifacts")
62+ flag.StringVar(&artifactDir, "artifact-dir", "/tmp/pici-artifacts", "local directory to stage artifacts")
6363 flag.StringVar(&event, "event", "", "event JSON to run (alternative to reading from stdin)")
6464 flag.DurationVar(&monitorInterval, "monitor-interval", 5*time.Second, "interval for monitoring zmx sessions")
6565 flag.StringVar(&logLevel, "log-level", "info", "log level: debug, info, warn, error")
......@@ -195,7 +195,7 @@ type WorkspaceRsync struct {
195195 }
196196
197197 func (w *WorkspaceRsync) Setup() error {
198- tempDir, err := os.MkdirTemp("", "pico-ci-*")
198+ tempDir, err := os.MkdirTemp("", "pici-*")
199199 if err != nil {
200200 return err
201201 }
......@@ -207,7 +207,7 @@ func (w *WorkspaceRsync) Setup() error {
207207 var cmd *exec.Cmd
208208 if w.Cfg.KeyLocation != "" {
209209 sshcmd := fmt.Sprintf(
210- "-i %s -o IdentitiesOnly=yes -o CertificateFile %s",
210+ "-F ~/.ssh/config -i %s -o IdentitiesOnly=yes -o CertificateFile %s",
211211 w.Cfg.KeyLocation,
212212 w.Cfg.CertificateLocation,
213213 )
......@@ -359,9 +359,9 @@ func eventHandler(cfg *Cfg, eventData *Event) error {
359359 // writes status as JSONL to stdout, stages artifacts, and syncs to destination.
360360 // Logs go to stderr. Compose with shell tools to route status:
361361 //
362-// pico-ci monitor | ssh pipe.pico.sh "pub build.status -b=false"
363-// pico-ci monitor | while read -r line; do curl -sd"$line" $WEBHOOK; done
364-// pico-ci monitor > status.jsonl
362+// pici monitor | ssh pipe.pico.sh "pub build.status -b=false"
363+// pici monitor | while read -r line; do curl -sd"$line" $WEBHOOK; done
364+// pici monitor > status.jsonl
365365 func runMonitor(cfg *Cfg) error {
366366 log := cfg.Logger.With("cmd", "monitor")
367367
......@@ -789,7 +789,7 @@ func syncArtifacts(cfg *Cfg, log *slog.Logger) error {
789789 }
790790 log.Debug("syncing artifacts", "repo", entry.Name(), "job_id", repoEntry.Name(), "dest", event.ArtifactDest)
791791 sshArgs := fmt.Sprintf(
792- "-i %s -o IdentitiesOnly=yes -o CertificateFile %s",
792+ "-F ~/.ssh/config -i %s -o IdentitiesOnly=yes -o CertificateFile %s",
793793 cfg.KeyLocation,
794794 cfg.CertificateLocation,
795795 )