1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
11 "git.arvados.org/arvados.git/sdk/go/arvados"
14 type runServiceCommand struct {
20 func (runner runServiceCommand) String() string {
24 func (runner runServiceCommand) Run(ctx context.Context, fail func(error), boot *Booter) error {
25 boot.wait(ctx, runner.depends...)
28 for u = range runner.svc.InternalURLs {
30 fail(boot.RunProgram(ctx, boot.tempdir, nil, []string{"ARVADOS_SERVICE_INTERNAL_URL=" + u.String()}, "arvados-server", runner.name, "-config", boot.configfile))
35 type runGoProgram struct {
41 func (runner runGoProgram) String() string {
42 _, basename := filepath.Split(runner.src)
46 func (runner runGoProgram) Run(ctx context.Context, fail func(error), boot *Booter) error {
47 boot.wait(ctx, runner.depends...)
48 boot.RunProgram(ctx, runner.src, nil, nil, "go", "install")
52 _, basename := filepath.Split(runner.src)
53 if len(runner.svc.InternalURLs) > 0 {
54 // Run one for each URL
55 for u := range runner.svc.InternalURLs {
58 fail(boot.RunProgram(ctx, boot.tempdir, nil, []string{"ARVADOS_SERVICE_INTERNAL_URL=" + u.String()}, basename))
64 fail(boot.RunProgram(ctx, boot.tempdir, nil, nil, basename))