\r\n\n\n### Steps to reproduce\n\n.\n\n### Expected behavior\n\n_No response_\n\n### System Info\n\n```shell\n\"next-d126cf9e35\"\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [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.\n- [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]",[2867,2870],{"name":2868,"color":2869},"bug","d73a4a",{"name":2871,"color":2872},"ui","46DEA2",4677,"woodpecker-ci","woodpecker","open","`tag` pipelines are missing avatar and commit title","2025-01-12T06:19:42Z","https://github.com/woodpecker-ci/woodpecker/issues/4677",0.7060268,{"description":2882,"labels":2883,"number":2887,"owner":2874,"repository":2875,"state":2876,"title":2888,"updated_at":2889,"url":2890,"score":2891},"### Component\n\nserver\n\n### Describe the bug\n\nWhile testing the ntfy plugin to send notifications after pipeline failure I wanted to use `CI_STEP_NAME` but it doesn't return a value. The other CI_STEP_* variables are not returning anything either.\r\n\r\nHere a example pipeline. I have added `CI_WORKFLOW_NAME` which does work.\r\n```\r\npipeline:\r\n deploy:\r\n image: alpine:latest\r\n commands:\r\n - exit 1\r\n\r\n notify_on_failure:\r\n image: codeberg.org/l-x/woodpecker-ntfy\r\n settings:\r\n url: https://ntfy.example.com/ci\r\n token:\r\n from_secret: ntfy_token\r\n title: Build failure\r\n priority: urgent\r\n icon: https://woodpecker-ci.org/img/logo.svg\r\n tags: x, robot\r\n message: >\r\n Workflow: ${CI_WORKFLOW_NAME}\r\n Step name: ${CI_STEP_NAME}\r\n Step status: ${CI_STEP_STATUS}\r\n Step started: ${CI_STEP_STARTED}\r\n Step finished: ${CI_STEP_FINISHED}\r\n when:\r\n status: [ failure ]\r\n```\n\n### System Info\n\n```shell\nVersion: next-02913fa7\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [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.\n- [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]\n- [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).",[2884],{"name":2885,"color":2886},"enhancement","7E1FE4",1760,"`CI_STEP_*` environment variables do not return values","2024-10-05T23:54:48Z","https://github.com/woodpecker-ci/woodpecker/issues/1760",0.7254324,{"description":2893,"labels":2894,"number":2899,"owner":2874,"repository":2875,"state":2876,"title":2900,"updated_at":2901,"url":2902,"score":2903},"we currently don't have a concept how to translate/interpreter the services into \"local backend\" and just ignore them.\r\n\r\nwe should have it that way so it works very similar to what the user know with docker or kube backend.",[2895,2896],{"name":2885,"color":2886},{"name":2897,"color":2898},"backend/local","bfdadc",3095,"Implement services for local backend","2025-02-10T13:40:24Z","https://github.com/woodpecker-ci/woodpecker/issues/3095",0.7296271,{"description":2905,"labels":2906,"number":2911,"owner":2874,"repository":2875,"state":2876,"title":2912,"updated_at":2913,"url":2914,"score":2915},"### Component\r\n\r\nserver, agent\r\n\r\n### Describe the bug\r\n\r\nThis is mainly a summary issue of https://github.com/woodpecker-ci/woodpecker/issues/833, https://github.com/woodpecker-ci/woodpecker/issues/2062, https://github.com/woodpecker-ci/woodpecker/issues/2911\rand #4349\n\r\nI've been trying to debug this without real success.\r\n\r\nI've been using the local backend, and can do the following observations:\r\n- cancel pipeline while running: completely broken. The commands are finished, the step is marked as success, the pipeline too (https://github.com/woodpecker-ci/woodpecker/issues/2911)\r\n- cancelling a pending pipeline seems to work for me\r\n\r\nOn ci.woodpecker-ci.org, I can see (uses docker backend):\r\n- cancel pending pipeline, agent is available: the pipeline starts anyways (this probably is #2062)\r\n- cancel running pipeline: works in general, but new status is failing but should be killed\r\n\r\n### System Info\r\n\r\n```shell\r\nnext\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\r\n- [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.\r\n- [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]\r\n- [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).",[2907,2908],{"name":2868,"color":2869},{"name":2909,"color":2910},"summary","C3DC73",2875,"Fix pipeline cancelling","2024-12-08T12:10:57Z","https://github.com/woodpecker-ci/woodpecker/issues/2875",0.73875356,{"description":2917,"labels":2918,"number":2920,"owner":2874,"repository":2875,"state":2921,"title":2922,"updated_at":2923,"url":2924,"score":2925},"### Component\r\n\r\nagent\r\n\r\n### Describe the bug\r\n\r\nWhen having a backend error in the config, i.e. a malformed env var, the step and build are marked as successful even though they should be marked as \"failed\". \r\n\r\n\r\n\r\n\r\nk8s backend\r\n\r\n\r\n### System Info\r\n\r\n```shell\r\n{\"source\":\"https://github.com/woodpecker-ci/woodpecker\",\"version\":\"next-6ab9f802\"}\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\r\n- [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.\r\n- [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]\r\n- [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).",[2919],{"name":2868,"color":2869},1871,"closed","Build is marked as \"successful\" although a backend error occurred","2025-01-10T21:25:48Z","https://github.com/woodpecker-ci/woodpecker/issues/1871",0.6493652,{"description":2927,"labels":2928,"number":2932,"owner":2874,"repository":2875,"state":2921,"title":2933,"updated_at":2934,"url":2935,"score":2936},"### Clear and concise description of the problem\r\n\r\nI'm trying to run a container image build step in my pipeline that uses [buildah](https://quay.io/repository/buildah/stable?tab=info). I'm running into a lot of permission errors like this:\r\n\r\n```\r\ntime=\"2023-10-07T19:59:26Z\" level=error msg=\"writing \\\"0 0 4294967295\\\\n\\\" to /proc/17/uid_map: write /proc/17/uid_map: operation not permitted\"\r\ntime=\"2023-10-07T19:59:26Z\" level=error msg=\"(Unable to determine exit status)\"\r\n```\r\n\r\nAfter some experimentation with podman and buildah containers on my cluster, I have determined that I need to configure a few different settings at the Pod level for this to work:\r\n\r\n- `metadata.annotations`: I need to be able to set `container.apparmor.security.beta.kubernetes.io/\u003Ccontainer_name>` to use a custom apparmor profile for my buildah container. I would like to use the `WOODPECKER_BACKEND_K8S_POD_ANNOTATIONS` env variable, but since the container names are randomly generated I'm not sure how to make this work.\r\n- `spec.securityContext`: The only way I have found to make buildah work is to run it as non-root. This means that I need to set `runAsUser`, `runAsGroup`, and `fsGroup` on the Pod level `securityContext` (not the container level).\r\n\r\n### Suggested solution\r\n\r\nAdding support for `securityContext` seems like it should be fairly straightforward. We could just follow that same approach that is currently used for `resources`, `nodeSelector`, etc. [documented here](https://woodpecker-ci.org/docs/next/administration/backends/kubernetes#resources).\r\n\r\nThe AppArmor profile is trickier since the container name needs to be included in the annotation key. I'm imagining a configuration like `backend_options.kubernetes.appArmorProfile` that could take all of the possible values for the annotation [documented here](https://kubernetes.io/docs/tutorials/security/apparmor/). Then, the pod generation logic would just look for this configuration and add the appropriate annotation if it's found.\r\n\r\n### Alternative\r\n\r\nI could disable AppArmor entirely, but that's not really advisable for a production environment. I could also try to find a way to get the buildah container running as root (it should be possible), but again, that's not ideal from a security perspective.\r\n\r\n### Additional context\r\n\r\nThis is somewhat of a follow up from #2510. I'm trying to get Woodpecker to run on my kubeadm/CRI-O based cluster running on Debian which I believe makes me some kind of leprechaun/unicorn/lochness monster. There definitely aren't many of us out there.\r\n\r\n### Validations\r\n\r\n- [X] Checked that the feature isn't part of the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]\r\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\r\n- [X] Check that there isn't already an [issue](https://github.com/woodpecker-ci/woodpecker/issues) that request the same feature to avoid creating a duplicate.",[2929,2930],{"name":2885,"color":2886},{"name":2931,"color":2898},"backend/kubernetes",2545,"Support AppArmor annotations and securityContext in kubernetes backend","2024-01-12T22:32:26Z","https://github.com/woodpecker-ci/woodpecker/issues/2545",0.69093686,{"description":2938,"labels":2939,"number":2941,"owner":2874,"repository":2875,"state":2921,"title":2942,"updated_at":2943,"url":2944,"score":2945},"### Component\n\nserver\n\n### Describe the bug\n\nTrying out woodpecker, my docker-compose file:\n```\nservices:\n woodpecker-server:\n image: woodpeckerci/woodpecker-server:v3\n ports:\n - 8000:8000\n volumes:\n - woodpecker-server-data:/var/lib/woodpecker/\n environment:\n - WOODPECKER_OPEN=true\n - WOODPECKER_HOST=http://192.168.10.162:8000\n\nvolumes:\n woodpecker-server-data:\n```\n\nWhen running with `docker compose up`, I get the following:\n```\n~/projects/foss/woodpecker$ docker compose up\n[+] Running 1/1\n ✔ Container woodpecker-woodpecker-server-1 Created 0.1s \nAttaching to woodpecker-server-1\nwoodpecker-server-1 | {\"level\":\"info\",\"time\":\"2025-03-07T05:42:55Z\",\"message\":\"log level: info\"}\nwoodpecker-server-1 | {\"level\":\"warn\",\"time\":\"2025-03-07T05:42:55Z\",\"message\":\"no sqlite3 file found, will create one at '/var/lib/woodpecker/woodpecker.sqlite'\"}\nwoodpecker-server-1 | {\"level\":\"error\",\"error\":\"can't setup store: could not migrate datastore: unable to open database file: no such file or directory\",\"time\":\"2025-03-07T05:42:55Z\",\"message\":\"error running server\"}\nwoodpecker-server-1 exited with code 0\n~/projects/foss/woodpecker$ \n```\n\nAlso, I doubled checked the volume dir, and there is no files there:\n```\nroot@[REDACTED]:/var/lib/docker/volumes/woodpecker_woodpecker-server-data/_data# ls -la\ntotal 0\ndrwxr-xr-x. 1 root root 0 Mar 5 04:50 .\ndrwx-----x. 1 root root 10 Mar 7 18:37 ..\nroot@[REDACTED]:/var/lib/docker/volumes/woodpecker_woodpecker-server-data/_data# \n```\n\n\n### Steps to reproduce\n\n1. Woodperker with docker (configuration from docs) & agent entry removed. (only service)\n2. `docker compose up`\n3. Observe the error\n\n### Expected behavior\n\n_No response_\n\n### System Info\n\n```shell\nDocker version 28.0.1, build 068a01e\n```\n\n### Additional context\n\n**However**, when running with `woodpeckerci/woodpecker-server:v3-alpine` image - this issue goes away.\n\n### Validations\n\n- [x] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [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.\n- [x] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/versions]",[2940],{"name":2868,"color":2869},4939,"Fresh run with docker results in \"unable to open database file\"","2025-03-18T16:47:23Z","https://github.com/woodpecker-ci/woodpecker/issues/4939",0.71105,{"description":2947,"labels":2948,"number":2956,"owner":2874,"repository":2875,"state":2921,"title":2957,"updated_at":2958,"url":2959,"score":2960},"### Component\r\n\r\nserver\r\n\r\n### Describe the bug\r\n\r\nAfter upgrading the server from `v0.15` to `v1.0` woodpecker only returns 404 and the following entries are continuously written to the log output\r\n\r\n```\r\n{\r\n \"level\":\"fatal\",\r\n \"error\":\"error to create migrations table: pq: relation \\\"UQE_migrations_name\\\" already exists\",\r\n \"time\":\"2023-07-26T22:49:03Z\",\r\n \"message\":\"could not migrate datastore\"\r\n}\r\n```\r\n\r\nNo other changes were made besides the update of the docker image.\r\n\r\n### System Info\r\n\r\n```shell\r\n- docker-compose version - 1.29.2\r\n- Docker Engine version - 23.0.5\r\n\r\nContainers:\r\n- docker.io/woodpeckerci/woodpecker-server:v1.0\r\n- registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.6-2 (PG-14)\r\n\r\nENV Settings:\r\n\r\nWOODPECKER_OPEN=True\r\nWOODPECKER_SERVER_ADDR=0.0.0.0:8000\r\nWOODPECKER_GRPC_ADDR=0.0.0.0:9000\r\nWOODPECKER_ADMIN=admin\r\nWOODPECKER_DOCKER_CONFIG=\r\nWOODPECKER_LOG_LEVEL=info\r\nWOODPECKER_HOST=https://woodpecker.my.tld\r\nWOODPECKER_SESSION_EXPIRES=24h\r\nWOODPECKER_AGENT_SECRET=xxxxxx\r\nWOODPECKER_DATABASE_DRIVER=postgres\r\nWOODPECKER_DATABASE_DATASOURCE=postgres://xxxxxx:xxxxxx@db/woodpecker?sslmode=disable&application_name=woodpecker\r\nWOODPECKER_GITEA=True\r\nWOODPECKER_GITEA_URL=https://forgejo.my.tld\r\nWOODPECKER_GITEA_CLIENT=xxxxxx\r\nWOODPECKER_GITEA_SECRET=xxxxxx\r\n```\r\n\r\n\r\n### Additional context\r\n\r\ntrace log:\r\n```\r\n{\r\n \"time\":\"2023-07-26T23:22:17Z\",\r\n \"caller\":\"/woodpecker/src/github.com/woodpecker-ci/woodpecker/cmd/server/server.go:82\",\r\n \"message\":\"LogLevel = trace\"\r\n}\r\n{\r\n \"level\":\"trace\",\r\n \"time\":\"2023-07-26T23:22:17Z\",\r\n \"caller\":\"/woodpecker/src/github.com/woodpecker-ci/woodpecker/cmd/server/setup.go:232\",\r\n \"message\":\"Forge (gitea) opts: gitea.Opts{URL:\\\"https://forgejo.my.tld\\\", Client:\\\"xxxxxx\\\", Secret:\\\"xxxxxx\\\", SkipVerify:false}\"\r\n}\r\n{\r\n \"level\":\"trace\",\r\n \"time\":\"2023-07-26T23:22:17Z\",\r\n \"caller\":\"/woodpecker/src/github.com/woodpecker-ci/woodpecker/cmd/server/setup.go:87\",\r\n \"message\":\"setup datastore: store.Opts{Driver:\\\"postgres\\\", Config:\\\"postgres://xxxxxx:xxxxxx@db/woodpecker?sslmode=disable&application_name=woodpecker\\\", XORM:store.XORM{Log:false, ShowSQL:false}}\"\r\n}\r\n{\r\n \"level\":\"fatal\",\r\n \"error\":\"error to create migrations table: pq: relation \\\"UQE_migrations_name\\\" already exists\",\r\n \"time\":\"2023-07-26T23:22:17Z\",\r\n \"caller\":\"/woodpecker/src/github.com/woodpecker-ci/woodpecker/cmd/server/setup.go:94\",\r\n \"message\":\"could not migrate datastore\"\r\n}\r\n```\r\n### Validations\r\n\r\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\r\n- [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.\r\n- [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]\r\n- [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).\r\n\r\n----\r\n*upstream issue: https://gitea.com/xorm/xorm/issues/2317*",[2949,2950,2953],{"name":2868,"color":2869},{"name":2951,"color":2952},"server","5D7A92",{"name":2954,"color":2955},"dependencies","006b75",2038,"pq: relation \"UQE_migrations_name\" already exists","2023-12-19T02:30:47Z","https://github.com/woodpecker-ci/woodpecker/issues/2038",0.7222401,{"description":2962,"labels":2963,"number":2968,"owner":2874,"repository":2875,"state":2921,"title":2969,"updated_at":2970,"url":2971,"score":2972},"### Component\n\nagent\n\n### Describe the bug\n\nAgent image builds with `next-*` version instead of tag/release. Server version is OK.\n\n### System Info\n\n```shell\n{\"level\":\"info\",\"time\":\"2023-08-17T11:47:41Z\",\"message\":\"Starting Woodpecker server with version '1.0.2'\"}\r\n{\"level\":\"info\",\"time\":\"2023-08-17T12:01:26Z\",\"message\":\"Starting Woodpecker agent with version 'next-d9e06696' and backend 'kubernetes' using platform 'linux/amd64' running up to 1 pipelines in parallel\"}\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [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.\n- [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]\n- [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).",[2964,2965],{"name":2868,"color":2869},{"name":2966,"color":2967},"build","6AB8BA",2236,"Incorrect version of agent","2023-08-18T14:39:20Z","https://github.com/woodpecker-ci/woodpecker/issues/2236",0.729095,{"description":2974,"labels":2975,"number":2977,"owner":2874,"repository":2875,"state":2921,"title":2978,"updated_at":2979,"url":2980,"score":2981},"### Component\n\nagent\n\n### Describe the bug\n\nBy default netrc credentials (i.e. git credentials) are not injected into builds unless\r\n\r\n- the repo is set to trusted (which can only be done by admins)\r\n- \"Only inject netrc credentials into trusted containers\" is unchecked\r\n\r\nHowever, the latter does not work as executing a \"git push\" back to the checked out repo does not work when **the option is unchecked**.\r\nIt only works if the repo is set to \"trusted\" - which cannot be enabled by a normal user.\r\n\r\nShowcasing this in an example repo is hard as normal users cannot open the settings of a repo.\r\nI've tested this multiple times in an example repo toggling different options on and off and running a simple `git push` at the end (after a dummy modification).\r\n\r\nAlso I think the current docs are wrong\r\n\r\n> Cloning pipeline step may need git credentials. They are injected via netrc. By default, they're only injected if this option is enabled, the repo is trusted ([see above](#trusted)) or the image is a trusted clone image. If you uncheck the option, git credentials will be injected into any container in clone step.\r\n\r\nI think it should read as:\r\n\r\n\"By default, they're only injected if this option is enabled **and** the repo is trusted - or if the \"inject\" option is unchecked.\"\r\n\r\nAlso \"git credentials will be injected into any container in clone step\" -> should probably be \"into any container **in addition** to the 'clone' step\". \n\n### System Info\n\n```shell\n`next-8629a418f8`\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [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.\n- [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]\n- [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).",[2976],{"name":2885,"color":2886},2583,"Injecting netrc credentials into non-trusted containers does not work","2024-11-10T15:42:36Z","https://github.com/woodpecker-ci/woodpecker/issues/2583",0.7328351,["Reactive",2983],{},["Set"],["ShallowReactive",2986],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$frnxV3qc1NOg_CcKdBPcQgJRq27SwO_uj9xQWuwmD_SY":-1},"/woodpecker-ci/woodpecker/3689"]