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

Freeze v1beta9 config #2035

Merged
merged 1 commit into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ weight = 1
#copyright = "Skaffold"
#privacy_policy = "https://policies.google.com/privacy"
github_repo = "https://github.com/GoogleContainerTools/skaffold"
skaffold_version = "skaffold/v1beta9"
skaffold_version = "skaffold/v1beta10"

# Google Custom Search Engine ID. Remove or comment out to disable search.
gcs_engine_id = "013756393218025596041:3nojel67sum"
Expand Down
27 changes: 19 additions & 8 deletions docs/content/en/schemas/v1beta10.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@
},
"tagPolicy": {
"$ref": "#/definitions/TagPolicy",
"description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {}`.",
"x-intellij-html-description": "<em>beta</em> determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to <code>gitCommit: {}</code>."
"description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.",
"x-intellij-html-description": "<em>beta</em> determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to <code>gitCommit: {variant: Tags}</code>."
}
},
"preferredOrder": [
Expand Down Expand Up @@ -392,8 +392,8 @@
},
"tagPolicy": {
"$ref": "#/definitions/TagPolicy",
"description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {}`.",
"x-intellij-html-description": "<em>beta</em> determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to <code>gitCommit: {}</code>."
"description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.",
"x-intellij-html-description": "<em>beta</em> determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to <code>gitCommit: {variant: Tags}</code>."
}
},
"preferredOrder": [
Expand Down Expand Up @@ -430,8 +430,8 @@
},
"tagPolicy": {
"$ref": "#/definitions/TagPolicy",
"description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {}`.",
"x-intellij-html-description": "<em>beta</em> determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to <code>gitCommit: {}</code>."
"description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.",
"x-intellij-html-description": "<em>beta</em> determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to <code>gitCommit: {variant: Tags}</code>."
}
},
"preferredOrder": [
Expand Down Expand Up @@ -468,8 +468,8 @@
},
"tagPolicy": {
"$ref": "#/definitions/TagPolicy",
"description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {}`.",
"x-intellij-html-description": "<em>beta</em> determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to <code>gitCommit: {}</code>."
"description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.",
"x-intellij-html-description": "<em>beta</em> determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to <code>gitCommit: {variant: Tags}</code>."
}
},
"preferredOrder": [
Expand Down Expand Up @@ -691,6 +691,17 @@
"x-intellij-html-description": "<em>beta</em> tags images with a configurable template string."
},
"GitTagger": {
"properties": {
"variant": {
"type": "string",
"description": "determines the behavior of the git tagger. Valid variants are `Tags` (default): use git tags or fall back to abbreviated commit hash. `CommitSha`: use the full git commit sha. `AbbrevCommitSha`: use the abbreviated git commit sha.",
"x-intellij-html-description": "determines the behavior of the git tagger. Valid variants are <code>Tags</code> (default): use git tags or fall back to abbreviated commit hash. <code>CommitSha</code>: use the full git commit sha. <code>AbbrevCommitSha</code>: use the abbreviated git commit sha."
}
},
"preferredOrder": [
"variant"
],
"additionalProperties": false,
"description": "*beta* tags images with the git tag or commit of the artifact's workspace.",
"x-intellij-html-description": "<em>beta</em> tags images with the git tag or commit of the artifact's workspace."
},
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/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/jib-multimodule/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/examples/react-reload/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
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/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/testdata/build/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
local:
Expand Down
2 changes: 1 addition & 1 deletion integration/testdata/dev/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/testdata/file-sync/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
tagPolicy:
Expand Down
2 changes: 1 addition & 1 deletion integration/testdata/jib/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/testdata/kaniko-microservices/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/testdata/kaniko-sub-folder/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion integration/testdata/tagPolicy/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v1beta9
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
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/v1beta9"
const Version string = "skaffold/v1beta10"

// NewSkaffoldConfig creates a SkaffoldConfig
func NewSkaffoldConfig() util.VersionedConfig {
Expand Down
26 changes: 13 additions & 13 deletions pkg/skaffold/schema/v1beta8/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package v1beta8

import (
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util"
next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v1beta9"
pkgutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
Expand All @@ -32,13 +32,13 @@ import (
// 3. No updates
func (config *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) {
// convert Deploy (should be the same)
var newDeploy latest.DeployConfig
var newDeploy next.DeployConfig
if err := pkgutil.CloneThroughJSON(config.Deploy, &newDeploy); err != nil {
return nil, errors.Wrap(err, "converting deploy config")
}

// convert Profiles (should be the same)
var newProfiles []latest.Profile
var newProfiles []next.Profile
if config.Profiles != nil {
if err := pkgutil.CloneThroughJSON(config.Profiles, &newProfiles); err != nil {
return nil, errors.Wrap(err, "converting new profile")
Expand All @@ -52,7 +52,7 @@ func (config *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) {
}

// convert Build (should be same)
var newBuild latest.BuildConfig
var newBuild next.BuildConfig
if err := pkgutil.CloneThroughJSON(config.Build, &newBuild); err != nil {
return nil, errors.Wrap(err, "converting new build")
}
Expand All @@ -62,15 +62,15 @@ func (config *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) {
}

// convert Test (should be the same)
var newTest []*latest.TestCase
var newTest []*next.TestCase
if err := pkgutil.CloneThroughJSON(config.Test, &newTest); err != nil {
return nil, errors.Wrap(err, "converting new test")
}

return &latest.SkaffoldConfig{
APIVersion: latest.Version,
return &next.SkaffoldConfig{
APIVersion: next.Version,
Kind: config.Kind,
Pipeline: latest.Pipeline{
Pipeline: next.Pipeline{
Build: newBuild,
Test: newTest,
Deploy: newDeploy,
Expand All @@ -79,13 +79,13 @@ func (config *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) {
}, nil
}

func updateBuild(config *BuildConfig, newBuild *latest.BuildConfig) error {
func updateBuild(config *BuildConfig, newBuild *next.BuildConfig) error {
for i, a := range config.Artifacts {
if a.BuilderPlugin == nil {
continue
}
if a.BuilderPlugin.Name == "bazel" {
var ba *latest.BazelArtifact
var ba *next.BazelArtifact
contents, err := yaml.Marshal(a.BuilderPlugin.Properties)
if err != nil {
return errors.Wrap(err, "unmarshalling properties")
Expand All @@ -97,7 +97,7 @@ func updateBuild(config *BuildConfig, newBuild *latest.BuildConfig) error {
}

if a.BuilderPlugin.Name == "docker" {
var da *latest.DockerArtifact
var da *next.DockerArtifact
contents, err := yaml.Marshal(a.BuilderPlugin.Properties)
if err != nil {
return errors.Wrap(err, "unmarshalling properties")
Expand All @@ -111,7 +111,7 @@ func updateBuild(config *BuildConfig, newBuild *latest.BuildConfig) error {

if c := config.ExecutionEnvironment; c != nil {
if c.Name == "googleCloudBuild" {
var gcb *latest.GoogleCloudBuild
var gcb *next.GoogleCloudBuild
contents, err := yaml.Marshal(c.Properties)
if err != nil {
return errors.Wrap(err, "unmarshalling properties")
Expand All @@ -122,7 +122,7 @@ func updateBuild(config *BuildConfig, newBuild *latest.BuildConfig) error {
newBuild.GoogleCloudBuild = gcb
}
if c.Name == "local" {
var local *latest.LocalBuild
var local *next.LocalBuild
contents, err := yaml.Marshal(c.Properties)
if err != nil {
return errors.Wrap(err, "unmarshalling properties")
Expand Down
4 changes: 2 additions & 2 deletions pkg/skaffold/schema/v1beta8/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package v1beta8
import (
"testing"

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

expected := latest.NewSkaffoldConfig()
expected := next.NewSkaffoldConfig()
err = yaml.UnmarshalStrict([]byte(output), expected)

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