Skip to content

feat: introduce --output option for "fix" cmd #6849

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

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

ahmetb
Copy link
Contributor

@ahmetb ahmetb commented Nov 11, 2021

Fixes #6456.

  • introduced --output/-o (mut.exclusive with --overwrite)
  • add more examples
  • add more integration tests

@ahmetb ahmetb requested a review from a team as a code owner November 11, 2021 23:46
@ahmetb ahmetb requested a review from briandealwis November 11, 2021 23:46
@google-cla google-cla bot added the cla: yes label Nov 11, 2021
- introduced --output/-o (mut.exclusive with --overwrite)
- add more examples
- add more integration tests

Fixes GoogleContainerTools#6456.

Signed-off-by: Ahmet Alp Balkan <[email protected]>
@codecov
Copy link

codecov bot commented Nov 12, 2021

Codecov Report

Merging #6849 (f54e817) into main (290280e) will decrease coverage by 1.35%.
The diff coverage is 61.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6849      +/-   ##
==========================================
- Coverage   70.48%   69.13%   -1.36%     
==========================================
  Files         515      547      +32     
  Lines       23150    25064    +1914     
==========================================
+ Hits        16317    17327    +1010     
- Misses       5776     6574     +798     
- Partials     1057     1163     +106     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/deploy.go 52.00% <ø> (-1.85%) ⬇️
cmd/skaffold/app/cmd/dev.go 84.61% <0.00%> (ø)
cmd/skaffold/app/cmd/flags.go 91.00% <0.00%> (+0.18%) ⬆️
cmd/skaffold/app/cmd/render.go 36.66% <0.00%> (-4.72%) ⬇️
cmd/skaffold/skaffold.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/inspect_tests.go 62.50% <14.28%> (-1.14%) ⬇️
cmd/skaffold/app/cmd/fix.go 68.85% <40.00%> (-7.62%) ⬇️
cmd/skaffold/app/cmd/lint.go 42.85% <42.85%> (ø)
cmd/skaffold/app/cmd/find_configs.go 48.88% <50.00%> (+0.24%) ⬆️
cmd/skaffold/app/skaffold.go 76.19% <70.00%> (-8.43%) ⬇️
... and 163 more

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 a9d7152...f54e817. Read the comment docs.

@tejal29
Copy link
Contributor

tejal29 commented Nov 12, 2021

Testing Notes:

➜  skaffold git:(fix-output) ✗ LOCAL=true make

➜  skaffold git:(fix-output) ✗ cd examples/getting-started

➜  getting-started git:(fix-output) ✗ ../../out/skaffold fix --overwrite -o output.yaml
--overwrite and --output/-o cannot be used together

➜  getting-started git:(fix-output) ✗ ../../out/skaffold fix -o output.yaml 
New config at version skaffold/v2beta26 generated and written to output.yaml

➜  getting-started git:(fix-output) ✗ diff output.yaml skaffold.yaml 
1c1
< apiVersion: skaffold/v2beta26
---
> apiVersion: skaffold/v2beta25
9c9
<     - k8s-*
---
>       - k8s-*
➜  getting-started git:(fix-output) ✗ 

@tejal29 tejal29 merged commit 4e26ae3 into GoogleContainerTools:main Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skaffold fix should output the changed json to a file
2 participants