Commit graph

111 commits

Author SHA1 Message Date
renovate[bot] b60b922514
fix(deps): update module github.com/antonmedv/expr to v1.15.1 (#2400) 2023-09-09 15:14:41 +02:00
renovate[bot] 6d59bd1130
fix(deps): update module github.com/prometheus/client_golang to v1.16.0 (#2403)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2023-09-09 14:25:25 +02:00
renovate[bot] f925d35283
fix(deps): update module github.com/urfave/cli/v2 to v2.25.7 (#2391) 2023-09-09 14:04:59 +02:00
renovate[bot] 2ccbe2d532
fix(deps): update module google.golang.org/protobuf to v1.31.0 (#2409)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-09 13:40:36 +02:00
renovate[bot] af73526cbc
fix(deps): update kubernetes packages to v0.28.1 (#2399)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-09 10:01:54 +02:00
renovate[bot] 23f61fcc30
fix(deps): update module github.com/swaggo/swag to v1.16.2 (#2390)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/swaggo/swag](https://togithub.com/swaggo/swag) | require |
patch | `v1.16.1` -> `v1.16.2` |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the
Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>swaggo/swag (github.com/swaggo/swag)</summary>

### [`v1.16.2`](https://togithub.com/swaggo/swag/releases/tag/v1.16.2)

[Compare
Source](https://togithub.com/swaggo/swag/compare/v1.16.1...v1.16.2)

#### Changelog

- [`f05ccdc`](https://togithub.com/swaggo/swag/commit/f05ccdc) add byte
check before and after file is formatted
([#&#8203;1637](https://togithub.com/swaggo/swag/issues/1637))
- [`7534a13`](https://togithub.com/swaggo/swag/commit/7534a13) add cli
flag --pdl to determine whether parse operations in dependency
([#&#8203;1605](https://togithub.com/swaggo/swag/issues/1605))
- [`21d34e2`](https://togithub.com/swaggo/swag/commit/21d34e2) add
retract to fix proxy cache caused by accidentally pushed tags
([#&#8203;1562](https://togithub.com/swaggo/swag/issues/1562))
- [`b2f325f`](https://togithub.com/swaggo/swag/commit/b2f325f)
chore(deps): bump github.com/gin-gonic/gin
([#&#8203;1598](https://togithub.com/swaggo/swag/issues/1598))
- [`8e5b314`](https://togithub.com/swaggo/swag/commit/8e5b314)
chore(deps): bump github.com/gin-gonic/gin in /example/celler
([#&#8203;1599](https://togithub.com/swaggo/swag/issues/1599))
- [`c8372f6`](https://togithub.com/swaggo/swag/commit/c8372f6)
chore(deps): bump github.com/gin-gonic/gin in /example/go-module-support
([#&#8203;1600](https://togithub.com/swaggo/swag/issues/1600))
- [`23c9b5c`](https://togithub.com/swaggo/swag/commit/23c9b5c)
chore(deps): bump gopkg.in/yaml.v3
([#&#8203;1663](https://togithub.com/swaggo/swag/issues/1663))
- [`8ebf32f`](https://togithub.com/swaggo/swag/commit/8ebf32f)
docs(readme): fix param brace
([#&#8203;1647](https://togithub.com/swaggo/swag/issues/1647))
- [`27b27bd`](https://togithub.com/swaggo/swag/commit/27b27bd)
enchancement: report which property is triggering a parsing error
([#&#8203;1439](https://togithub.com/swaggo/swag/issues/1439))
- [`d0f9dc5`](https://togithub.com/swaggo/swag/commit/d0f9dc5) feat: add
--packagePrefix=P for only parse packages matched by prefix P
([#&#8203;1582](https://togithub.com/swaggo/swag/issues/1582))
- [`1bf0078`](https://togithub.com/swaggo/swag/commit/1bf0078) feat:
global security
([#&#8203;1620](https://togithub.com/swaggo/swag/issues/1620))
- [`9f128b4`](https://togithub.com/swaggo/swag/commit/9f128b4) feat:
preserve file permission when write formatted files
([#&#8203;1636](https://togithub.com/swaggo/swag/issues/1636))
- [`ea35767`](https://togithub.com/swaggo/swag/commit/ea35767) fix bug:
enums of underscored number
([#&#8203;1581](https://togithub.com/swaggo/swag/issues/1581))
- [`0cee1c5`](https://togithub.com/swaggo/swag/commit/0cee1c5) fix
required params parsing for routes with multiple paths and multiple
params ([#&#8203;1621](https://togithub.com/swaggo/swag/issues/1621))
- [`e73a0d0`](https://togithub.com/swaggo/swag/commit/e73a0d0) fix using
tab (\t) as separator for custom type names
([#&#8203;1594](https://togithub.com/swaggo/swag/issues/1594))
- [`4536bf2`](https://togithub.com/swaggo/swag/commit/4536bf2) fix:
enums in body got parse incorrectly
([#&#8203;1625](https://togithub.com/swaggo/swag/issues/1625))
- [`e749ad5`](https://togithub.com/swaggo/swag/commit/e749ad5) fix: lint
error for generated docs.go
([#&#8203;1583](https://togithub.com/swaggo/swag/issues/1583))
- [`575963e`](https://togithub.com/swaggo/swag/commit/575963e) parse
binary literal const
([#&#8203;1593](https://togithub.com/swaggo/swag/issues/1593))
- [`fe971d2`](https://togithub.com/swaggo/swag/commit/fe971d2) parser:
if all tags negate return true on no hits
([#&#8203;1624](https://togithub.com/swaggo/swag/issues/1624))
- [`e9d0aa5`](https://togithub.com/swaggo/swag/commit/e9d0aa5) yaml.v3
security patch
([#&#8203;1664](https://togithub.com/swaggo/swag/issues/1664))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/woodpecker-ci/woodpecker).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44My4wIiwidXBkYXRlZEluVmVyIjoiMzYuODMuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-09 09:02:00 +02:00
renovate[bot] 41f6ecfa1b
fix(deps): update module github.com/stretchr/testify to v1.8.4 (#2389) 2023-09-09 08:29:30 +02:00
renovate[bot] acb6ee0fcf
fix(deps): update module github.com/caddyserver/certmagic to v0.19.2 (#2401)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2023-09-09 00:16:52 +02:00
renovate[bot] d10db8991c
fix(deps): update module github.com/mattn/go-sqlite3 to v1.14.17 (#2387) 2023-09-08 18:27:21 +02:00
renovate[bot] e4225a5caf
fix(deps): update module github.com/google/uuid to v1.3.1 (#2386) 2023-09-08 17:52:00 +02:00
renovate[bot] 0a2aa3fb2d
fix(deps): update module github.com/moby/moby to v20.10.25+incompatible (#2388)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-08 16:40:30 +02:00
renovate[bot] 49773da33a
fix(deps): update module github.com/docker/docker to v20.10.25+incompatible (#2385)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-08 15:10:02 +02:00
renovate[bot] b1092bafde
fix(deps): update module github.com/docker/cli to v20.10.25+incompatible (#2384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-08 13:27:19 +02:00
renovate[bot] d7000e06e0
fix(deps): update module github.com/alessio/shellescape to v1.4.2 (#2381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2023-09-08 10:39:25 +02:00
renovate[bot] 70e7571607
fix(deps): update golang.org/x/exp digest to 9212866 (#2380)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-08 09:55:21 +02:00
6543 f337d31455
bump github.com/6543/logfile-open ... (#2240)
to make woodpecker compile on windows again


---
*Sponsored by Kithara Software GmbH*
2023-08-18 15:35:12 +02:00
Harry Pidcock e4ff041882
Improve agent rpc retry logic with exponential backoff (#2205)
Existing retry logic was a simple second delay, replacing it with a
exponential backoff.
Initial delay is 10ms up to 10s for the max delay. In the future this
should be made configurable.

With an extended max delay it becomes important to notice context
cancelation, so this now also selects on both the delay and context
done.
2023-08-18 15:13:13 +02:00
qwerty287 6e0def58a1
Switch to upstream ttlcache (#2187)
We've been using https://github.com/lafriks/ttlcache but it's archived.
It does work with the upstream library too, so its better to use it.
2023-08-10 09:17:12 +02:00
6543 11ba724bbf
bump xorm.io to db7c2640627d (#2185)
pull got merged so we can switch back to upstream
2023-08-10 02:39:41 +02:00
6543 db057b8d82
Release file lock on USR1 signal (#2151)
close #2136
2023-08-08 08:47:45 +02:00
6543 17ab945825
Fix 'add-orgs' migration (#2117)
close  #2096

~~blocked by https://gitea.com/xorm/xorm/pulls/2320~~
2023-08-08 00:16:50 +03:00
6543 3d4758578a
Add opt save global log output to file (#2115)
close  #1933

---------
*Sponsored by Kithara Software GmbH*
2023-08-07 20:47:30 +02:00
6543 4d2f824fb8
fix docs nits (#2025) 2023-07-21 21:56:24 +02:00
6543 d1213afdc8
[Docs] use redocusaurus to display swagger file (#1818)
https://redocusaurus.vercel.app/

followup of  #1782

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-06-04 05:07:39 +02:00
Martin W. Kirst 14177635b6
Update swagger API specification (#1782)
# Summary

This PR drops the outdated former swagger.yaml/json and introduced
automatic API document generation from Go code.
The generated code is also used to generate documentation/markdown for
the community page,
as well as enable the Woodpecker server to serve a Swagger Web UI for
manual tinkering.

I did opt-in for gin-swagger, a middleware for the Gin framework, to
ease implementation and have a sophisticated output.
This middleware only produces Swagger v2 specs. AFAIK the newer OpenApi
3x tooling is not yet that mature,
so I guess that's fine for now.

## Implemenation notes

- former swagger.json files removed
- former // swagger godocs removed
- introduced new dependency gin-swagger, which uses godoc annotations on
top of Gin Handler functions.
- reworked Makefile to automatically generate Go code for the server
- introduce new dependency go-swagger, to generate Markdown for
documentation purposes
- add a Swagger Web UI, incl. capabilities for manual API exploration
- consider relative root paths in the implementation
- write documentation for all exposed API endpoints
- incl. API docs in the community website (auto-generated)
- provide developer documentation, for the Woodpecker authors
- no other existing logic/code was intentionally changed

---------

close #292

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2023-06-03 21:38:36 +02:00
Patrick Schratz 3d0338315f
Revert to docker 20.10.x for API 1.41 compatibility (#1792)
fix #1786

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-06-02 15:09:38 +02:00
qwerty287 dc3f7d61ea
Update Gin (#1797)
Fixes the security issue (we aren't affected)

Closes #1756
2023-06-01 08:25:17 +02:00
qwerty287 94e63b43f2
Update github.com/docker/distribution (#1749)
Update github.com/docker/distribution to 2.8.2

https://github.com/distribution/distribution/releases/tag/v2.8.2
https://github.com/advisories/GHSA-hqxw-f8mx-cpmw
2023-05-14 12:48:32 +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
Anbraten 188123ea74
Update dependencies (#1744) 2023-05-11 00:28:02 +02:00
6543 204d05f447
Implement YAML Map Merge, Overrides, and Sequence Merge Support (#1720)
close  #1192
2023-04-29 14:49:41 +02:00
Lauris BH 46452fbd84
Update Go dependencies and minimal Go version to 1.20 (#1650)
Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
2023-03-21 00:48:15 +01:00
Lauris BH f1f722645c
Update dependencies golang/x libs (#1612) 2023-03-10 19:23:07 +01:00
6543 18d3139e9e
Use modern error handling and enforce it via lint (#1327)
Co-authored-by: Anbraten <anton@ju60.de>
2023-02-02 00:08:02 +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 fc4af44b43
router: create apiBase (#1442)
- refactor to dedup string `api`
- bump golang.org/x/next
2022-12-21 16:16:36 +01:00
6543 e8490a757f
GenerateScript should not return encoded script (#1397)
followup to #1395
2022-11-06 13:36:34 +01:00
qwerty287 8f183c82a8
Support changed files for Gitea PRs (#1342)
- add tests to fetch changed files
- ignore error if gitea version is to low
- adjust docs accordingly

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-10-28 19:17:30 +02:00
Joonhyeok Ahn (Joon) 186aee61cf
Check if repo exists before creating pipeline (#1297)
Close #1257

make sure the repo exists first before triggering the pipeline
2022-10-22 01:34:11 +02:00
qwerty287 38198f83c4
Update all dependencies (#1291) 2022-10-19 10:15:58 +02:00
6543 9fae0dafaa
Update dep moby & golang.org/x/text (#1263)
* CVE-2022-36109
* CVE-2022-32149
2022-10-14 13:01:06 +02:00
Anbraten 287800ac62
Add when evaluate filter (#1213)
closes #312 
closes #224
closes #963

Have a look for

https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md
2022-10-06 01:49:23 +02:00
[X] b4d89a1cce
Add ability to trigger manual builds (#1156)
closes #83 
closes #240 

Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-09-27 11:05:00 +02:00
6543 afb02d2dd5
Update golang.org/x/net dep 2022-09-14 07:32:06 +02:00
Anbraten 3b0263442a
Adding initial version of Kubernetes backend (#552)
Co-authored-by: laszlocph <laszlo@laszlo.cloud>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Rynoxx <rynoxx@grid-servers.net>
2022-09-05 06:01:14 +02:00
Anbraten dbbd369c9a
Migrate to certmagic (#360)
closes #219
closes #850

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2022-09-04 03:24:42 +02:00
6543 383f273392
Add cron feature (#934)
https://woodpecker-ci.org/docs/usage/cron

Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2022-09-01 00:36:32 +02:00
6543 d3eea72663
Bump deps (#1125)
* upgrade to codeberg.org/6543/go-yaml2json v0.2.1

* upgraded github.com/bmatcuk/doublestar/v4 v4.0.2 => v4.2.0

* upgraded github.com/docker/cli v20.10.14+incompatible => v20.10.17+incompatible

* upgraded github.com/docker/docker v20.10.14+incompatible => v20.10.17+incompatible

* upgraded github.com/gin-gonic/gin v1.7.7 => v1.8.1

* upgraded github.com/golang-jwt/jwt/v4 v4.4.1 => v4.4.2

* upgraded github.com/moby/moby v20.10.14+incompatible => v20.10.17+incompatible

* upgraded github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 => v0.0.0-20220808134915-39b0c02b01ae

* upgraded github.com/lafriks/ttlcache/v3 v3.1.0 => v3.2.0

* upgraded github.com/mattn/go-sqlite3 v1.14.12 => v1.14.15

* upgraded github.com/lib/pq v1.10.5 => v1.10.6

* github.com/prometheus/client_golang v1.12.1 => v1.13.0

* upgraded github.com/urfave/cli/v2 v2.5.1 => v2.11.2

* upgraded github.com/rs/zerolog v1.26.1 => v1.27.0

* upgraded golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 => v0.0.0-20220822191816-0ebed06d0094

* upgraded github.com/xanzy/go-gitlab v0.64.0 => v0.73.1

* upgraded google.golang.org/grpc v1.47.0 => v1.49.0
2022-08-25 08:09:05 +02:00
Lauris BH 1ac2c42652
Add global and organization secrets (#1027)
* Implement database changes and store methods for global and organization secrets

* Add tests for new store methods
* Add organization secret API and UI
* Add global secrets API and UI

* Add suggestions

* Update warning style

* Apply suggestions from code review

Co-authored-by: Anbraten <anton@ju60.de>

* Fix lint warning

Co-authored-by: Anbraten <anton@ju60.de>
2022-08-14 13:48:53 +02:00
Lauris BH 19dfc331f4
Add method to check organization membership (#1037)
* Add remote method to check organization membership
* Use named return parameters in interface
* Add membership check service
* Update Gitea SDK
2022-07-25 03:09:35 +02:00