Skip to content

Commit

Permalink
Remove dab
Browse files Browse the repository at this point in the history
See issue: kubernetes#390

Remove DAB as it is hard to maintain / not much usage / DAB is still
experimental in Docker and there hasn't been much movement:
moby/moby#26876

MarkDeprecated does not work at the moment due to issue:
kubernetes#652

However, that is not a blocker as we `fatalF` within `ValidateFlags`
  • Loading branch information
cdrage committed Jun 19, 2017
1 parent ee79612 commit ffc4743
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,8 @@ func init() {
RootCmd.PersistentFlags().StringArrayVarP(&GlobalFiles, "file", "f", []string{}, "Specify an alternative compose file")
RootCmd.PersistentFlags().StringVarP(&GlobalBundle, "bundle", "b", "", "Specify a Distributed Application Bundle (DAB) file")
RootCmd.PersistentFlags().StringVar(&GlobalProvider, "provider", "kubernetes", "Specify a provider. Kubernetes or OpenShift.")

// Mark DAB / bundle as deprectated, see issue: https://github.com/kubernetes-incubator/kompose/issues/390
// As DAB is still EXPERIMENTAL
RootCmd.PersistentFlags().MarkDeprecated("bundle", "DAB / Bundle is deprecated, see: https://github.com/kubernetes-incubator/kompose/issues/390")
}
1 change: 1 addition & 0 deletions pkg/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ func ValidateFlags(bundle string, args []string, cmd *cobra.Command, opt *kobjec

if len(bundle) > 0 {
inputFormat = "bundle"
log.Fatalf("DAB / bundle (--bundle | -b) is no longer supported. See issue: https://github.com/kubernetes-incubator/kompose/issues/390")
opt.InputFiles = []string{bundle}
}

Expand Down
3 changes: 2 additions & 1 deletion script/test/cmd/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ convert::expect_failure "kompose down $KOMPOSE_ROOT/script/test/fixtures/gitlab/
convert::expect_failure "kompose convert $KOMPOSE_ROOT/script/test/fixtures/gitlab/docker-compose.yml -j" "Unknown Argument docker-gitlab.yml"

# Tests related to kompose --bundle convert usage and that setting the compose file results in a failure
convert::expect_failure "kompose -f $KOMPOSE_ROOT/script/test/fixtures/bundles/foo.yml --bundle $KOMPOSE_ROOT/script/test/fixtures/bundles/dab/docker-compose-bundle.dab convert"
# We no longer test --bundle, however, this command may come back in the future thus we are keeping the test commented
# convert::expect_failure "kompose -f $KOMPOSE_ROOT/script/test/fixtures/bundles/foo.yml --bundle $KOMPOSE_ROOT/script/test/fixtures/bundles/dab/docker-compose-bundle.dab convert"

######
# Test related to kompose --bundle convert to ensure that docker bundles are converted properly
Expand Down

0 comments on commit ffc4743

Please sign in to comment.