Commit graph

56 commits

Author SHA1 Message Date
qwerty287 f56f9cb1c0
Cleanups + prefer .yaml (#3069)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-01-11 18:43:54 +01:00
qwerty287 768fd71841
Enable some linters (#3129)
Mostly those that did not require much work.

From #2960

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-09 21:35:37 +01:00
qwerty287 cd0c89ced9
Hide backend config options from TOC (#3126) 2024-01-08 18:40:43 +01:00
6543 74f6824d03
Add option to disable version check in admin web UI (#3040)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-12-27 22:16:15 +01:00
Patrick Schratz df73d2c475
Document WOODPECKER_LOG_FILE (#3022)
Missed from #2115 

Also rephrased the description a bit.

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-12-26 11:18:05 +01:00
qwerty287 dfc2c265b1
Support go plugins for forges and agent backends (#2751)
As of #2520 

Support to load new forges and agent backends at runtime using go's
plugin system. (https://pkg.go.dev/plugin)

I also added a simple example addon (a new forge which just prints log
statements), it should be removed later of course, but you can see an
example.

---------

Co-authored-by: Michalis Zampetakis <mzampetakis@gmail.com>
Co-authored-by: Anbraten <anton@ju60.de>
2023-12-20 14:26:57 +01:00
qwerty287 360b41f961
Remove separate root path config (#2943) 2023-12-13 15:51:18 +01:00
Micash b31b3e9a86
Improve code blocks in docu (#2879) 2023-11-26 19:31:05 +01:00
Micash a6d651175d
Docs: Make Github docs same format as other forges (#2866)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-24 16:21:47 +01:00
qwerty287 d284aeb545
Fix default status (#2715)
Regression #2695

probably closes #2716
2023-11-03 13:00:34 +01:00
qwerty287 abb2f280eb
Unique status for matrix (#2695)
implement this fix but with an additional field on workflows to not
change the workflow name

closes #1840 
closes #713

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-11-01 17:28:02 +01:00
Patrick Schratz 856b2ef8c7
pre-commit fixes (#2669)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2023-10-31 09:14:09 +01:00
qwerty287 aeb7bcb26a
Remove WOODPECKER_DOCS config (#2647) 2023-10-25 15:05:19 +02:00
Anbraten 66a5ba4e4f
Add prettier (#2600) 2023-10-24 14:42:05 +02:00
Martin W. Kirst 3f185d5b36
[doc] improve documentation WOODPECKER_SESSION_EXPIRES (#2603) 2023-10-18 18:26:20 +02:00
Tom Kneiphof baaf8b97e1
Fix usage of WOODPECKER_ROOT_PATH (#2485)
I had experienced some issues running Woodpecker behind a reverse-proxy,
resulting from not defining the `WOODPECKER_ROOT_PATH` environment
variable in #2477.

As suggested by @qwerty287, specifying `WOODPECKER_ROOT_PATH=/foo`
*mostly* solved the issue of running the woodpecker server at an url
like `https://example.org/foo`.
However, the webhook urls and badge urls were generated excluding the
configured `WOODPECKER_ROOT_PATH`.

This PR (mostly) fixes issues related to non-empty
`WOODPECKER_ROOT_PATH`.

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-09-22 16:43:31 +02:00
qwerty287 67b7de5cc2
Fix UI and backend paths with subpath (#1799)
I'm not sure if this is an ideal fix for this, but it seems to work for
me. If you have another idea just let me know.

Closes #1798 
Closes #1773
2023-08-07 16:05:18 +02:00
qwerty287 1a7f7a9427
Allow to disable swagger (#2093)
https://github.com/woodpecker-ci/woodpecker/issues/1944
2023-08-03 02:42:30 +02:00
Anbraten e0ed1b3e49
Change master to main (#2044) 2023-07-31 05:47:23 +02:00
lonix1 390295c844
fix: global registry docs (#2070)
The
[docs](https://woodpecker-ci.org/docs/administration/server-config#global-registry-setting)
for global registry are missing the part that shows that the docker
config must be mounted.

I mounted to `root`'s home directory, as that is the user running the
container.
2023-07-31 04:17:07 +02:00
Robert Kaussow 443c23c58a
Use global logger for xorm logs and add options (#1997)
Please let me know if this goes in the right direction. Needs some tests and docs.
2023-07-15 01:15:13 +02:00
qwerty287 570f5044e8
Drop support for Bitbucket Server (#1994)
Closes #1962
2023-07-13 15:47:25 +02:00
Robert Kaussow fe7eb64bf9
Add option to read grpc-secret from file (#1972) 2023-07-10 23:53:02 +02:00
Martin W. Kirst 2c1fc4b500
support custom .JS and .CSS files for custom banner messages (white-labeling) (#1781)
This PR introduces two new server configuration options, for providing a
custom .JS and .CSS file.
These can be used to show custom banner messages, add
environment-dependent signals, or simply a corporate logo.

### Motivation (what problem I try to solve)

I'm operating Woodpecker in multiple k8s clusters for different
environments.
When having multiple browser tabs open, I prefer strong indicators for
each environment.
E.g. a red "PROD" banner, or just a blue "QA" banner.
Also, we sometimes need to have the chance for maintenance, and instead
of broadcasting emails,
I prefer a banner message, stating something like: "Heads-up: there's a
planned downtime, next Friday, blabla...".

Also, I like to have the firm's logo visible, which makes Woodpecker
look more like an integral part of our platform.

### Implementation notes

* Two new config options are introduced ```WOODPECKER_CUSTOM_CSS_FILE```
and ```WOODPECKER_CUSTOM_JS_FILE```
* I've piggy-bagged the existing handler for assets, as it seemed to me
a minimally invasive approach
* the option along with an example is documented
* a simple unit test for the Gin-handler ensures some regression safety
* no extra dependencies are introduced

### Visual example

The documented example will look like this.

![Screenshot 2023-05-27 at 17 00
44](https://github.com/woodpecker-ci/woodpecker/assets/1189394/8940392e-463c-4651-a1eb-f017cd3cd64d)

### Areas of uncertainty 

This is my first contribution to Woodpecker and I tried my best to align
with your conventions.
That said, I found myself uncertain about these things and would be glad
about getting feedback.

* The handler tests are somewhat different than the other ones because I
wanted to keep them simple - I hope that still matches your coding
guidelines
* caching the page sometimes will let the browser not recognize changes
and a user must reload. I'm not fully into the details of how caching is
implemented and neither can judge if it's a real problem. Another pair
of eyes would be good.
2023-07-10 12:46:35 +02:00
lonix1 45319b24cd
docs: user registration (#1925)
Further to discussion on [discord](https://discord.com/channels/838698813463724034/838698813463724037/1125412378125803612).

The docs should be clearer about:
- user registration in general, and 
- preventing registration of random users but allowing specific ones.

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-07-07 05:31:19 +02:00
qwerty287 9dc839b946
Fix default value (#1916)
From #1784 and #1898
2023-07-02 10:50:59 +02:00
qwerty287 3033abc3b4
Add own workflow model (#1784)
Closes #1287

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-06-27 18:01:18 +02:00
Thomas Anderson 0c3021473f
Added Woodpecker Host Config used for Webhooks (#1869)
When SCM and Woodpecker are deployed in the same cluster, I want that
SCM requests Woodpecker directly by internal URL.


![Webhook-host-diagram](https://github.com/woodpecker-ci/woodpecker/assets/127358482/c4689d55-839a-4731-95b3-5734ba561e5f)
 
This PR adds optional URL used for Webhook calls.
2023-06-18 14:47:40 +02:00
qwerty287 2ccf7c6f1a
Drop Gogs support (#1752)
Gogs support is broken (and we won't fix it because we don't care about
it...) because it does not support OAuth, at least after we introduced
the new Vue UI.

See:

77d830d5b5/server/forge/gogs/gogs.go (L84)

This route is not present in the new UI.
2023-05-14 10:34:05 +02:00
meak 41a50ae915
Allow to configure port for SSL (#1735)
Co-authored-by: Mehdi Katranji <hello@mek.yt>
Co-authored-by: Lauris BH <lauris@nix.lv>
2023-05-11 06:11:10 +02:00
qwerty287 b90e7904a5
Support path prefix (#1714)
closes #1636 
closes #1429
supersedes #1586

Uses a different approach: just take the index.html compiled by vite and
replace the paths to js and other files using regex. This is not
compatible with the dev proxy which is also the reason why we can't use
go templates for this.
2023-04-29 17:51:50 +02:00
qwerty287 f582ad3159
Various enhancements in configuration (#1645)
- backends: move to cli flags instead of os.Getenv
- ssh: support 2fa with key and password
- allow to set grpc jwt secret (solves todo)
- allow to set default and max timeout (solves todo)

Closes https://github.com/woodpecker-ci/woodpecker/issues/896
Closes https://github.com/woodpecker-ci/woodpecker/issues/1131
2023-03-19 20:24:43 +01:00
qwerty287 37dc8a46e0
Drop coding support (#1644)
Coding support is likely broken and nobody will ever fix it. Also it
looks like nobody wants to use it, otherwise we would have get some bug
reports.

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-03-19 09:36:04 +01:00
Alexander Matyushentsev 9288670c61
feat: expose unprotected metrics endpoint (#1614)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Anbraten <anton@ju60.de>
2023-03-12 09:41:10 +01:00
Earl Warren 7835a632e4
Define WOODPECKER_FORGE_TIMEOUT server config (#1558)
When a server such as Codeberg has unusually high response time, three
seconds may not be enough to fetch the configuration.

Signed-off-by: Earl Warren <contact@earl-warren.org>
Co-authored-by: 6543 <6543@obermui.de>
2023-02-01 18:53:19 +01:00
antomy-gc 6516a28cdd
Secrets encryption in database (#1475)
closes #101

Added secrets encryption in database

- Google TINK or simple AES as encryption mechanisms
- Keys rotation support on TINK
- Existing SecretService is wrapped by encryption layer
- Encryption can be enabled and disabled at any time

Co-authored-by: Kuzmin Ilya <ilia.kuzmin@indrive.com>
Co-authored-by: 6543 <6543@obermui.de>
2023-01-12 20:59:07 +01:00
6543 f71142d162
Pin official default clone image (#1526)
address https://github.com/woodpecker-ci/woodpecker/issues/1508#issuecomment-1368007494
2023-01-10 17:34:21 +01:00
Anbraten a3f4f3056c
disable metrics access if no token is set (#1469) 2022-12-09 18:03:43 +01:00
Josh Soref 023d03dd61
Spelling (#1405)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-09 08:12:17 +01:00
Paul Tötterman 711f12ed27
More spelling & style fixes (#1275) 2022-10-15 21:25:07 +02:00
Anbraten 605a048b58
Use versioned docs (#1145) 2022-09-01 01:52:52 +02:00
Anbraten cc30db44ac
Use asym key to sign webhooks (#916)
* use async key pair for webhooks

* fix tests

* fix linter

* improve code

* add key pair to database

* undo some changes

* more undo

* improve docs

* add api-endpoint

* add signaturne api endpoint

* fix error

* fix linting and test

* fix lint

* add test

* migration 006

* no need for migration

* replace httsign lib

* fix lint

Co-authored-by: 6543 <6543@obermui.de>
2022-06-01 20:06:27 +02:00
qwerty287 6568751320
Allow to change forge status messages (#900)
Allow to change the status message via template option

Closes https://github.com/woodpecker-ci/woodpecker/issues/855
2022-05-12 19:07:33 +02:00
Zav Shotan 7313de2b1d
Add support for superseding runs (#831)
closes #11

Added support:
1. Environment variable `WOODPECKER_DELETE_MULTIPLE_RUNS_ON_EVENTS` (Default pull_request, push)
2. Builds will be marked as killed when they "override" another build
2022-05-09 11:26:09 +02:00
Anbraten ee97977b93
Update and cleanup docs (#851)
- migrate step conditions back into pipeline syntax, but show 2-4 level in toc to be able to see `when` keywords
- create new backend section in admin docs
- update docusaurus
- remove prefix docker of container / container-image where possible
- replace terms SCM, VCS, Github with [forge](https://en.wikipedia.org/wiki/Forge_(software))
- add darkmode favicon variant
2022-04-06 17:15:28 +02:00
Johan Van de Wauw 8fa2a5efe4
Fix various typos (#835) 2022-03-09 01:44:08 +01:00
mscherer 32d56ed795
Fix links in documentation (#832) 2022-03-04 09:16:21 +01:00
Lukas Bachschwell c16d42f81e
Add missing flag and docs (#825)
* Add missing flag and docs

Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
Co-authored-by: Anbraten <anton@ju60.de>
2022-03-02 16:49:00 +01:00
Lukas Bachschwell 09e6460f95
Allow loading sensitive flags from files (#815)
With systems like docker swarm or docker compose it is usually a little awkward to manage secrets. 
There is no way to directly inject them into the environment config. So you often have to write your secrets directly into the compose file

There are hacky workarounds such as overriding the entry-point of the container and loading a script which then fetches secrets from /run/secrets and replaces the environment variables, but this becomes very difficult once we are using docker images built from "scratch" (which is a really great practice otherwise) as there is no shell or standard tooling available

This adds a *_FILE variant of their Environment config values to work around this issue.

Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2022-03-01 16:09:33 +01:00
Zav Shotan 905350fa15
Add support for default clone image environment variable (#769)
This allows for custom clone images for deployment in air-gap systems.

Co-authored-by: Zav Shotan <zshotan@bloomberg.net>
2022-02-10 17:05:19 +01:00