github.com/GoogleContainerTools/skaffold@v1.39.18/pkg/skaffold/runner/v1/runner.go (about)

     1  /*
     2  Copyright 2021 The Skaffold Authors
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package v1
    18  
    19  import (
    20  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/build"
    21  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/cache"
    22  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy"
    23  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label"
    24  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/filemon"
    25  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph"
    26  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/platform"
    27  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner"
    28  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext"
    29  	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/test"
    30  )
    31  
    32  // SkaffoldRunner is responsible for running the skaffold build, test and deploy config.
    33  type SkaffoldRunner struct {
    34  	runner.Builder
    35  	runner.Pruner
    36  	tester test.Tester
    37  
    38  	deployer deploy.Deployer
    39  	monitor  filemon.Monitor
    40  	listener runner.Listener
    41  
    42  	cache              cache.Cache
    43  	changeSet          runner.ChangeSet
    44  	runCtx             *runcontext.RunContext
    45  	labeller           *label.DefaultLabeller
    46  	artifactStore      build.ArtifactStore
    47  	sourceDependencies graph.SourceDependenciesCache
    48  	platforms          platform.Resolver
    49  	devIteration       int
    50  	isLocalImage       func(imageName string) (bool, error)
    51  	hasDeployed        bool
    52  	intents            *runner.Intents
    53  }
    54  
    55  // HasDeployed returns true if this runner has deployed something.
    56  func (r *SkaffoldRunner) HasDeployed() bool {
    57  	return r.hasDeployed
    58  }