6543
b6e47a3f4a
Update deps ( #724 )
...
* update github.com/containerd/containerd v1.5.7 -> v1.5.9
* update github.com/lib/pq v1.10.3 -> v1.10.4
* update github.com/prometheus/client_golang v1.11.0 -> v1.12.0
* update github.com/rs/zerolog v1.25.0 -> v1.26.1
* update golang.org/x/crypto 2021-12-15 -> 2022-01-28
2022-01-29 16:04:50 +01:00
Anbraten
50570cba5c
Automatically determine platform of agent ( #690 )
...
* Automatically determine platform of agent
* add migration hint
* cleanup docs a bit
2022-01-17 15:19:30 +01:00
6543
2f91bdd4a0
gofumpt -w -l -extra . ( #661 )
2022-01-05 21:50:23 +01:00
6543
dec0eeeed7
Use global branch filter only on events containing branch info ( #659 )
...
- close #581
- delete unused code
- simplify code
- add check to procBuilder to fail on invalid config
2022-01-05 17:54:44 +01:00
6543
e8807c5e53
Add "woodpeckerci/plugin-docker-buildx" to privileged plugins ( #623 )
...
* refactor global const in own package
* add "woodpeckerci/plugin-docker-buildx" to privileged plugins
* add woodpeckerci/plugin-docker
2021-12-19 12:46:36 +01:00
6543
ef597eca0c
Add flag for not fetching permissions (FlatPermissions) ( #491 ) ( #625 )
...
Co-authored-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2021-12-19 12:04:29 +01:00
Anbraten
3bee9044f1
Add flag to set oauth redirect host in dev mode ( #586 )
2021-12-13 20:22:09 +01:00
Anbraten
33a657103e
hide gin output from normal starts ( #603 )
2021-12-12 22:49:30 +01:00
6543
4cbdacb21c
Nits Collected over last month ( #595 )
...
- add coverage.out
- add context queue
- fix misspell
- sanitize config: WOODPECKER_GITEA_URL
- storage backend migration should have no xorm session within migration function
2021-12-11 13:15:04 +01:00
6543
f1e2f3dcad
Add log-level option to cli ( #584 )
...
* add log-level option to cli
* use app.Before
* rm not needed
2021-12-10 21:49:22 +01:00
6543
4ea00f0035
Make cancel pipeline work again ( #585 )
...
* logger: on level debug or trace add caller to logs
* more logging
* fix cancel bug
* ignore error if occur for queue cancel
2021-12-08 23:40:00 +01:00
Lukas
680d003a29
Add linter revive ( #554 )
...
* Add linter revive
* Add underscore to variable name to prevent shadowing
* Remove unnecessary leading underscore
* Revert changes to vendor file
* export ConfigFetcher as interface
* no 'yoda conditions'
* rename envsubst
Co-authored-by: 6543 <6543@obermui.de>
2021-12-01 14:22:06 +01:00
6543
88236d8d59
godotenv use autoload everywhere ( #548 )
2021-11-27 03:01:06 +01:00
6543
5e6b38e0e7
Server obtain remote from glob config not from context ( #540 )
2021-11-26 13:01:54 +01:00
6543
8b476e7722
Simplify web router code ( #541 )
2021-11-26 09:50:56 +01:00
Anbraten
c1a8884d62
Add backend selection for agent ( #463 )
...
- add backend selection option
- by default it will auto-detect a backend
2021-11-26 03:34:48 +01:00
6543
ff8ad5bb83
Fix registry delete ( #532 )
...
- Make make it possible to delete `"§4fda`
- Reject non urls for registry-address
- Fix #520
2021-11-25 19:04:36 +01:00
Lukas
fac0e16996
Add linter staticcheck ( #535 )
...
* Add linter staticcheck
Co-authored-by: 6543 <6543@obermui.de>
2021-11-25 17:15:36 +01:00
Lukas
116c310820
Add linter misspell ( #530 )
...
* Add linter misspell
* Fix spelling
Co-authored-by: Anbraten <anton@ju60.de>
2021-11-24 02:01:12 +01:00
Lukas
25bf91bd37
Add linter whitespace ( #531 )
2021-11-24 01:31:11 +01:00
6543
fe31fb1e06
Drop error only on purpose or else report back or log ( #514 )
...
- Remove Deadcode
- Simplify Code
- Drop error only on purpose
2021-11-23 15:36:52 +01:00
6543
51617e7f86
Rename struct field and add new types into server/model's ( #523 )
...
Resolve some todos in server/model:
* Move persistent queue into its own package
* Create Types: StatusValue, SCMKind, RepoVisibly
* Rename struct Repo fields: SCMKind, IsSCMPrivate
2021-11-22 12:55:13 +01:00
6543
ca8e215cfa
Migrate to Xorm ( #474 )
...
close #234
* Migrate store
* Migrate tests
* Rewrite migrations
* Init fresh DB in on step
* Rm old stuff (meddler, sql files, dead code, ...)
2021-11-13 20:18:06 +01:00
6543
f02789c74a
Fix bug where db file is posible moved outside of docker volume ( #496 )
...
#494 introduced a bug, where a migration function can remove the sqlite3 file outside of the mounted docker volume.
that would result in a data lose after a container recreate.
this fix it by only rename the file if in same folder else just use the old path as fallback and put warnings into the log
Co-authored-by: Anbraten <anton@ju60.de>
2021-10-30 14:53:24 +02:00
Anbraten
06800cb61e
Change paths to use woodpecker instead of drone ( #494 )
...
* change paths to use woodpecker instead of drone
* improve sql file migration
* add migration notice
2021-10-28 14:02:43 -05:00
6543
798c2bc8b2
Upgrade urfave/cli to v2 ( #483 )
...
* migrate urfave/ci v1 -> v2
* refactor cli (format flag)
* log error if agent can not listen on port 3000
close #452
2021-10-27 21:03:14 +02:00
6543
5990d32fd3
More logging and refactor ( #457 )
...
* only use "context"
* enable 'h2' support at server
* trace log remote and database config
* log loglevel on start
2021-10-19 11:44:49 +02:00
John Olheiser
8e658c135d
Add log level API ( #444 )
...
* Add log level API
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update cli/loglevel/loglevel.go
Co-authored-by: Anbraten <anton@ju60.de>
* Move API to api routes
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Anbraten <anton@ju60.de>
2021-10-18 18:25:20 -05:00
John Olheiser
03bb0e69d8
Replace debug with log-level flag ( #440 )
...
* Add logging level to CLI and API
Signed-off-by: jolheiser <john.olheiser@gmail.com>
# Conflicts:
# server/router/router.go
* Apply suggestions from code review
Co-authored-by: Anbraten <anton@ju60.de>
* Refactor log level
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove API
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix API imports
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* do not relay on external default
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Anbraten <anton@ju60.de>
2021-10-16 17:41:36 -05:00
Anbraten
4cc8594b63
Update links to woodpecker-ci.org ( #445 )
2021-10-14 18:13:57 +02:00
John Olheiser
12db87f8e6
Change prometheus namespace to woodpecker ( #439 )
...
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2021-10-13 08:34:57 +02:00
Anbraten
f779860ff1
Add web-config.js endpoint ( #433 )
...
This is a preparation for #245 and adds a new endpoint (`.js``file) which can be included by the web-ui to get some config and credentials like the user profile or access-token.
2021-10-12 18:21:13 +02:00
Anbraten
3d6bc43ff1
Remove unused repo-config option ( #432 )
2021-10-12 12:00:03 +02:00
John Olheiser
4276a04f0c
Move entirely to zerolog ( #426 )
...
Completely switch to zerolog
(Remove usage of logrus and std logger)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2021-10-12 09:25:13 +02:00
Masaya Watanabe
7913d6db95
Fix channel buffer used with signal.Notify ( #421 )
...
Co-authored-by: Anbraten <anton@ju60.de>
2021-10-09 03:14:25 +02:00
6543
5d8e60808d
Move cli exec flags to own file ( #380 )
...
Co-authored-by: Anbraten <anton@ju60.de>
2021-10-03 15:07:39 +02:00
6543
169e7e5aa3
Refactor Gitlab Remote ( #358 )
...
- Replace custom client
- Update Docs
- Test if it works
- Update Tests
close #285
2021-10-03 14:42:47 +02:00
Anbraten
bb37836600
Replace drone strings with woodpecker ( #391 )
...
Co-authored-by: 6543 <6543@obermui.de>
2021-10-02 10:59:34 +02:00
Anbraten
ed6d3f3cea
Use go embed for web files and remove httptreemux ( #382 )
...
- replace togo with go embed
- replace httptreemux with gin
closes #308
2021-09-29 17:34:56 +02:00
6543
7f3a6eb17f
Update Generated Proto Code ( #351 )
...
update generated code (definitions, client implementation & server interface)
and add documentation how to generate
2021-09-29 02:10:09 +02:00
Marian Steinbach
17b8867b96
Clean up config environment variables for server and agent ( #218 )
...
The goal here is to make consistent use of configuration environment variables prefixed `WOODPECKER_`. Where several variants existed, this PR aims to remove all but one option, leaving the most explicit.
This PR only changes server and agent code, but not documentation, in order to keep the PR digestible. Once we have consensus that this is correct, I'll change docs accordingly.
User (rather: admin) facing changes in this PR:
- In general, support for all server and agent config environment variables (env vars) starting with `DRONE_` is removed. The according `WOODPECKER_*` variables must be used instead.
- The env var `WOODPECKER_HOST` replaces `DRONE_HOST`, and `DRONE_SERVER_HOST`.
- The env var `WOODPECKER_AGENT_SECRET` is used to configure the shared secret which agents use to authenticate against the server. It replaces `WOODPECKER_SECRET`, `DRONE_SECRET`, `WOODPECKER_PASSWORD`, `DRONE_PASSWORD`, and `DRONE_AGENT_SECRET`.
- The env var `WOODPECKER_DATABASE_DRIVER` replaces `DRONE_DATABASE_DRIVER` and `DATABASE_DRIVER`.
- The env var `WOODPECKER_DATABASE_DATASOURCE` replaces `DRONE_DATABASE_DATASOURCE` and `DATABASE_CONFIG`.
2021-09-28 15:43:44 +02:00
6543
f81bd8c656
Extend Logging & Report to WebHook Caller back if pulls are disabled ( #369 )
...
* Add more logging
* Format Code
* Add TODOs
* Fix nits
* Delete two unused functions
* Report to WebHook Caller back if pulls are disabled
2021-09-27 23:32:08 +02:00
6543
a94807efeb
Refactor: move model/ to server/model/ ( #366 )
2021-09-27 19:51:55 +02:00
6543
06d83c7b0e
Remote Gitea drop basic auth support ( #365 )
...
you now have to set **gitea-client** and **gitea-secret**.
2021-09-27 08:11:11 +02:00
Anbraten
0fa271f465
Add json schema and cli lint command ( #342 )
...
- Add json schema file
- Add tests to validate sample pipeline files
- Add new command `lint` to cli to test a directory or single file to use correct schema
Example: `woodpecker-cli lint ./pipeline/schema/.woodpecker/`
---
close #275
preparation for #276
Co-authored-by: 6543 <6543@obermui.de>
2021-09-27 02:38:15 +02:00
Anbraten
bd19f90756
Replace www-path with www-proxy option for development ( #248 )
...
By adding a new ENV variable called `WOODPECKER_WWW_PROXY` it is possible to serve a webinterface via a proxy configured by the `WOODPECKER_WWW_PROXY` value for development instead of serving the interface from the bundled code or from some folder location as the old `WOODPECKER_WWW` option allowed. Using a proxy allows developing the UI with hot-reloading.
2021-09-27 00:22:23 +02:00
6543
0bd10fa507
Cleanup Code ( #348 )
...
* Fix "Empty slice declaration using a literal"
* Fix "collides with imported package name"
* Remove unused code in pipeline
* Remove unused oauth2.providerAuthHeaderWorks()
* Add TODOs
* Format Code
* Cleanup doublestar import
* Migrate deprecated functions
Co-authored-by: Anbraten <anton@ju60.de>
2021-09-24 16:29:26 +02:00
Jacob Floyd
e34daae0cf
Move cncd/pipeline/pipeline/ to pipeline/ ( #347 )
...
* Refactor: move cncd/pipeline/ to pipeline/
* Refactor: move pipeline/pipeline/ to pipeline/
2021-09-24 13:18:34 +02:00
Jacob Floyd
a0d008e071
Move cncd/{logging,pubsub,queue}/ to server/{logging,pubsub,queue}/ ( #346 )
...
* Move cncd/{logging,pubsub,queue}/ to server/{logging,pubsub,queue}/
* Update REAMDEs and include history
Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: Anbraten <anton@ju60.de>
2021-09-23 22:29:09 +02:00
Jacob Floyd
780c902a6b
Refactor: move remote/ to server/remote/ ( #344 )
2021-09-23 18:25:51 +02:00