Skaffold init asks user to write skaffold.yaml#1091
Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom Oct 4, 2018
Merged
Skaffold init asks user to write skaffold.yaml#1091dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
balopat
suggested changes
Oct 4, 2018
| reader := bufio.NewReader(os.Stdin) | ||
| confirmLoop: | ||
| for { | ||
| fmt.Fprintf(out, "Do you want to write this configuration to %s? [y/n]: ", opts.ConfigurationFile) |
Contributor
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
There's a --force that I forgot to use here.
Fix GoogleContainerTools#1090 Signed-off-by: David Gageot <david@gageot.net>
balopat
approved these changes
Oct 4, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1090
Signed-off-by: David Gageot david@gageot.net