mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-28 03:10:29 +00:00
Moved all, will break pipelines up a bit more
This commit is contained in:
parent
e155bb18af
commit
6ec3e2ede2
7 changed files with 17 additions and 64 deletions
Binary file not shown.
Before Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
|
@ -82,3 +82,4 @@ pipeline:
|
|||
template: config/k8s/service.yml
|
||||
```
|
||||
|
||||
See a [detailed plugin example](/usage/bash-plugin).
|
||||
|
|
|
@ -1,63 +1,4 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
**Table of Contents** _generated with [DocToc](https://github.com/thlorenz/doctoc)_
|
||||
|
||||
- [Pipeline basics](#pipeline-basics)
|
||||
- [Activation](#activation)
|
||||
- [Configuration](#configuration)
|
||||
- [Execution](#execution)
|
||||
- [Pipelines](#pipelines)
|
||||
- [Build Steps](#build-steps)
|
||||
- [Images](#images)
|
||||
- [Images from private registries](#images-from-private-registries)
|
||||
- [GCR Registry Support](#gcr-registry-support)
|
||||
- [Parallel Execution](#parallel-execution)
|
||||
- [Conditional Pipeline Execution](#conditional-pipeline-execution)
|
||||
- [Conditional Step Execution](#conditional-step-execution)
|
||||
- [Failure Execution](#failure-execution)
|
||||
- [Services](#services)
|
||||
- [Configuration](#configuration-1)
|
||||
- [Detachment](#detachment)
|
||||
- [Initialization](#initialization)
|
||||
- [Plugins](#plugins)
|
||||
- [Plugin Isolation](#plugin-isolation)
|
||||
- [Plugin Marketplace](#plugin-marketplace)
|
||||
- [Environment variables](#environment-variables)
|
||||
- [Built-in environment variables](#built-in-environment-variables)
|
||||
- [String Substitution](#string-substitution)
|
||||
- [String Operations](#string-operations)
|
||||
- [Secrets](#secrets)
|
||||
- [Adding Secrets](#adding-secrets)
|
||||
- [Alternate Names](#alternate-names)
|
||||
- [Pull Requests](#pull-requests)
|
||||
- [Examples](#examples)
|
||||
- [Volumes](#volumes)
|
||||
- [Webhooks](#webhooks)
|
||||
- [Required Permissions](#required-permissions)
|
||||
- [Skip Commits](#skip-commits)
|
||||
- [Skip Branches](#skip-branches)
|
||||
- [Workspace](#workspace)
|
||||
- [Cloning](#cloning)
|
||||
- [Git Submodules](#git-submodules)
|
||||
- [Privileged mode](#privileged-mode)
|
||||
- [Promoting](#promoting)
|
||||
- [Triggering Deployments](#triggering-deployments)
|
||||
- [Matrix builds](#matrix-builds)
|
||||
- [Interpolation](#interpolation)
|
||||
- [Examples](#examples-1)
|
||||
- [Multi-pipeline builds](#multi-pipeline-builds)
|
||||
- [Example multi-pipeline definition](#example-multi-pipeline-definition)
|
||||
- [Flow control](#flow-control)
|
||||
- [Status lines](#status-lines)
|
||||
- [Rational](#rational)
|
||||
- [Badges](#badges)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
This document explains the process for activating and configuring a continuous delivery pipeline.
|
||||
|
||||
# Pipeline basics
|
||||
# Pipelines
|
||||
|
||||
## Activation
|
||||
|
||||
|
@ -65,7 +6,7 @@ To activate your project navigate to your account settings. You will see a list
|
|||
|
||||
Webhooks are used to trigger pipeline executions. When you push code to your repository, open a pull request, or create a tag, your version control system will automatically send a webhook to Drone which will in turn trigger pipeline execution.
|
||||
|
||||
![repository list](`repo_list.png)
|
||||
![repository list](`/images/repo_list.png)
|
||||
|
||||
## Configuration
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
This provides a brief tutorial for creating a Drone webhook plugin, using simple shell scripting, to make an http requests during the build pipeline. The below example demonstrates how we might configure a webhook plugin in the Yaml file:
|
||||
# Writing a plugin
|
||||
|
||||
This provides a brief tutorial for creating a Woodpecker webhook plugin, using simple shell scripting, to make an http requests during the build pipeline.
|
||||
|
||||
## What end users will see
|
||||
|
||||
The below example demonstrates how we might configure a webhook plugin in the Yaml file:
|
||||
|
||||
```yaml
|
||||
pipeline:
|
||||
|
@ -10,6 +16,8 @@ pipeline:
|
|||
hello world
|
||||
```
|
||||
|
||||
## 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_`.
|
||||
|
||||
```bash
|
||||
|
@ -19,8 +27,10 @@ curl \
|
|||
-X ${PLUGIN_METHOD} \
|
||||
-d ${PLUGIN_BODY} \
|
||||
${PLUGIN_URL}
|
||||
|
||||
```
|
||||
|
||||
## Package it
|
||||
|
||||
Create a Dockerfile that adds your shell script to the image, and configures the image to execute your shell script as the main entrypoint.
|
||||
|
||||
```dockerfile
|
||||
|
@ -31,7 +41,7 @@ RUN apk -Uuv add curl ca-certificates
|
|||
ENTRYPOINT /bin/script.sh
|
||||
```
|
||||
|
||||
Build and publish your plugin to the Docker registry. Once published your plugin can be shared with the broader Drone community.
|
||||
Build and publish your plugin to the Docker registry. Once published your plugin can be shared with the broader Woodpecker community.
|
||||
|
||||
```nohighlight
|
||||
docker build -t foo/webhook .
|
|
@ -5,6 +5,7 @@ copyright: 'Creative Commons Attribution-ShareAlike 4.0 International Public Lic
|
|||
nav:
|
||||
- Home: index.md
|
||||
- Server setup: server-setup.md
|
||||
- Pipelines: pipeline.md
|
||||
theme:
|
||||
name: 'material'
|
||||
logo: 'images/favicon.svg'
|
||||
|
|
Loading…
Reference in a new issue