Skip to content

Commit

Permalink
Introduce schema v1beta4 (#1535)
Browse files Browse the repository at this point in the history
Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information
dgageot authored and balopat committed Jan 29, 2019
1 parent 3084ca3 commit f723d36
Show file tree
Hide file tree
Showing 22 changed files with 488 additions and 19 deletions.
2 changes: 1 addition & 1 deletion integration/examples/annotated-skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
# tagPolicy (beta) determines how Skaffold is going to tag your images.
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/bazel/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/getting-started/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/helm-deployment/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
tagPolicy:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/hot-reload/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/jib/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/kaniko-local/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/kaniko/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/kustomize/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
deploy:
kustomize: {}
2 changes: 1 addition & 1 deletion integration/examples/microservices/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/nodejs/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/structure-tests/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/test-dev-job/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta3
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/deploy/testdata/foo/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta3
apiVersion: apps/v1beta4
kind: Deployment
metadata:
name: {{ template "foo.fullname" . }}
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/schema/latest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util"
)

const Version string = "skaffold/v1beta3"
const Version string = "skaffold/v1beta4"

// NewSkaffoldPipeline creates a SkaffoldPipeline
func NewSkaffoldPipeline() util.VersionedConfig {
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/schema/v1beta2/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package v1beta2
import (
"encoding/json"

next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util"
next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v1beta3"
"github.com/pkg/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/skaffold/schema/v1beta2/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package v1beta2
import (
"testing"

"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v1beta3"
"github.com/GoogleContainerTools/skaffold/testutil"
yaml "gopkg.in/yaml.v2"
)
Expand Down Expand Up @@ -102,7 +102,7 @@ func verityUpgrade(t *testing.T, input, output string) {
upgraded, err := pipeline.Upgrade()
testutil.CheckError(t, false, err)

expected := latest.NewSkaffoldPipeline()
expected := v1beta3.NewSkaffoldPipeline()
err = yaml.UnmarshalStrict([]byte(output), expected)

testutil.CheckErrorAndDeepEqual(t, false, err, expected, upgraded)
Expand Down
Loading

0 comments on commit f723d36

Please sign in to comment.