Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore unused deploy name #537

Merged
merged 1 commit into from
May 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/skaffold/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestParseConfig(t *testing.T) {
withTagPolicy(v1alpha2.TagPolicy{GitTagger: &v1alpha2.GitTagger{}}),
withDockerArtifact("example", ".", "Dockerfile"),
),
withDeploy("example"),
withDeploy(),
),
},
{
Expand All @@ -100,7 +100,7 @@ func TestParseConfig(t *testing.T) {
withDockerArtifact("image1", "./examples/app1", "Dockerfile.dev"),
withBazelArtifact("image2", "./examples/app2", "//:example.tar"),
),
withDeploy("example"),
withDeploy(),
),
},
{
Expand Down Expand Up @@ -146,9 +146,9 @@ func withGCBBuild(id string, ops ...func(*v1alpha2.BuildConfig)) func(*SkaffoldC
}
}

func withDeploy(name string, ops ...func(*v1alpha2.DeployConfig)) func(*SkaffoldConfig) {
func withDeploy(ops ...func(*v1alpha2.DeployConfig)) func(*SkaffoldConfig) {
return func(cfg *SkaffoldConfig) {
d := v1alpha2.DeployConfig{Name: name}
d := v1alpha2.DeployConfig{}
for _, op := range ops {
op(&d)
}
Expand Down
5 changes: 1 addition & 4 deletions pkg/skaffold/config/transform/transforms.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ package transform
import (
"fmt"

"github.com/sirupsen/logrus"

"github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants"

"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v1alpha1"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v1alpha2"
"github.com/sirupsen/logrus"
)

func ToV1Alpha2(vc util.VersionedConfig) (util.VersionedConfig, error) {
Expand Down Expand Up @@ -104,7 +102,6 @@ func ToV1Alpha2(vc util.VersionedConfig) (util.VersionedConfig, error) {
APIVersion: v1alpha2.Version,
Kind: oldConfig.Kind,
Deploy: v1alpha2.DeployConfig{
Name: oldConfig.Deploy.Name,
DeployType: v1alpha2.DeployType{
HelmDeploy: newHelmDeploy,
KubectlDeploy: newKubectlDeploy,
Expand Down
1 change: 0 additions & 1 deletion pkg/skaffold/schema/v1alpha2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ type KanikoBuild struct {

// DeployConfig contains all the configuration needed by the deploy steps
type DeployConfig struct {
Name string `yaml:"name,omitempty"`
DeployType `yaml:",inline"`
}

Expand Down