mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 08:06:52 +02:00
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>
This commit is contained in:
parent
baf8b962de
commit
a8c23e9771
@ -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:
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user