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

support --compose-file - as stdin #347

Merged
merged 1 commit into from Aug 22, 2017

Conversation

Projects
None yet
7 participants
@mmariani
Contributor

mmariani commented Jul 18, 2017

As discussed in moby/moby#34036

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Jul 18, 2017

Codecov Report

Merging #347 into master will increase coverage by 0.01%.
The diff coverage is 70.83%.

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage   47.02%   47.04%   +0.01%     
==========================================
  Files         198      198              
  Lines       16336    16349      +13     
==========================================
+ Hits         7682     7691       +9     
- Misses       8260     8263       +3     
- Partials      394      395       +1

codecov-io commented Jul 18, 2017

Codecov Report

Merging #347 into master will increase coverage by 0.01%.
The diff coverage is 70.83%.

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage   47.02%   47.04%   +0.01%     
==========================================
  Files         198      198              
  Lines       16336    16349      +13     
==========================================
+ Hits         7682     7691       +9     
- Misses       8260     8263       +3     
- Partials      394      395       +1
@mmariani

This comment has been minimized.

Show comment
Hide comment
@mmariani

mmariani Jul 18, 2017

Contributor

I would have added a test but I'm pretty new at go and don't see a clean way to mock /dev/stdin.

Contributor

mmariani commented Jul 18, 2017

I would have added a test but I'm pretty new at go and don't see a clean way to mock /dev/stdin.

@dnephin

Thanks! this is a good start

Show outdated Hide outdated docs/reference/commandline/stack_deploy.md Outdated
Show outdated Hide outdated cli/command/stack/deploy_composefile.go Outdated
@mmariani

This comment has been minimized.

Show comment
Hide comment
@mmariani

mmariani Jul 24, 2017

Contributor

this one should do, thanks

Contributor

mmariani commented Jul 24, 2017

this one should do, thanks

@@ -150,15 +159,24 @@ func buildEnvironment(env []string) (map[string]string, error) {
return result, nil
}
func getConfigFile(filename string) (*composetypes.ConfigFile, error) {
bytes, err := ioutil.ReadFile(filename)
func getConfigFile(filename string, stdin io.Reader) (*composetypes.ConfigFile, error) {

This comment has been minimized.

@thaJeztah

thaJeztah Jul 24, 2017

Member

Wondering if this should just take an io.Reader in both cases @dnephin wdyt?

@thaJeztah

thaJeztah Jul 24, 2017

Member

Wondering if this should just take an io.Reader in both cases @dnephin wdyt?

This comment has been minimized.

@dnephin

dnephin Jul 26, 2017

Collaborator

Ya, that sounds like a good idea

@dnephin

dnephin Jul 26, 2017

Collaborator

Ya, that sounds like a good idea

This comment has been minimized.

@mmariani

mmariani Jul 27, 2017

Contributor

I did not do that, because it needs the filename in the return.

@mmariani

mmariani Jul 27, 2017

Contributor

I did not do that, because it needs the filename in the return.

This comment has been minimized.

@thaJeztah

thaJeztah Aug 14, 2017

Member

Ah, I see; yes, we may have to refactor some things. None of these are exported functions, so I guess we can do that in a follow up.

@thaJeztah

thaJeztah Aug 14, 2017

Member

Ah, I see; yes, we may have to refactor some things. None of these are exported functions, so I guess we can do that in a follow up.

@docker docker deleted a comment from GordonTheTurtle Aug 1, 2017

@thaJeztah

one nit, but LGTM otherwise; can you squash your commits? I think it's ok to keep the docs and code changes in the same commit

Show outdated Hide outdated cli/command/stack/deploy_composefile_test.go Outdated
@vdemeester

SGTM
@mmariani can you take care of @thaJeztah's comment (and squash your commits) ? 👼

support --compose-file - as stdin
Signed-off-by: Marco Mariani <marco.mariani@alterway.fr>
@mmariani

This comment has been minimized.

Show comment
Hide comment
@mmariani

mmariani Aug 22, 2017

Contributor

done, thanks for reminding. also updated to master

Contributor

mmariani commented Aug 22, 2017

done, thanks for reminding. also updated to master

@dnephin

LGTM

@dnephin dnephin merged commit 0d17ea2 into docker:master Aug 22, 2017

8 checks passed

ci/circleci: cross Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: shellcheck Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
ci/circleci: validate Your tests passed on CircleCI!
Details
codecov/patch 70.83% of diff hit (target 50%)
Details
codecov/project 47.04% (+0.01%) compared to 317b735
Details
dco-signed All commits are signed

@GordonTheTurtle GordonTheTurtle added this to the 17.08.0 milestone Aug 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment