(sshContext *ssh.SSHContext, hosts []nix.Host, phase *string)
| 497 | } |
| 498 | |
| 499 | func execUploadSecrets(sshContext *ssh.SSHContext, hosts []nix.Host, phase *string) error { |
| 500 | for _, host := range hosts { |
| 501 | if host.BuildOnly { |
| 502 | fmt.Fprintf(os.Stderr, "Secret upload is disabled for build-only host: %s\n", host.Name) |
| 503 | continue |
| 504 | } |
| 505 | singleHostInList := []nix.Host{host} |
| 506 | |
| 507 | err := secretsUpload(sshContext, singleHostInList, phase) |
| 508 | if err != nil { |
| 509 | return err |
| 510 | } |
| 511 | |
| 512 | if !skipHealthChecks { |
| 513 | err = healthchecks.PerformHealthChecks(sshContext, &host, timeout) |
| 514 | if err != nil { |
| 515 | fmt.Fprintln(os.Stderr) |
| 516 | fmt.Fprintln(os.Stderr, "Not uploading to additional hosts, since a host health check failed.") |
| 517 | return err |
| 518 | } |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | return nil |
| 523 | } |
| 524 | |
| 525 | func execListSecrets(hosts []nix.Host) { |
| 526 | for _, host := range hosts { |
no test coverage detected