Skip to content

Commit

Permalink
[Docs] add an example for global config (#4341)
Browse files Browse the repository at this point in the history
* add an example for global config

* fix tests
  • Loading branch information
tejal29 authored Jun 18, 2020
1 parent 98af44c commit d32eec1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/content/en/docs/design/global-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ For example, to treat any context as local by default:
```bash
skaffold config set --global local-cluster true
```
This will create a global configuration file at `~/.skaffold/config` with `local-cluster` set to `true`.

{{% readfile file="samples/config/globalConfig.yaml" %}}
3 changes: 3 additions & 0 deletions docs/content/en/samples/config/globalConfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
global:
local-cluster: true
kubeContexts: []
2 changes: 1 addition & 1 deletion pkg/skaffold/schema/samples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
)

var (
ignoredSamples = []string{"structureTest.yaml", "build.sh"}
ignoredSamples = []string{"structureTest.yaml", "build.sh", "globalConfig.yaml"}
)

// Test that every example can be parsed and produces a valid
Expand Down

0 comments on commit d32eec1

Please sign in to comment.