From a8c23e977158661cc1e5551a145852e6fa3d237a Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 19 May 2022 20:07:27 +0200 Subject: [PATCH] Update YAML notes in docs (#928) * close #517 * sed -i 's/Yaml/YAML/g' * Update docs/docs/20-usage/10-intro.md Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> --- docs/docs/20-usage/10-intro.md | 7 +++---- docs/docs/20-usage/20-pipeline-syntax.md | 10 +++++----- docs/docs/20-usage/30-matrix-builds.md | 2 +- docs/docs/20-usage/40-secrets.md | 2 +- docs/docs/20-usage/51-plugins/20-sample-plugin.md | 4 ++-- docs/docs/20-usage/60-services.md | 2 +- docs/docs/20-usage/70-volumes.md | 2 +- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/docs/docs/20-usage/10-intro.md b/docs/docs/20-usage/10-intro.md index c825533b8..327418a74 100644 --- a/docs/docs/20-usage/10-intro.md +++ b/docs/docs/20-usage/10-intro.md @@ -24,10 +24,9 @@ Webhooks are used to trigger pipeline executions. When you push code to your rep To configure your pipeline you should place a `.woodpecker.yml` file in the root of your repository. The .woodpecker.yml file is used to define your pipeline steps. It is a superset of the widely used docker-compose file format. -:::info - -Currently, only YAML 1.1 syntax is supported for pipeline configuration files. YAML 1.2 support is [planned for the future](https://github.com/woodpecker-ci/woodpecker/issues/517)! - +:::note +We support most of YAML 1.2, but preserve some behavior from 1.1 for backward compatibility. +Read more at: [https://github.com/go-yaml/yaml](https://github.com/go-yaml/yaml/tree/v3) ::: Example pipeline configuration: diff --git a/docs/docs/20-usage/20-pipeline-syntax.md b/docs/docs/20-usage/20-pipeline-syntax.md index 1d9fb32aa..505a63dc4 100644 --- a/docs/docs/20-usage/20-pipeline-syntax.md +++ b/docs/docs/20-usage/20-pipeline-syntax.md @@ -200,7 +200,7 @@ Woodpecker does not automatically upgrade container images. Example configuratio ##### Images from private registries -You must provide registry credentials on the UI in order to pull private pipeline images defined in your Yaml configuration file. +You must provide registry credentials on the UI in order to pull private pipeline images defined in your YAML configuration file. These credentials are never exposed to your pipeline, which means they cannot be used to push, and are safe to use with pull requests, for example. Pushing to a registry still require setting credentials for the appropriate plugin. @@ -278,7 +278,7 @@ For more details check the [environment docs](/docs/usage/environment/). ### `secrets` -Woodpecker provides the ability to store named parameters external to the Yaml configuration file, in a central secret store. These secrets can be passed to individual steps of the pipeline at runtime. +Woodpecker provides the ability to store named parameters external to the YAML configuration file, in a central secret store. These secrets can be passed to individual steps of the pipeline at runtime. For more details check the [secrets docs](/docs/usage/secrets/). @@ -502,7 +502,7 @@ In the above example, the `frontend` and `backend` steps are executed in paralle ### `volumes` -Woodpecker gives the ability to define Docker volumes in the Yaml. You can use this parameter to mount files or folders on the host machine into your containers. +Woodpecker gives the ability to define Docker volumes in the YAML. You can use this parameter to mount files or folders on the host machine into your containers. For more details check the [volumes docs](/docs/usage/volumes/). @@ -526,7 +526,7 @@ The workspace defines the shared volume and working directory shared by all pipe /drone/src/github.com/octocat/hello-world ``` -The workspace can be customized using the workspace block in the Yaml file: +The workspace can be customized using the workspace block in the YAML file: ```diff +workspace: @@ -663,7 +663,7 @@ pipeline: ## Privileged mode -Woodpecker gives the ability to configure privileged mode in the Yaml. You can use this parameter to launch containers with escalated capabilities. +Woodpecker gives the ability to configure privileged mode in the YAML. You can use this parameter to launch containers with escalated capabilities. > Privileged mode is only available to trusted repositories and for security reasons should only be used in private environments. See [project settings](/docs/usage/project-settings#trusted) to enable trusted mode. diff --git a/docs/docs/20-usage/30-matrix-builds.md b/docs/docs/20-usage/30-matrix-builds.md index fa2c58c3a..fa9d241c7 100644 --- a/docs/docs/20-usage/30-matrix-builds.md +++ b/docs/docs/20-usage/30-matrix-builds.md @@ -55,7 +55,7 @@ matrix: - mariadb:10.1 ``` -Example Yaml file after injecting the matrix parameters: +Example YAML file after injecting the matrix parameters: ```diff pipeline: diff --git a/docs/docs/20-usage/40-secrets.md b/docs/docs/20-usage/40-secrets.md index 195f3999a..b912d7cfa 100644 --- a/docs/docs/20-usage/40-secrets.md +++ b/docs/docs/20-usage/40-secrets.md @@ -1,6 +1,6 @@ # Secrets -Woodpecker provides the ability to store named parameters external to the Yaml configuration file, in a central secret store. These secrets can be passed to individual steps of the pipeline at runtime. +Woodpecker provides the ability to store named parameters external to the YAML configuration file, in a central secret store. These secrets can be passed to individual steps of the pipeline at runtime. Secrets are exposed to your pipeline steps and plugins as uppercase environment variables and can therefore be referenced in the commands section of your pipeline. diff --git a/docs/docs/20-usage/51-plugins/20-sample-plugin.md b/docs/docs/20-usage/51-plugins/20-sample-plugin.md index e5a3b1f87..255bc8b8e 100644 --- a/docs/docs/20-usage/51-plugins/20-sample-plugin.md +++ b/docs/docs/20-usage/51-plugins/20-sample-plugin.md @@ -4,7 +4,7 @@ This provides a brief tutorial for creating a Woodpecker webhook plugin, using s ## What end users will see -The below example demonstrates how we might configure a webhook plugin in the Yaml file: +The below example demonstrates how we might configure a webhook plugin in the YAML file: ```yaml pipeline: @@ -19,7 +19,7 @@ pipeline: ## Write the logic -Create a simple shell script that invokes curl using the Yaml configuration parameters, which are passed to the script as environment variables in uppercase and prefixed with `PLUGIN_`. +Create a simple shell script that invokes curl using the YAML configuration parameters, which are passed to the script as environment variables in uppercase and prefixed with `PLUGIN_`. ```bash #!/bin/sh diff --git a/docs/docs/20-usage/60-services.md b/docs/docs/20-usage/60-services.md index ad16737af..c0a95086d 100644 --- a/docs/docs/20-usage/60-services.md +++ b/docs/docs/20-usage/60-services.md @@ -1,6 +1,6 @@ # Services -Woodpecker provides a services section in the Yaml file used for defining service containers. The below configuration composes database and cache containers. +Woodpecker provides a services section in the YAML file used for defining service containers. The below configuration composes database and cache containers. ```diff pipeline: diff --git a/docs/docs/20-usage/70-volumes.md b/docs/docs/20-usage/70-volumes.md index a91cdf4d6..4fc69d6b8 100644 --- a/docs/docs/20-usage/70-volumes.md +++ b/docs/docs/20-usage/70-volumes.md @@ -1,6 +1,6 @@ # Volumes -Woodpecker gives the ability to define Docker volumes in the Yaml. You can use this parameter to mount files or folders on the host machine into your containers. +Woodpecker gives the ability to define Docker volumes in the YAML. You can use this parameter to mount files or folders on the host machine into your containers. :::note Volumes are only available to trusted repositories and for security reasons should only be used in private environments. See [project settings](/docs/usage/project-settings#trusted) to enable trusted mode.