From 73157eece97be33a1a5a6ed2b3b8895c9ec05635 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Wed, 20 Feb 2019 16:49:59 +0100 Subject: [PATCH] Also generate option tables. Signed-off-by: David Gageot --- .../en/docs/how-tos/builders/_index.md | 44 ++++----------- .../en/docs/how-tos/deployers/_index.md | 55 ++++++++----------- docs/layouts/shortcodes/schema.html | 38 +++++++++++++ 3 files changed, 70 insertions(+), 67 deletions(-) create mode 100644 docs/layouts/shortcodes/schema.html diff --git a/docs/content/en/docs/how-tos/builders/_index.md b/docs/content/en/docs/how-tos/builders/_index.md index 8e225bb5c05..23db9803934 100755 --- a/docs/content/en/docs/how-tos/builders/_index.md +++ b/docs/content/en/docs/how-tos/builders/_index.md @@ -42,11 +42,7 @@ of `skaffold.yaml`. The `local` type offers the following options: -| Option | Description | Default | -|---------------|-------------|---------| -| `push` | Should images be pushed to a registry | `false` for local clusters, `true` for remote clusters. | -| `useDockerCLI`| Uses `docker` command-line interface instead of Docker Engine APIs | `false` | -| `useBuildkit` | Uses BuildKit to build Docker images | `false` | +{{< schema root="LocalBuild" >}} The following `build` section, for example, instructs Skaffold to build a Docker image `gcr.io/k8s-skaffold/example` with the local Docker daemon: @@ -70,15 +66,7 @@ section of `skaffold.yaml`. The `googleCloudBuild` type offers the following options: -| Option | Description | Default | -|---------------|-------------|---------| -| `projectId` | **Required** The ID of your Google Cloud Platform Project | | -| `diskSizeGb` | The disk size of the VM that runs the build. See [Cloud Build API Reference: Build Options](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions) for more information | | -| `machineType` | The type of the VM that runs the build. See [Cloud Build API Reference: Build Options](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions) for more information | | -| `timeOut` | The amount of time (in seconds) that this build should be allowed to run. See [Cloud Build API Reference: Resource/Build](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#resource-build) for more information. | | -| `dockerImage` | The name of the image that will run a docker build. See [Cloud builders](https://cloud.google.com/cloud-build/docs/cloud-builders) for more information | `gcr.io/cloud-builders/docker` | -| `gradleImage` | The name of the image that will run a gradle build. See [Cloud builders](https://cloud.google.com/cloud-build/docs/cloud-builders) for more information | `gcr.io/cloud-builders/gradle` | -| `mavenImage` | The name of the image that will run a maven build. See [Cloud builders](https://cloud.google.com/cloud-build/docs/cloud-builders) for more information | `gcr.io/cloud-builders/mvn` | +{{< schema root="GoogleCloudBuild" >}} The following `build` section, for example, instructs Skaffold to build a Docker image `gcr.io/k8s-skaffold/example` with Google Cloud Build: @@ -99,13 +87,11 @@ To use Kaniko, add build type `kaniko` to the `build` section of The `kaniko` type offers the following options: -| Option | Description | Default | -|-----------------|-------------|---------| -| `buildContext` | The Kaniko build context: `gcsBucket` or `localDir` | `localDir` | -| `pullSecret` | The path to the secret key file. See [Kaniko Documentation: Running Kaniko in a Kubernetes cluster](https://github.com/GoogleContainerTools/kaniko#running-kaniko-in-a-kubernetes-cluster) for more information | | -| `pullSecretName`| The name of the Kubernetes secret for pulling the files from the build context and pushing the final image | `kaniko-secret` | -| `namespace` | The Kubernetes namespace | Current namespace in Kubernetes configuration | -| `timeout` | The amount of time (in seconds) that this build should be allowed to run | 20 minutes (`20m`) | +{{< schema root="KanikoBuild" >}} + +The `buildContext` can be either: + +{{< schema root="KanikoBuildContext" >}} The following `build` section, for example, instructs Skaffold to build a Docker image `gcr.io/k8s-skaffold/example` with Kaniko: @@ -129,18 +115,11 @@ to use Jib already. The `jibMaven` type offers the following options: -| Option | Description | Default | -|-----------------|-------------|---------| -| `args` | Additional command-line arguments for Maven | | -| `profile` | The Maven build profile to use | | -| `module` | The module to be built for a multi-module project; see below | | +{{< schema root="JibMavenArtifact" >}} The `jibGradle` type offers the following options: -| Option | Description | Default | -|-----------------|-------------|---------| -| `args` | Additional command-line arguments for Gradle | | -| `project` | The sub-project to be built for a multi-module project; see below | | +{{< schema root="JibGradleArtifact" >}} See the [Skaffold-Jib demo project](https://github.com/GoogleContainerTools/skaffold/blob/master/examples/jib/) for an example. @@ -188,10 +167,7 @@ Bazel, `bazel` field to each artifact you specify in the The `bazel` type offers the following options: -| Option | Description | -|-----------|-------------| -| `target` | **Required** The `bazel build` target to run | -| `args` | Additional args to pass to `bazel build` | +{{< schema root="BazelArtifact" >}} The following `build` section, for example, instructs Skaffold to build a Docker image `gcr.io/k8s-skaffold/example` with Bazel: diff --git a/docs/content/en/docs/how-tos/deployers/_index.md b/docs/content/en/docs/how-tos/deployers/_index.md index 5766685969f..0b930c69e7d 100755 --- a/docs/content/en/docs/how-tos/deployers/_index.md +++ b/docs/content/en/docs/how-tos/deployers/_index.md @@ -43,11 +43,11 @@ To use `kubectl`, add deploy type `kubectl` to the `deploy` section of The `kubectl` type offers the following options: -| Option | Description | Default | -|--------|-------------|---------| -|`manifests`| A list of paths to Kubernetes Manifests | `k8s/*.yaml` | -|`remoteManifests`| A list of paths to Kubernetes Manifests in remote clusters | | -|`flags`| Additional flags to pass to `kubectl`. You can specify three types of flags: