@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
- package v2
17
+ package runner
18
18
19
19
import (
20
20
"context"
@@ -32,7 +32,6 @@ import (
32
32
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation"
33
33
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/output/log"
34
34
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/platform"
35
- "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner"
36
35
runcontext "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext/v2"
37
36
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest"
38
37
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/server"
@@ -81,13 +80,13 @@ func NewForConfig(ctx context.Context, runCtx *runcontext.RunContext) (*Skaffold
81
80
return nil , fmt .Errorf ("getting render output path: %w" , err )
82
81
}
83
82
84
- renderer , err := runner . GetRenderer (ctx , runCtx , hydrationDir , labeller .Labels (), runCtx .UsingLegacyHelmDeploy ())
83
+ renderer , err := GetRenderer (ctx , runCtx , hydrationDir , labeller .Labels (), runCtx .UsingLegacyHelmDeploy ())
85
84
if err != nil {
86
85
endTrace (instrumentation .TraceEndError (err ))
87
86
return nil , fmt .Errorf ("creating renderer: %w" , err )
88
87
}
89
88
90
- deployer , err = runner . GetDeployer (ctx , runCtx , labeller , hydrationDir , runCtx .UsingLegacyHelmDeploy ())
89
+ deployer , err = GetDeployer (ctx , runCtx , labeller , hydrationDir , runCtx .UsingLegacyHelmDeploy ())
91
90
if err != nil {
92
91
endTrace (instrumentation .TraceEndError (err ))
93
92
return nil , fmt .Errorf ("creating deployer: %w" , err )
@@ -99,7 +98,7 @@ func NewForConfig(ctx context.Context, runCtx *runcontext.RunContext) (*Skaffold
99
98
}
100
99
101
100
var verifier verify.Verifier
102
- verifier , err = runner . GetVerifier (ctx , runCtx , labeller )
101
+ verifier , err = GetVerifier (ctx , runCtx , labeller )
103
102
if err != nil {
104
103
endTrace (instrumentation .TraceEndError (err ))
105
104
return nil , fmt .Errorf ("creating verifier: %w" , err )
@@ -109,7 +108,7 @@ func NewForConfig(ctx context.Context, runCtx *runcontext.RunContext) (*Skaffold
109
108
// the Cluster object on the RunContext, which in turn influences whether or not we will push images.
110
109
var builder build.Builder
111
110
builder , err = build .NewBuilderMux (runCtx , store , func (p latest.Pipeline ) (build.PipelineBuilder , error ) {
112
- return runner . GetBuilder (ctx , runCtx , store , sourceDependencies , p )
111
+ return GetBuilder (ctx , runCtx , store , sourceDependencies , p )
113
112
})
114
113
if err != nil {
115
114
endTrace (instrumentation .TraceEndError (err ))
@@ -140,9 +139,9 @@ func NewForConfig(ctx context.Context, runCtx *runcontext.RunContext) (*Skaffold
140
139
return nil , fmt .Errorf ("initializing cache: %w" , err )
141
140
}
142
141
143
- builder , tester , renderer , deployer = runner . WithTimings (builder , tester , renderer , deployer , runCtx .CacheArtifacts ())
142
+ builder , tester , renderer , deployer = WithTimings (builder , tester , renderer , deployer , runCtx .CacheArtifacts ())
144
143
if runCtx .Notification () {
145
- deployer = runner . WithNotification (deployer )
144
+ deployer = WithNotification (deployer )
146
145
}
147
146
148
147
monitor := filemon .NewMonitor ()
@@ -153,16 +152,16 @@ func NewForConfig(ctx context.Context, runCtx *runcontext.RunContext) (*Skaffold
153
152
return nil , fmt .Errorf ("creating watch trigger: %w" , err )
154
153
}
155
154
156
- rbuilder := runner . NewBuilder (builder , tagger , platforms , artifactCache , runCtx )
155
+ rbuilder := NewBuilder (builder , tagger , platforms , artifactCache , runCtx )
157
156
return & SkaffoldRunner {
158
157
Builder : * rbuilder ,
159
- Pruner : runner. Pruner {Builder : builder },
158
+ Pruner : Pruner {Builder : builder },
160
159
renderer : renderer ,
161
160
tester : tester ,
162
161
deployer : deployer ,
163
162
platforms : platforms ,
164
163
monitor : monitor ,
165
- listener : runner . NewSkaffoldListener (monitor , rtrigger , sourceDependencies , intentChan ),
164
+ listener : NewSkaffoldListener (monitor , rtrigger , sourceDependencies , intentChan ),
166
165
artifactStore : store ,
167
166
sourceDependencies : sourceDependencies ,
168
167
labeller : labeller ,
@@ -174,8 +173,8 @@ func NewForConfig(ctx context.Context, runCtx *runcontext.RunContext) (*Skaffold
174
173
}, nil
175
174
}
176
175
177
- func setupIntents (runCtx * runcontext.RunContext ) (* runner. Intents , chan bool ) {
178
- intents := runner . NewIntents (runCtx .AutoBuild (), runCtx .AutoSync (), runCtx .AutoDeploy ())
176
+ func setupIntents (runCtx * runcontext.RunContext ) (* Intents , chan bool ) {
177
+ intents := NewIntents (runCtx .AutoBuild (), runCtx .AutoSync (), runCtx .AutoDeploy ())
179
178
180
179
intentChan := make (chan bool , 1 )
181
180
setupTrigger ("build" , intents .SetBuild , intents .SetAutoBuild , intents .GetAutoBuild , server .SetBuildCallback , server .SetAutoBuildCallback , intentChan )
0 commit comments