Lukas Bachschwell
59ba8538a1
Add support for pipeline configuration service ( #804 )
...
* Add configuration extension flags to server
Add httpsignatures dependency
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Add http fetching to config fetcher
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Refetch config on rebuild
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* - Ensure multipipeline compatiblity
- Send original config in http request
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Basic tests of config api
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Simple docs page
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Better flag naming
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Rename usages of the term yaml
Rename ConfigAPI struct
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Doc adjustments
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* More docs touchups
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Fix env vars in docs
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* fix json tags for api calls
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Add example config service
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Consistent naming for configService
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Docs: Change example repository location
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Fix tests after response field rename
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Revert accidential unrelated change in api hook
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
* Update server flag descriptions
Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: Anbraten <anton@ju60.de>
2022-02-28 10:56:23 +01:00
6543
a3ac393264
Use shared func for registering Sigterm on a context ( #799 )
2022-02-28 09:27:31 +01:00
Anbraten
52d8097290
Get Netrc machine from clone url ( #800 )
...
We previously got the machine hostname for Netrc from the url of the remote, but in cases where the clone-url does not match the api url this can lead to errors.
2022-02-26 02:54:15 +01:00
6543
c4960cdd2c
Ignore items from WOODPECKER_ENVIRONMENT only containing a key and no value ( #781 )
...
* fix 761
* refactor: rename to match what it does & log ignore case
2022-02-23 08:59:52 +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
Zav Shotan
f16525fae5
Add flag to always authenticate when cloning public repositories ( #760 )
...
As a developer using an custom git server (e.g. Github Enterprise) I would like to be able to authenticate
the user on repositories which are marked as public.
See issue: https://github.com/woodpecker-ci/woodpecker/issues/473
Ref: https://github.com/woodpecker-ci/woodpecker/pull/693#issuecomment-1025771162
2022-02-08 17:55:08 +01:00
KN4CK3R
5f79739bc0
Add documentation of all server configuration options ( #666 )
...
* Added documentation of all configuration options.
* sort some flags
* adjust config docs to current flags
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Anton Bracke <anton@ju60.de>
2022-02-06 21:21:57 +01:00
Anbraten
6af94d79e3
Remove unused flags / options ( #693 )
...
Some flags where unused and / or unnecessary as they are covered by alternatives implemented in PRs of milestone 0.15.0 and just complicated the setup.
closes #681
2022-01-31 15:38:00 +01:00
6543
edbf6a3ba9
Allow to change status context again ( #674 )
...
* use flag value
* fix test
* sed -i 's/STATUS_CONTEXT/WOODPECKER_STATUS_CONTEXT/g'
* docs
* Update docs/docs/91-migrations.md
Co-authored-by: Anbraten <anton@ju60.de>
2022-01-29 20:37:36 +01:00
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