woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.29k stars 369 forks source link

Runtime error on manual pipeline execution #1905

Open MassiveBox opened 1 year ago

MassiveBox commented 1 year ago

Component

server

Describe the bug

Hello, I've recently updated my Woodpecker agent and server to the latest next version. When I pushed to my repository, I noticed the pipeline didn't start, so I triggered it manually and got an error. By following the container's logs I noticed some errors very close to the ones on https://github.com/woodpecker-ci/woodpecker/issues/1609, which I thought was weird because I have a newer version and I don't think my pipeline is wrong. I also got the same thing described in that issue of having eternally stuck pipelines which can't be stopped. My error log from back then is here: https://pasty.nikko.cf/yrmUGk.txt

In order to avoid all possibilities of user error, I deleted the containers, the databse, and installed Woodpecker from scratch. I added again the repository and ran the pipeline. These are the logs as shown by docker compose logs -f from the moment of starting Woodpecker at first install to right after I had triggered the pipeline: https://pasty.nikko.cf/4m3bum.txt

I noticed that running pipelines on other repositories worked - sort of: it ran the first step fine but hanged at the second one. I saw another couple of errors in the logs:

woodpecker-woodpecker-server-1  | {"level":"warn","error":"sql: no rows in result set","time":"2023-06-30T16:20:19Z"}
woodpecker-woodpecker-server-1  | {"level":"error","error":"database is locked","now":1688142054,"time":"2023-06-30T16:20:59Z","message":"obtain cron list"}

but I think the first is caused by the database being locked, and the database being locked is caused by the program crashing earlier. As the pipeine was stuck, Woodpecker also took a worrying amount of CPU and I had to kill it to free it because it wouldn't stop normally.

I hope this report can be helpful. Feel free to ask if you need more information.

System Info

Version: `{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-44b54db4"}`
OS (`uname -a`): `Linux p4 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux`   
Docker version: `Docker version 24.0.2, build cb74dfc`   
Compose:

# docker-compose.yml
version: '3'

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:next
    restart: always
    ports:
      - 8085:8000
    volumes:
      - ./data:/var/lib/woodpecker/
    environment:
      - WOODPECKER_OPEN=true
      - WOODPECKER_HOST=https://woodpecker.massivebox.net
      - WOODPECKER_GITEA=true
      - WOODPECKER_GITEA_URL=https://git.massivebox.net
      - WOODPECKER_GITEA_CLIENT=REDACTED
      - WOODPECKER_GITEA_SECRET=REDACTED
      - WOODPECKER_AGENT_SECRET=REDACTED
    networks:
      - internal
      - caddy
    labels:
      caddy: woodpecker.massivebox.net
      caddy.reverse_proxy: "{{upstreams 8000}}"

  woodpecker-agent:
    image: woodpeckerci/woodpecker-agent:next
    command: agent
    restart: always
    depends_on:
      - woodpecker-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WOODPECKER_SERVER=woodpecker-server:9000
      - WOODPECKER_AGENT_SECRET=REDACTED
    networks:
      - internal

networks:
  caddy:
    name: caddy
    external: true
  internal:
    internal: true


### Additional context

Configuration file: https://git.massivebox.net/ecodash/ecodash/src/branch/master/.woodpecker/.woodpecker.yml

### Validations

- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).
- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).
- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.
- [X] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
- [X] Check that this is a concrete bug. For Q&A join our [Discord Chat Server](https://discord.gg/fcMQqSMXJy) or the [Matrix room](https://matrix.to/#/#woodpecker:matrix.org).
zc-devs commented 1 year ago

Perhaps, previous working version may help as well as pipeline yaml.

MassiveBox commented 1 year ago

If you meant that as "tell me the previous version and YAML so I can help you", I'm sorry but I don't remember which version it was. It was surely on the next tag but that's the most I remember. The YAML of the pipeline is included in the "Additional context" section of my report.

If you meant that as "try an older version or another YAML to test if it works", I tried that with several versions from the next tag, published from yesterday to two months ago. My process was like this:

I've always noticed the following:

This has been consistent in all the versions I've tried. I've also tried using another database driver (mysql) but there's no difference, aside from the fact that the two aforementioned errors aren't there.

I hope all this information can help you. Thanks for your time.

zc-devs commented 1 year ago

I meant first one as "knowing previous working version and ... may help".

The YAML of the pipeline is included in the "Additional context" section of my report.

Yeah. My bad.

I doubt I can help... But still...

  1. You have two identical configs in .woodpeckerdirectory.
  2. Pipeline below works (on Kubernetes backend, custom next-556607b525 with my recent patches)
    pipeline:
    build-and-format:
    image: golang
    commands:
      - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
      - go mod tidy
      - golangci-lint run
      - env GOOS=linux GOARCH=amd64 go build -o ecodash-x86 src/main/main.go
      - env GOOS=linux GOARCH=arm go build -o ecodash-arm src/main/main.go
      - apt-get update; apt-get upgrade -y; apt-get install zip -y
      - mv ecodash-x86 ecodash; zip -r ecodash-x86.zip templates ecodash; mv ecodash ecodash-x86
      - mv ecodash-arm ecodash; zip -r ecodash-arm.zip templates ecodash; mv ecodash ecodash-arm
      - zip templates.zip -r templates
    test-second-step:
    image: alpine
    commands:
      - echo Hello

    Screenshot 2023-07-03 000821

And when I use your second step instead, I get panic. So, it seems an error in second step configuration or parsing that step. What particularly attracts my attention is file: { ecodash-x86,ecodash-arm,templates.zip }. There are curly braces. Maybe that is the reason.

woodpecker-server.log

kSzajo commented 8 months ago

I have similar issue, fresh compose

woodpecker-server  | {"level":"info","time":"2024-03-20T22:59:15Z","message":"log level: info"}
woodpecker-server  | {"level":"warn","time":"2024-03-20T22:59:15Z","message":"no sqlite3 file found, will create one at '/var/lib/woodpecker/woodpecker.sqlite'"}
woodpecker-server  | {"level":"info","time":"2024-03-20T22:59:15Z","message":"Initializing Schema"}
woodpecker-server  | {"level":"info","time":"2024-03-20T22:59:16Z","message":"starting Woodpecker server with version '2.4.0'"}
woodpecker-server  | {"level":"error","error":"stream: not found","time":"2024-03-20T23:10:56Z","message":"tail of logs failed"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976266,"time":"2024-03-20T23:11:11Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"info","time":"2024-03-20T22:59:16Z","message":"log level: info"}
woodpecker-agent   | {"level":"info","time":"2024-03-20T22:59:16Z","message":"no agent config found at '/etc/woodpecker/agent.conf', start with defaults"}
woodpecker-agent   | {"level":"warn","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 172.27.0.2:9000: connect: connection refused\"","time":"2024-03-20T22:59:16Z","message":"cannot connect to server, retrying in 2s"}
woodpecker-agent   | {"level":"error","error":"listen tcp :3000: bind: address already in use","time":"2024-03-20T22:59:18Z","message":"cannot listen on address :3000"}
woodpecker-agent   | {"level":"info","time":"2024-03-20T22:59:18Z","message":"no agent config found at '/etc/woodpecker/agent.conf', start with defaults"}
woodpecker-agent   | {"level":"info","time":"2024-03-20T22:59:18Z","message":"starting Woodpecker agent with version '2.4.0' and backend 'docker' using platform 'linux/amd64' running up to 4 pipelines in parallel"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS55CQBQMQ in store: sql: no rows in result set","time":"2024-03-20T23:11:14Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS55CQBQMQ in store: sql: no rows in result set","step-uuid":"01HSF23HNFAVKGB8ZS55CQBQMQ","time":"2024-03-20T23:11:14Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS55CQBQMQ in store: sql: no rows in result set","time":"2024-03-20T23:11:19Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS55CQBQMQ in store: sql: no rows in result set","step-uuid":"01HSF23HNFAVKGB8ZS55CQBQMQ","time":"2024-03-20T23:11:19Z","message":"fail to write pipeline log to peer"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976276,"time":"2024-03-20T23:11:21Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = sql: no rows in result set","time":"2024-03-20T23:11:57Z","message":"failed to report health"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976316,"time":"2024-03-20T23:12:01Z","message":"obtain cron list"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976326,"time":"2024-03-20T23:12:11Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","time":"2024-03-20T23:12:33Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","step-uuid":"01HSF23HNFAVKGB8ZS59TD0WD7","time":"2024-03-20T23:12:33Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = database is locked","time":"2024-03-20T23:12:36Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = database is locked","step-uuid":"01HSF23HNBXXFDWDSHX840R4KM","time":"2024-03-20T23:12:36Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","time":"2024-03-20T23:12:38Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","step-uuid":"01HSF23HNFAVKGB8ZS59TD0WD7","time":"2024-03-20T23:12:38Z","message":"fail to write pipeline log to peer"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976356,"time":"2024-03-20T23:12:41Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNBXXFDWDSHX840R4KM in store: sql: no rows in result set","time":"2024-03-20T23:12:44Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNBXXFDWDSHX840R4KM in store: sql: no rows in result set","step-uuid":"01HSF23HNBXXFDWDSHX840R4KM","time":"2024-03-20T23:12:44Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","time":"2024-03-20T23:13:13Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","step-uuid":"01HSF23HNFAVKGB8ZS59TD0WD7","time":"2024-03-20T23:13:13Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","time":"2024-03-20T23:13:18Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","step-uuid":"01HSF23HNFAVKGB8ZS59TD0WD7","time":"2024-03-20T23:13:18Z","message":"fail to write pipeline log to peer"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976396,"time":"2024-03-20T23:13:21Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","time":"2024-03-20T23:13:23Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","step-uuid":"01HSF23HNFAVKGB8ZS59TD0WD7","time":"2024-03-20T23:13:23Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","time":"2024-03-20T23:13:28Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","step-uuid":"01HSF23HNFAVKGB8ZS59TD0WD7","time":"2024-03-20T23:13:28Z","message":"fail to write pipeline log to peer"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976406,"time":"2024-03-20T23:13:31Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","time":"2024-03-20T23:13:33Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HNFAVKGB8ZS59TD0WD7 in store: sql: no rows in result set","step-uuid":"01HSF23HNFAVKGB8ZS59TD0WD7","time":"2024-03-20T23:13:33Z","message":"fail to write pipeline log to peer"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976416,"time":"2024-03-20T23:13:41Z","message":"obtain cron list"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976436,"time":"2024-03-20T23:14:01Z","message":"obtain cron list"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976446,"time":"2024-03-20T23:14:11Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","time":"2024-03-20T23:14:17Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","step-uuid":"01HSF23HN6KZPDAHZFFYPG317S","time":"2024-03-20T23:14:17Z","message":"fail to write pipeline log to peer"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976456,"time":"2024-03-20T23:14:21Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","time":"2024-03-20T23:14:22Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","step-uuid":"01HSF23HN6KZPDAHZFFYPG317S","time":"2024-03-20T23:14:22Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","time":"2024-03-20T23:14:27Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","step-uuid":"01HSF23HN6KZPDAHZFFYPG317S","time":"2024-03-20T23:14:27Z","message":"fail to write pipeline log to peer"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976466,"time":"2024-03-20T23:14:31Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","time":"2024-03-20T23:14:32Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","step-uuid":"01HSF23HN6KZPDAHZFFYPG317S","time":"2024-03-20T23:14:32Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","time":"2024-03-20T23:14:37Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","step-uuid":"01HSF23HN6KZPDAHZFFYPG317S","time":"2024-03-20T23:14:37Z","message":"fail to write pipeline log to peer"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976476,"time":"2024-03-20T23:14:41Z","message":"obtain cron list"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","time":"2024-03-20T23:14:42Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","step-uuid":"01HSF23HN6KZPDAHZFFYPG317S","time":"2024-03-20T23:14:42Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","time":"2024-03-20T23:14:47Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = could not find step with uuid 01HSF23HN6KZPDAHZFFYPG317S in store: sql: no rows in result set","step-uuid":"01HSF23HN6KZPDAHZFFYPG317S","time":"2024-03-20T23:14:47Z","message":"fail to write pipeline log to peer"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = database is locked","time":"2024-03-20T23:14:56Z","message":"grpc error: log(): code: Unknown"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = database is locked","step-uuid":"01HSF23HNBXXFDWDSHX840R4KM","time":"2024-03-20T23:14:56Z","message":"fail to write pipeline log to peer"}
woodpecker-server  | {"level":"error","repo_id":"1","pipeline_id":"2","workflow_id":"3","error":"sql: no rows in result set","time":"2024-03-20T23:14:57Z","message":"queue.Done: cannot ack workflow"}
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unknown desc = step finished with exit code 1, ","time":"2024-03-20T23:14:57Z","message":"grpc error: wait(): code: Unknown"}
woodpecker-agent   | {"level":"warn","repo":"krzys/body-empire","pipeline":"2","id":"3","error":"rpc error: code = Unknown desc = step finished with exit code 1, ","time":"2024-03-20T23:14:57Z","message":"cancel signal received"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976556,"time":"2024-03-20T23:16:01Z","message":"obtain cron list"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976576,"time":"2024-03-20T23:16:22Z","message":"obtain cron list"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976586,"time":"2024-03-20T23:16:31Z","message":"obtain cron list"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976596,"time":"2024-03-20T23:16:42Z","message":"obtain cron list"}
woodpecker-server  | {"level":"error","error":"database is locked","now":1710976616,"time":"2024-03-20T23:17:04Z","message":"obtain cron list"}
woodpecker-agent   | 2024/03/20 23:21:29 ERROR: [transport] Client received GoAway with error code ENHANCE_YOUR_CALM and debug data equal to ASCII "too_many_pings".
woodpecker-agent   | {"level":"error","error":"rpc error: code = Unavailable desc = closing transport due to: connection error: desc = \"error reading from server: EOF\", received prior goaway: code: ENHANCE_YOUR_CALM, debug data: \"too_many_pings\"","time":"2024-03-20T23:21:30Z","message":"grpc error: wait(): code: Unavailable"}

pipeline:

when:
  event: [ tag, manual ]

steps:
  - name: declare-env
    image: alpine
    commands:
      - VERSION=$(grep 'version = ' .cz.toml | sed 's/.*version = "\(.*\)"/\1/')
      - SHORT_SHA=$(echo $DRONE_COMMIT_SHA | cut -c1-7)
      - echo $VERSION >> .tags
      - echo $SHORT_SHA >> .tags
  - name: frontend:build-and-publish
    image: woodpeckerci/plugin-docker-buildx:3.2.0
    settings:
      platforms: linux/amd64
      repo: gitea.example.com/user/repo-name/frontend
      tags_file:
        - .tags
      env_file:
        - .build-env
      registry: gitea.example.com
      username: user
      password:
        from_secret: token
      custom_dns:
        - 10.10.10.1
        - 8.8.8.8
      context: ./repo-name-fe
      dockerfile: repo-name-fe/Dockerfile
      cache_from: type=local,src=/tmp/docker-cache
      cache_to: type=local,dest=/tmp/docker-cache

docker compose

  services:
  cicd:
    image: woodpeckerci/woodpecker-server:latest
    container_name: woodpecker-server
    restart: unless-stopped
    dns:
      - 10.10.10.1
      - 8.8.8.8
    volumes:
      - ./woodpecker-server-data:/var/lib/woodpecker/
    environment:
      - WOODPECKER_OPEN=$WOODPECKER_OPEN
      - WOODPECKER_HOST=$WOODPECKER_HOST
      - WOODPECKER_GITEA=$WOODPECKER_GITEA
      - WOODPECKER_GITEA_URL=$WOODPECKER_GITEA_URL
      - WOODPECKER_LOG_LEVEL=$WOODPECKER_LOG_LEVEL
      - WOODPECKER_GITEA_CLIENT=$WOODPECKER_GITEA_CLIENT
      - WOODPECKER_GITEA_SECRET=$WOODPECKER_GITEA_SECRET
      - WOODPECKER_AGENT_SECRET=$WOODPECKER_AGENT_SECRET

  woodpecker-agent:
    container_name: woodpecker-agent
    image: woodpeckerci/woodpecker-agent:latest
    dns:
      - 10.10.10.1
      - 8.8.8.8
    command: agent
    restart: unless-stopped
    depends_on:
      - cicd
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - woodpecker-cache:/tmp/docker-cache
    environment:
      - WOODPECKER_SERVER=cicd:9000
      - WOODPECKER_AGENT_SECRET=$WOODPECKER_AGENT_SECRET

volumes:
  woodpecker-cache:

agent version

                 "org.opencontainers.image.created": "2024-03-19T11:53:35Z",
                "org.opencontainers.image.revision": "21d6ea2ba6862306bf3d35e38f446022606ca811",
                "org.opencontainers.image.source": "https://github.com/woodpecker-ci/woodpecker.git",
                "org.opencontainers.image.url": "https://github.com/woodpecker-ci/woodpecker",
                "org.opencontainers.image.version": "2.4.0"

server version

                "org.opencontainers.image.created": "2024-03-19T11:53:36Z",
                "org.opencontainers.image.revision": "21d6ea2ba6862306bf3d35e38f446022606ca811",
                "org.opencontainers.image.source": "https://github.com/woodpecker-ci/woodpecker.git",
                "org.opencontainers.image.url": "https://github.com/woodpecker-ci/woodpecker",
                "org.opencontainers.image.version": "2.4.0",