MCPcopy Create free account
hub / github.com/DBCDK/morph / pushPaths

Function pushPaths

morph.go:677–699  ·  view source on GitHub ↗
(sshContext *ssh.SSHContext, filteredHosts []nix.Host, resultPath string)

Source from the content-addressed store, hash-verified

675}
676
677func pushPaths(sshContext *ssh.SSHContext, filteredHosts []nix.Host, resultPath string) error {
678 for _, host := range filteredHosts {
679 if host.BuildOnly {
680 fmt.Fprintf(os.Stderr, "Push is disabled for build-only host: %s\n", host.Name)
681 continue
682 }
683
684 paths, err := nix.GetPathsToPush(host, resultPath)
685 if err != nil {
686 return err
687 }
688 fmt.Fprintf(os.Stderr, "Pushing paths to %v (%v@%v):\n", host.Name, host.TargetUser, host.TargetHost)
689 for _, path := range paths {
690 fmt.Fprintf(os.Stderr, "\t* %s\n", path)
691 }
692 err = nix.Push(sshContext, host, paths...)
693 if err != nil {
694 return err
695 }
696 }
697
698 return nil
699}
700
701func secretsUpload(ctx ssh.Context, filteredHosts []nix.Host, phase *string) error {
702 // upload secrets

Callers 2

execPushFunction · 0.85
execDeployFunction · 0.85

Calls 2

GetPathsToPushFunction · 0.92
PushFunction · 0.92

Tested by

no test coverage detected