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

Add Initializer Interface to skaffold to support other deployers in skaffold init #1756

Merged
merged 5 commits into from
Mar 12, 2019
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix gocritic linter
  • Loading branch information
tejal29 committed Mar 12, 2019
commit 8f974098e00403a8b6240af8d9d83f55d47b8a6f
12 changes: 8 additions & 4 deletions pkg/skaffold/initializer/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ type Config struct {
CliArtifacts []string
SkipBuild bool
Force bool
Opts *config.SkaffoldOptions
Analyze bool
Opts *config.SkaffoldOptions
}

// DoInit executes the `skaffold init` flow.
Expand Down Expand Up @@ -92,10 +92,14 @@ func DoInit(out io.Writer, c Config) error {
return fmt.Errorf("pre-existing %s found", path)
}
logrus.Debugf("%s is a valid skaffold configuration: continuing since --force=true", path)
} else if IsSupportedKubernetesFormat(path) {
return nil
}
if IsSupportedKubernetesFormat(path) {
potentialConfigs = append(potentialConfigs, path)
} else if docker.ValidateDockerfile(path) {
// try and parse dockerfile
return nil
}
// try and parse dockerfile
if docker.ValidateDockerfile(path) {
logrus.Infof("existing dockerfile found: %s", path)
dockerfiles = append(dockerfiles, path)
}
Expand Down