Use WOODPECKER_ env vars in docs (#211)

This commit is contained in:
Marian Steinbach 2021-05-31 13:31:52 +02:00 committed by GitHub
parent 8f76192b77
commit dcb96af9c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 78 additions and 78 deletions

View file

@ -94,10 +94,10 @@ This is the reference list of all environment variables available to your build
## Global environment variables ## Global environment variables
If you want specific environment variables to be available in all of your builds use the `DRONE_ENVIRONMENT` setting on the Woodpecker server. If you want specific environment variables to be available in all of your builds use the `WOODPECKER_ENVIRONMENT` setting on the Woodpecker server.
```.env ```.env
DRONE_ENVIRONMENT=first_var:value1,second_var:value2 WOODPECKER_ENVIRONMENT=first_var:value1,second_var:value2
``` ```
```.diff ```.diff
@ -105,15 +105,15 @@ services:
woodpecker-server: woodpecker-server:
image: laszlocloud/woodpecker-server:v0.9.0 image: laszlocloud/woodpecker-server:v0.9.0
environment: environment:
- DRONE_OPEN=true - WOODPECKER_OPEN=true
- DRONE_ORGS=dolores,dogpatch - WOODPECKER_ORGS=dolores,dogpatch
- DRONE_ADMIN=johnsmith,janedoe - WOODPECKER_ADMIN=johnsmith,janedoe
- DRONE_HOST=${DRONE_HOST} - WOODPECKER_HOST=${WOODPECKER_HOST}
- DRONE_GITHUB=true - WOODPECKER_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- DRONE_SECRET=${DRONE_SECRET} - WOODPECKER_SECRET=${WOODPECKER_SECRET}
+ - DRONE_ENVIRONMENT=first_var:value1,second_var:value2 + - WOODPECKER_ENVIRONMENT=first_var:value1,second_var:value2
``` ```
## String Substitution ## String Substitution
@ -172,4 +172,4 @@ pipeline:
docker: docker:
image: plugins/docker image: plugins/docker
+ tags: ${DRONE_TAG##v} + tags: ${DRONE_TAG##v}
``` ```

View file

@ -127,7 +127,7 @@ Example registry hostname matching logic:
#### Global registry setting #### Global registry setting
If you want to make available a specific private registry to all pipelines, use the `DRONE_DOCKER_CONFIG` server configuration. If you want to make available a specific private registry to all pipelines, use the `WOODPECKER_DOCKER_CONFIG` server configuration.
Point it to your server's docker config. Point it to your server's docker config.
```diff ```diff
@ -144,13 +144,13 @@ services:
- woodpecker-server-data:/var/lib/drone/ - woodpecker-server-data:/var/lib/drone/
restart: always restart: always
environment: environment:
- DRONE_OPEN=true - WOODPECKER_OPEN=true
- DRONE_HOST=${DRONE_HOST} - WOODPECKER_HOST=${WOODPECKER_HOST}
- DRONE_GITHUB=true - WOODPECKER_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- DRONE_SECRET=${DRONE_SECRET} - WOODPECKER_SECRET=${WOODPECKER_SECRET}
+ - DRONE_DOCKER_CONFIG=/home/user/.docker/config.json + - WOODPECKER_DOCKER_CONFIG=/home/user/.docker/config.json
``` ```
#### GCR Registry Support #### GCR Registry Support

View file

@ -18,12 +18,12 @@ services:
- woodpecker-server-data:/var/lib/drone/ - woodpecker-server-data:/var/lib/drone/
restart: always restart: always
environment: environment:
- DRONE_OPEN=true - WOODPECKER_OPEN=true
- DRONE_HOST=${DRONE_HOST} - WOODPECKER_HOST=${WOODPECKER_HOST}
- DRONE_GITHUB=true - WOODPECKER_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- DRONE_SECRET=${DRONE_SECRET} - WOODPECKER_SECRET=${WOODPECKER_SECRET}
woodpecker-agent: woodpecker-agent:
image: laszlocloud/woodpecker-agent:v0.9.0 image: laszlocloud/woodpecker-agent:v0.9.0
@ -34,8 +34,8 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
environment: environment:
- DRONE_SERVER=woodpecker-server:9000 - WOODPECKER_SERVER=woodpecker-server:9000
- DRONE_SECRET=${DRONE_SECRET} - WOODPECKER_SECRET=${WOODPECKER_SECRET}
volumes: volumes:
woodpecker-server-data: woodpecker-server-data:
@ -45,7 +45,7 @@ volumes:
> >
> If you have 4 agents installed and connected to the Drone server, your system will process 4 builds in parallel. > If you have 4 agents installed and connected to the Drone server, your system will process 4 builds in parallel.
> >
> You can add more agents to increase the number of parallel builds or set the agent's `DRONE_MAX_PROCS=1` environment variable to increase the number of parallel builds for that agent. > You can add more agents to increase the number of parallel builds or set the agent's `WOODPECKER_MAX_PROCS=1` environment variable to increase the number of parallel builds for that agent.
Woodpecker needs to know its own address. Woodpecker needs to know its own address.
@ -57,12 +57,12 @@ services:
woodpecker-server: woodpecker-server:
image: laszlocloud/woodpecker-server:v0.9.0 image: laszlocloud/woodpecker-server:v0.9.0
environment: environment:
- DRONE_OPEN=true - WOODPECKER_OPEN=true
+ - DRONE_HOST=${DRONE_HOST} + - WOODPECKER_HOST=${WOODPECKER_HOST}
- DRONE_GITHUB=true - WOODPECKER_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- DRONE_SECRET=${DRONE_SECRET} - WOODPECKER_SECRET=${WOODPECKER_SECRET}
``` ```
Agents require access to the host machine's Docker daemon. Agents require access to the host machine's Docker daemon.
@ -90,8 +90,8 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
environment: environment:
+ - DRONE_SERVER=woodpecker-server:9000 + - WOODPECKER_SERVER=woodpecker-server:9000
- DRONE_SECRET=${DRONE_SECRET} - WOODPECKER_SECRET=${WOODPECKER_SECRET}
``` ```
The server and agents use a shared secret to authenticate communication. The server and agents use a shared secret to authenticate communication.
@ -103,18 +103,18 @@ services:
woodpecker-server: woodpecker-server:
image: laszlocloud/woodpecker-server:v0.9.0 image: laszlocloud/woodpecker-server:v0.9.0
environment: environment:
- DRONE_OPEN=true - WOODPECKER_OPEN=true
- DRONE_HOST=${DRONE_HOST} - WOODPECKER_HOST=${WOODPECKER_HOST}
- DRONE_GITHUB=true - WOODPECKER_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
+ - DRONE_SECRET=${DRONE_SECRET} + - WOODPECKER_SECRET=${WOODPECKER_SECRET}
woodpecker-agent: woodpecker-agent:
image: laszlocloud/woodpecker-agent:v0.9.0 image: laszlocloud/woodpecker-agent:v0.9.0
environment: environment:
- DRONE_SERVER=woodpecker-server:9000 - WOODPECKER_SERVER=woodpecker-server:9000
- DRONE_DEBUG=true - WOODPECKER_DEBUG=true
+ - DRONE_SECRET=${DRONE_SECRET} + - WOODPECKER_SECRET=${WOODPECKER_SECRET}
``` ```
Registration is closed by default. Registration is closed by default.
@ -126,13 +126,13 @@ services:
woodpecker-server: woodpecker-server:
image: laszlocloud/woodpecker-server:v0.9.0 image: laszlocloud/woodpecker-server:v0.9.0
environment: environment:
+ - DRONE_OPEN=true + - WOODPECKER_OPEN=true
+ - DRONE_ORGS=dolores,dogpatch + - WOODPECKER_ORGS=dolores,dogpatch
- DRONE_HOST=${DRONE_HOST} - WOODPECKER_HOST=${WOODPECKER_HOST}
- DRONE_GITHUB=true - WOODPECKER_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- DRONE_SECRET=${DRONE_SECRET} - WOODPECKER_SECRET=${WOODPECKER_SECRET}
``` ```
Administrators should also be enumerated in your configuration. Administrators should also be enumerated in your configuration.
@ -142,14 +142,14 @@ services:
woodpecker-server: woodpecker-server:
image: laszlocloud/woodpecker-server:v0.9.0 image: laszlocloud/woodpecker-server:v0.9.0
environment: environment:
- DRONE_OPEN=true - WOODPECKER_OPEN=true
- DRONE_ORGS=dolores,dogpatch - WOODPECKER_ORGS=dolores,dogpatch
+ - DRONE_ADMIN=johnsmith,janedoe + - WOODPECKER_ADMIN=johnsmith,janedoe
- DRONE_HOST=${DRONE_HOST} - WOODPECKER_HOST=${WOODPECKER_HOST}
- DRONE_GITHUB=true - WOODPECKER_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- DRONE_SECRET=${DRONE_SECRET} - WOODPECKER_SECRET=${WOODPECKER_SECRET}
``` ```
@ -230,17 +230,17 @@ spec:
imagePullPolicy: Always imagePullPolicy: Always
name: woodpecker name: woodpecker
env: env:
- name: "DRONE_ADMIN" - name: "WOODPECKER_ADMIN"
value: "xxx" value: "xxx"
- name: "DRONE_HOST" - name: "WOODPECKER_HOST"
value: "https://xxx" value: "https://xxx"
- name: "DRONE_GITHUB" - name: "WOODPECKER_GITHUB"
value: "true" value: "true"
- name: "DRONE_GITHUB_CLIENT" - name: "WOODPECKER_GITHUB_CLIENT"
value: "xxx" value: "xxx"
- name: "DRONE_GITHUB_SECRET" - name: "WOODPECKER_GITHUB_SECRET"
value: "xxx" value: "xxx"
- name: "DRONE_SECRET" - name: "WOODPECKER_SECRET"
value: "xxx" value: "xxx"
volumeMounts: volumeMounts:
- name: sqlite-volume - name: sqlite-volume
@ -330,9 +330,9 @@ spec:
containerPort: 3000 containerPort: 3000
protocol: TCP protocol: TCP
env: env:
- name: DRONE_SERVER - name: WOODPECKER_SERVER
value: woodpecker.tools.svc.cluster.local:9000 value: woodpecker.tools.svc.cluster.local:9000
- name: DRONE_SECRET - name: WOODPECKER_SECRET
value: "xxx" value: "xxx"
resources: resources:
limits: limits:
@ -364,19 +364,19 @@ spec:
Woodpecker operates with the user's OAuth permission. Due to the coarse permission handling of Github, you may end up syncing more repos into Woodpecker than preferred. Woodpecker operates with the user's OAuth permission. Due to the coarse permission handling of Github, you may end up syncing more repos into Woodpecker than preferred.
Use the `DRONE_REPO_OWNERS` variable to filter which Github user's repos should be synced only. You typically want to put here your company's Github name. Use the `WOODPECKER_REPO_OWNERS` variable to filter which Github user's repos should be synced only. You typically want to put here your company's Github name.
```diff ```diff
services: services:
woodpecker-server: woodpecker-server:
image: laszlocloud/woodpecker-server:v0.9.0 image: laszlocloud/woodpecker-server:v0.9.0
environment: environment:
- DRONE_OPEN=true - WOODPECKER_OPEN=true
- DRONE_ORGS=dolores,dogpatch - WOODPECKER_ORGS=dolores,dogpatch
+ - DRONE_REPO_OWNERS=mycompany,mycompanyossgithubuser + - WOODPECKER_REPO_OWNERS=mycompany,mycompanyossgithubuser
- DRONE_HOST=${DRONE_HOST} - WOODPECKER_HOST=${WOODPECKER_HOST}
- DRONE_GITHUB=true - WOODPECKER_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- DRONE_SECRET=${DRONE_SECRET} - WOODPECKER_SECRET=${WOODPECKER_SECRET}
``` ```