From 9b3669c5f1ea51666684845bfcce6cf7e8695544 Mon Sep 17 00:00:00 2001 From: Tian Feng Date: Tue, 9 May 2023 15:53:52 -0700 Subject: [PATCH] Add tunnel for image runner --- internal/imagerunner/imagerunner.go | 6 ++++++ internal/saucecloud/imagerunner.go | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/internal/imagerunner/imagerunner.go b/internal/imagerunner/imagerunner.go index 7d3963881..10796f5d6 100644 --- a/internal/imagerunner/imagerunner.go +++ b/internal/imagerunner/imagerunner.go @@ -39,6 +39,12 @@ type RunnerSpec struct { Metadata map[string]string `json:"metadata,omitempty"` Artifacts []string `json:"artifacts,omitempty"` WorkloadType string `json:"workloadType,omitempty"` + Tunnel Tunnel `json:"tunnel,omitempty"` +} + +type Tunnel struct { + Name string `json:"name,omitempty"` + Owner string `json:"owner,omitempty"` } type Container struct { diff --git a/internal/saucecloud/imagerunner.go b/internal/saucecloud/imagerunner.go index 55ae76b49..079c47515 100644 --- a/internal/saucecloud/imagerunner.go +++ b/internal/saucecloud/imagerunner.go @@ -187,6 +187,10 @@ func (r *ImgRunner) runSuite(suite imagerunner.Suite) (imagerunner.Runner, error Artifacts: suite.Artifacts, Metadata: metadata, WorkloadType: suite.Workload, + Tunnel: imagerunner.Tunnel{ + Name: r.Project.Sauce.Tunnel.Name, + Owner: r.Project.Sauce.Tunnel.Owner, + }, }) if errors.Is(err, context.DeadlineExceeded) && ctx.Err() != nil { run.Status = imagerunner.StateCancelled