diff --git a/deprecation-policy.md b/deprecation-policy.md index b67bc8b688d..3490109f5a6 100644 --- a/deprecation-policy.md +++ b/deprecation-policy.md @@ -21,7 +21,7 @@ A "deprecation event" would coincide with a release. a.) docs b.) release notes c.) command help (if applicable) -d.) annotated-skaffold.yaml (if applicable) +d.) https://skaffold.dev/docs/references/yaml/ (if applicable) 2. if applicable, [from the kubernetes policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-a-flag-or-cli): > Rule #6: Deprecated CLI elements must emit warnings (optionally disable) when used. diff --git a/docs/content/en/docs/concepts/_index.md b/docs/content/en/docs/concepts/_index.md index 11eabff7dc4..af8af802bf3 100755 --- a/docs/content/en/docs/concepts/_index.md +++ b/docs/content/en/docs/concepts/_index.md @@ -25,8 +25,7 @@ read the configuration file from the current directory. | `deploy` | Specifies how Skaffold deploys artifacts. Skaffold supports using `kubectl`, `helm`, or `kustomize` to deploy artifacts. See [Deployers](/docs/how-tos/deployers) for more information. | | `profiles`| Profile is a set of settings that, when activated, overrides the current configuration. You can use Profile to override the `build`, `test` and `deploy` sections. | -You can learn more about the syntax of `skaffold.yaml` at -[`skaffold.yaml References`](https://github.com/GoogleContainerTools/skaffold/blob/master/examples/annotated-skaffold.yaml). +You can [learn more](/docs/references/yaml) about the syntax of `skaffold.yaml`. ## Global configuration (~/.skaffold/config) diff --git a/docs/content/en/docs/how-tos/builders/_index.md b/docs/content/en/docs/how-tos/builders/_index.md index 080ff02f894..8e225bb5c05 100755 --- a/docs/content/en/docs/how-tos/builders/_index.md +++ b/docs/content/en/docs/how-tos/builders/_index.md @@ -21,7 +21,7 @@ controls how Skaffold builds artifacts. To use a specific tool for building artifacts, add the value representing the tool and options for using the tool to the `build` section. For a detailed discussion on Skaffold configuration, see [Skaffold Concepts: Configuration](/docs/concepts/#configuration) and -[skaffold.yaml References](https://github.com/GoogleContainerTools/skaffold/blob/master/examples/annotated-skaffold.yaml). +[skaffold.yaml References](/docs/references/yaml). ## Dockerfile locally with Docker diff --git a/docs/content/en/docs/how-tos/deployers/_index.md b/docs/content/en/docs/how-tos/deployers/_index.md index 8fd382adfcf..5766685969f 100755 --- a/docs/content/en/docs/how-tos/deployers/_index.md +++ b/docs/content/en/docs/how-tos/deployers/_index.md @@ -24,7 +24,7 @@ controls how Skaffold builds artifacts. To use a specific tool for deploying artifacts, add the value representing the tool and options for using the tool to the `build` section. For a detailed discussion on Skaffold configuration, see [Skaffold Concepts: Configuration](/docs/concepts/#configuration) and -[Skaffold.yaml References](https://github.com/GoogleContainerTools/skaffold/blob/master/examples/annotated-skaffold.yaml). +[Skaffold.yaml References](/docs/references/yaml). ## Deploying with kubectl diff --git a/docs/content/en/docs/how-tos/profiles/_index.md b/docs/content/en/docs/how-tos/profiles/_index.md index 703b0999ec0..beb54e8cfee 100644 --- a/docs/content/en/docs/how-tos/profiles/_index.md +++ b/docs/content/en/docs/how-tos/profiles/_index.md @@ -13,7 +13,7 @@ environments in your app's lifecycle, like Production or Development. You can create profiles in the `profiles` section of `skaffold.yaml`. For a detailed discussion on Skaffold configuration, see [Skaffold Concepts: Configuration](/docs/concepts/#configuration) and -[skaffold.yaml References](https://github.com/GoogleContainerTools/skaffold/blob/master/examples/annotated-skaffold.yaml). +[skaffold.yaml References](/docs/references/yaml). ## Profiles (`profiles`) diff --git a/docs/content/en/docs/how-tos/taggers/_index.md b/docs/content/en/docs/how-tos/taggers/_index.md index f1a03b8f205..36ce591b7b2 100644 --- a/docs/content/en/docs/how-tos/taggers/_index.md +++ b/docs/content/en/docs/how-tos/taggers/_index.md @@ -17,7 +17,7 @@ Tag policy is specified in the `tagPolicy` field of the `build` section of the Skaffold configuration file, `skaffold.yaml`. For a detailed discussion on Skaffold configuration, see [Skaffold Concepts: Configuration](/docs/concepts/#configuration) and -[skaffold.yaml References](https://github.com/GoogleContainerTools/skaffold/blob/master/examples/annotated-skaffold.yaml). +[skaffold.yaml References](/docs/references/yaml). ## `gitCommit`: using Git commit IDs as tags diff --git a/hack/new_version.sh b/hack/new_version.sh index e1c0b4bff5c..2235942bb91 100755 --- a/hack/new_version.sh +++ b/hack/new_version.sh @@ -43,7 +43,6 @@ goimports -w pkg/skaffold/schema/${PREV_VERSION}/upgrade*.go sed -i pkg/skaffold/schema/latest/config.go -e "s;$CURRENT_VERSION;$NEW_VERSION;g" find integration -name "skaffold.yaml" -print0 | xargs -0 -I xx sed -i xx -e "s;$CURRENT_VERSION;$NEW_VERSION;g" -sed -i integration/examples/annotated-skaffold.yaml -e "s;$CURRENT_VERSION;$NEW_VERSION;g" sed pkg/skaffold/schema/versions.go -i -e "s;\(.*\)$PREV_VERSION.Version\(.*\)$PREV_VERSION\(.*\);&\n\1$CURRENT_VERSION.Version\2$CURRENT_VERSION\3;g" sed pkg/skaffold/schema/versions.go -i -e "s;\(.*\)/$PREV_VERSION\(.*\);&\n\1/$CURRENT_VERSION\2;g" diff --git a/integration/examples/annotated-skaffold.yaml b/integration/examples/annotated-skaffold.yaml deleted file mode 100644 index cba4f108bee..00000000000 --- a/integration/examples/annotated-skaffold.yaml +++ /dev/null @@ -1,252 +0,0 @@ -apiVersion: skaffold/v1beta5 -kind: Config -# The build section has all the information needed to build images. -# It is a required section. -build: - # tagPolicy (beta) determines how Skaffold is going to tag your images. - # We provide a few strategies here, although you most likely won't need to care! - # The policy can `gitCommit` (beta), `sha256` (beta), `envTemplate` (beta) or `dateTime` (beta). - # If not specified, it defaults to `gitCommit: {}`. - tagPolicy: - # gitCommit tags the image with the git commit of your current repository. - gitCommit: {} - - # sha256 tags the image with the checksum of the built image (image id). - # sha256: {} - - # envTemplate tags the image with a configurable template string. - # The template must be in the golang text/template syntax: https://golang.org/pkg/text/template/ - # The template is compiled and executed against the current environment, - # with those variables injected: - # IMAGE_NAME | Name of the image being built, as supplied in the artifacts section. - # Example - # envTemplate: - # template: "{{.RELEASE}}-{{.IMAGE_NAME}}" - - # dateTime tags the image with the build timestamp. - # The format can be overridden with golang formats, see: https://golang.org/pkg/time/#Time.Format - # Default format is "2006-01-02_15-04-05.999_MST - # The timezone is by default the local timezone, this can be overridden, see https://golang.org/pkg/time/#Time.LoadLocation - # dateTime: - # format: "2006-01-02" - # timezone: "UTC" - - # artifacts is a list of the actual images you're going to be building - # you can include as many as you want here. - artifacts: - # The name of the image to be built. - - image: gcr.io/k8s-skaffold/skaffold-example - # The path to your dockerfile context. Defaults to ".". - context: ../examples/getting-started - # Skaffold can sync local files with remote pods (alpha) instead - # of rebuilding the whole artifact's image. This is a mapping - # of local files to sync to remote folders. - # sync: - # '*.py': . - - # Each artifact is of a given type among: `docker` (beta), `bazel` (beta), `jibMaven` (alpha) and `jibGradle` (alpha). - # If not specified, it defaults to `docker: {}`. - docker: - # Dockerfile's location relative to workspace. Defaults to "Dockerfile" - dockerfile: Dockerfile - # Key/value arguements passed to the docker build. - buildArgs: - key1: "value1" - key2: "value2" - # Images to consider as cache sources - cacheFrom: - - golang:1.10.1-alpine3.7 - - alpine:3.7 - # Dockerfile target name to build. - # target: stageName - - # bazel requires bazel CLI to be installed and the artifacts sources to - # contain Bazel configuration files. - # bazel: - # target: //:skaffold_example.tar - # additional args to pass to `bazel build` - # args: - # - "arg1" - # - "arg2" - - # jibMaven builds containers using the Jib plugin for Maven. - # jibMaven: - # module: modulename # selects which maven module to build, for a multimodule project - # profile: profilename # selects which maven profile to activate - # args: # additional arguments to pass to maven - # - "arg1" - # - "arg2" - - # jibGradle builds containers using the Jib plugin for Gradle. - # jibGradle: - # project: projectname # selects which gradle project to build - # args: # additional arguments to pass to gradle - # - "arg1" - # - "arg2" - -# This next section is where you'll put your specific builder configuration. - # Valid builders are `local` (beta), `googleCloudBuild` (beta) and `kaniko` (beta). - # Defaults to `local: {}` - - # Pushing the images can be skipped. If no value is specified, it'll default to - # `true` on minikube or Docker for Desktop, for even faster build and deploy cycles. - # `false` on other types of kubernetes clusters that require pushing the images. - # skaffold defers to your ~/.docker/config for authentication information. - # If you're using Google Container Registry, make sure that you have gcloud and - # docker-credentials-helper-gcr configured correctly. - # - # By default, the local builder connects to the Docker daemon with Go code to build - # images. If `useDockerCLI` is set, skaffold will simply shell out to the docker CLI. - # `useBuildkit` can also be set to activate the experimental BuildKit feature. - # - # local: - # false by default for local clusters, true for remote clusters - # push: false - # useDockerCLI: false - # useBuildkit: false - - # Docker and Jib artifacts can be built on Google Cloud Build. The projectId then needs - # to be provided and the currently logged user should be given permissions to trigger - # new builds on Cloud Build. - # If the projectId is not provided, Skaffold will try to guess it from the image name. - # For eg. If the artifact image name is gcr.io/myproject/image, then Skaffold will use - # the `myproject` GCP project. - # All the other parameters are also optional. The default values are listed here: - # googleCloudBuild: - # projectId: YOUR_PROJECT - # diskSizeGb: 200 - # machineType: "N1_HIGHCPU_8"|"N1_HIGHCPU_32" - # timeout: 10000s - # dockerImage: gcr.io/cloud-builders/docker - # mavenImage: gcr.io/cloud-builders/mvn - # gradleImage: gcr.io/cloud-builders/gradle - - # Docker artifacts can be built on a Kubernetes cluster with Kaniko. - # Exactly one buildContext must be specified to use kaniko - # If localDir is specified, skaffold will mount sources directly via a emptyDir volume - # If gcsBucket is specified, skaffold will send sources to the GCS bucket provided - # Kaniko also needs access to a service account to push the final image. - # See https://github.com/GoogleContainerTools/kaniko#running-kaniko-in-a-kubernetes-cluster - # If cache is specified, kaniko will use a remote cache which will speed up builds. - # A cache repo can be specified to store cached layers, otherwise one will be inferred - # from the image name. See https://github.com/GoogleContainerTools/kaniko#caching - # - # Additional flags can be specified as a list. To see all additional flags, visit: - # https://github.com/GoogleContainerTools/kaniko#additional-flags - # - # kaniko: - # buildContext: - # gcsBucket: k8s-skaffold - # localDir: {} - # cache: - # repo: gcr.io/my-project/skaffold/cache - # flags: - # - --aditional-flag - # pullSecret: /a/secret/path/serviceaccount.json - # pullSecretName: kaniko-secret - # namespace: default - # timeout: 20m - # image: defaults to the latest released version of `gcr.io/kaniko-project/executor` - # dockerConfig: - # path: path to the docker config.json - # secretName: docker-cfg - -# The test section has all the information needed to test images. -test: - # For each image listed here, Skaffold will run a series of structure tests using - # the [Container Structure Tests](https://github.com/GoogleContainerTools/container-structure-test) - # project - # - image: gcr.io/k8s-skaffold/skaffold-example - # structureTests: - # - ./test/* - -# The deploy section has all the information needed to deploy. -deploy: - # The type of the deployment method can be `kubectl` (beta), `helm` (beta) or `kustomize` (beta). - - # The kubectl deployer uses a client side `kubectl apply` to apply the manifests to the cluster. - # You'll need a kubectl CLI version installed that's compatible with your cluster. - kubectl: - # manifests to deploy from files. - manifests: - - ../examples/getting-started/k8s-* - # kubectl can be passed additional option flags either on every command (Global), - # on creations (Apply) or deletions (Delete). - # flags: - # global: [""] - # apply: [""] - # delete: [""] - - # manifests to deploy from remote cluster. - # The path to where these manifests live in remote kubernetes cluster. - # Example - # remoteManifests: - # - deployment/web-app1 - # - namespace:deployment/web-app2 - - # kustomize: - # path: . - # kustomize deploys manifests with kubectl. - # kubectl can be passed additional option flags either on every command (Global), - # on creations (Apply) or deletions (Delete). - # flags: - # global: [""] - # apply: [""] - # delete: [""] - - # helm: - # helm releases to deploy. - # releases: - # - name: skaffold-helm - # chartPath: skaffold-helm - # valuesFiles: - # - first-values-file.yaml - # - second-values-file.yaml - # values: - # image: skaffold-helm - # namespace: skaffold - # version: "" - # recreatePods: false - # # set to true if you need to skip "helm dep build". Necessary for use with remote chart. - # skipBuildDependencies: false - # - # # setValues get appended to the helm deploy with --set. - # setValues: - # key: "value" - # - # # overrides builds an override values.yaml file to run with the helm deploy - # overrides: - # some: - # key: someValue - # - # # packaged section allows to package chart setting specific version - # # and/or appVersion using "helm package" command. - # packaged: - # # version is passed to "helm package --version" flag. - # # Note that you can specify both static string or dynamic template. - # version: {{ .CHART_VERSION }}-dirty - # # appVersion is passed to "helm package --app-version" flag. - # # Note that you can specify both static string or dynamic template. - # appVersion: {{ .CHART_VERSION }}-dirty - -# profiles (beta) section has all the profile information which can be used to override any build or deploy configuration -profiles: - - name: gcb - build: - googleCloudBuild: - projectId: k8s-skaffold - - name: other - # profiles can also patch some values using standard JSON patch notation - patches: - # This profile will replace the `dockerfile` value of the first artifact by `Dockerfile.DEV` - - path: /build/artifacts/0/docker/dockerfile - value: Dockerfile.DEV - # profiles can be auto-activated by external factors, like environment variables - # kubeContext value or depending on which skaffold command is run. - activation: - # Auto-activate this profile if the DEBUG env variable is set to `true` AND the kubeContext is `ctx1` - # - env: DEBUG=true - # kubeContext: ctx1 - # Auto-activate if the skaffold command is `skaffold run` OR if the kubeContext is NOT `ctx2` - # - command: run - # - kubeContext: "!ctx2" diff --git a/integration/run_test.go b/integration/run_test.go index f5d653aba40..cc0aedeb8d9 100644 --- a/integration/run_test.go +++ b/integration/run_test.go @@ -99,11 +99,6 @@ func TestRun(t *testing.T) { description: "microservices", dir: "examples/microservices", deployments: []string{"leeroy-app", "leeroy-web"}, - }, { - description: "annotated-skaffold", - dir: "examples", - filename: "annotated-skaffold.yaml", - pods: []string{"getting-started"}, }, { description: "envTagger", dir: "examples/tagging-with-environment-variables",