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

Skaffold init asks user to write skaffold.yaml #1091

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Oct 4, 2018

Fix #1090

Signed-off-by: David Gageot [email protected]

@codecov-io
Copy link

codecov-io commented Oct 4, 2018

Codecov Report

Merging #1091 into master will decrease coverage by 0.19%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1091     +/-   ##
=========================================
- Coverage   42.43%   42.24%   -0.2%     
=========================================
  Files          72       72             
  Lines        3280     3295     +15     
=========================================
  Hits         1392     1392             
- Misses       1754     1769     +15     
  Partials      134      134
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/init.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f96420...37b2255. Read the comment docs.

reader := bufio.NewReader(os.Stdin)
confirmLoop:
for {
fmt.Fprintf(out, "Do you want to write this configuration to %s? [y/n]: ", opts.ConfigurationFile)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is breaking integration tests - we need a non-interactive way (-y):

--- FAIL: TestInit/microservices (0.02s)
    	run_test.go:352: running init: Running [skaffold init -f skaffold.yaml.out -a leeroy-app/Dockerfile=gcr.io/k8s-skaffold/leeroy-app -a leeroy-web/Dockerfile=gcr.io/k8s-skaffold/leeroy-web]: stdout apiVersion: skaffold/v1alpha4
    		kind: Config
    		build:
    		  artifacts:
    		  - image: gcr.io/k8s-skaffold/leeroy-app
    		    context: leeroy-app
    		  - image: gcr.io/k8s-skaffold/leeroy-web
    		    context: leeroy-web
    		deploy:
    		  kubectl:
    		    manifests:
    		    - leeroy-app/kubernetes/deployment.yaml
    		    - leeroy-web/kubernetes/deployment.yaml
    		Do you want to write this configuration to skaffold.yaml.out? [y/n]: , stderr: time="2018-10-04T07:51:21Z" level=fatal msg="reading user confirmation: EOF"
    		, err: exit status 1: exit status 1, output: apiVersion: skaffold/v1alpha4
    		kind: Config
    		build:
    		  artifacts:
    		  - image: gcr.io/k8s-skaffold/leeroy-app
    		    context: leeroy-app
    		  - image: gcr.io/k8s-skaffold/leeroy-web
    		    context: leeroy-web
    		deploy:
    		  kubectl:
    		    manifests:
    		    - leeroy-app/kubernetes/deployment.yaml
    		    - leeroy-web/kubernetes/deployment.yaml
    		Do you want to write this configuration to skaffold.yaml.out? [y/n]:
    	run_test.go:342: error removing generated skaffold yaml: remove ../examples/microservices/skaffold.yaml.out: no such file or directory

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a --force that I forgot to use here.

@dgageot dgageot merged commit 3e2d5c1 into GoogleContainerTools:master Oct 4, 2018
@dgageot dgageot deleted the ask-init branch December 28, 2018 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants