Commit Graph
1288 Commits
Author SHA1 Message Date
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
John OlheiserandGitHub 9c85c8fd68 Enable pull_request hook by default on repository activation (#420)
Closes #419

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2021-10-09 03:26:35 +02:00
luzpazandGitHub 9b687a923e Fix various typos (#416)
Fix various typos found via `codespell -q 3 -S vendor -L pullrequest,pullrequests`
2021-10-08 18:35:56 +02:00
John OlheiserandGitHub 88389e4a06 Append trailing slash to default GH API URL (#411) 2021-10-07 09:49:45 +02:00
6543andGitHub 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
bb37836600 Replace drone strings with woodpecker (#391)
Co-authored-by: 6543 <6543@obermui.de>
2021-10-02 10:59:34 +02:00
AnbratenandGitHub 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
6543andGitHub a82d569bd1 Upgrade github client (#381)
* update github client

* ajust types
2021-09-29 07:59:46 +02:00
6543andGitHub 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 SteinbachandGitHub 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
AnbratenandGitHub 6144f16631 Remove unsupported pipeline file extension "yaml" (#373)
Docs, `sanitizePath` and json-schema do not mention / support `.yaml` (only `.yml`) files so they should simply be ignored.
2021-09-28 14:07:25 +02:00
e3499f610d Pass down context.Context (#371)
* pass context down to remote clients

* make tests work

* add ctx to Refresh() and use it

* bitbucketserver

* code format

* plugin interface: add todo context

* solve todo

* RM TODO by using context.WithTimeout

* refactor & fix

* Apply suggestions from code review

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

* go fmt

* Update server/remote/coding/coding.go

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

Co-authored-by: Anbraten <anton@ju60.de>
2021-09-28 12:56:59 +02:00
6543andGitHub c0888de86b Delete Gerrit placeholder (#372) 2021-09-28 10:22:34 +02:00
6543andGitHub 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
6543andGitHub a94807efeb Refactor: move model/ to server/model/ (#366) 2021-09-27 19:51:55 +02:00
6543andGitHub 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
AnbratenandGitHub 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
6543andGitHub 5a05a7fe6b Make configFetcher fallback work for gitea (#357)
#299 who closed #133 did not take into account, that that gitea (and eventually) other forges do return 200 and empty string if file was not found - this make configFetcher more resilient
2021-09-26 01:23:17 +02:00
6543andGitHub d8cd4925ec If config is no dir asume its a folder (#354)
If config is no dir assume its a folder (user do not always add / suffix)
2021-09-25 02:56:05 +02:00
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 FloydandGitHub 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
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 FloydandGitHub 780c902a6b Refactor: move remote/ to server/remote/ (#344) 2021-09-23 18:25:51 +02:00
Jacob FloydandGitHub e2b59787c1 Move plugins/ package to server/plugins/ (#343) 2021-09-23 16:12:46 +02:00
5fe712cca6 Move package store/ to server/store/ (#341)
* Refactor: move store/ to server/store/

* fix pipeline for moved tests

Co-authored-by: 6543 <6543@obermui.de>
2021-09-23 13:33:59 +02:00
Jacob FloydandGitHub b8f55f31e2 Move router package to server/router/ (#339) 2021-09-22 22:41:32 +02:00
Jacob FloydandGitHub 35a45b7961 Reorganize code into server/{api,grpc,shared} packages (#337)
* move api code to server/api
* move grpc server for agent communication to server/grpc
* move server.Config to server/config.go as it is used by both server/api and server/grpc
* move shared code used by server/api and server/grpc to server/shared
2021-09-22 20:48:01 +02:00
7f4a205764 Remove legacy/unused code + misc cleanups (#331)
* delete obsolete cncd code

jsonrpc2 client+server, and the utils that used them (piped, pipec)
are not used anymore.

jsonrpc2 was replaced with grpc
piped+pipec were replaced by agents

* delete duplicate section in swagger file

* comment typos

* go mod tidy (websocket+jsonrpc2 no longer used)

* go mod vendor

Co-authored-by: Anbraten <anton@ju60.de>
2021-09-21 17:35:32 +02:00
AnbratenandGitHub 5653577d7e Fix sanitizePath (#326)
With #299 the `sanitizePath` has a bug now. If no special config (empty string) has been set it falls back to default values, but the `sanitizePath` function  the used the pipelince-config-path to sanitize pipeline names.
2021-09-21 04:21:13 +02:00
AnbratenandGitHub 894df351ee Remove push, tag and deployment webhook filters (#281)
- remove `AllowPush`, `AllowTag`,  `AllowDeploy` options.
- keep `AllowPullRequest` option and disable it by default

---
close #265 
close #243
2021-09-18 16:28:35 +02:00
AnbratenandGitHub 289f0c9ad6 Change pipeline config path resolution (#299)
# Config resolution
- pipeline-config setting empty / not specified (default): `.woodpecker/` => `.woodpecker.yml` => `.drone.yml`
- pipeline-config setting defined by user: try that file / folder and no fallback (if a user sets some special value that is normally done for some reason)

# Changes
- pipeline-config setting will be empty by default
- remove fallback setting for config loading (simplifies config)

---
closes #133

---

* adjust config fetching mechanism

* default path empty

* remove fallback flag from ui and db
2021-09-17 21:40:43 +02:00
AnbratenandGitHub 34cfabb56d Fix filter pipeline config files (#279)
closes #271 

- filter pipeline config folders for `.yml` and `.yaml` files
- improve `fetchConfig` tests
- update remote mock and correct wrong folder name `mock` => `mocks` to match package name
- fix: return correct filename for fallback
- improve config loading by checking if folder or not before sending api call
2021-08-30 22:54:21 +02:00
AnbratenandGitHub 8aeae0a651 Use custom config path to sanitize build names (#280)
fix #270
2021-08-29 22:25:41 +02:00
1a67fc6e99 Use server-host as source for public links and warn if it is set to localhost (#251)
* Use server-host as source for public links

* use config and rm GetURL()

* fix: solve import cycle

Co-authored-by: 6543 <6543@obermui.de>
2021-08-20 16:32:52 +02:00
6543andGitHub 70958acc44 update / remove drone dependencies (#236)
* include github.com/drone/signal

* update github.com/drone/envsubst

* move github.com/woodpecker-ci/expr to woodpecker org
2021-06-30 19:15:28 +02:00
2ff91e6a05 Add support for path-prefix condition (#174)
Example:
```yaml
when:
  path: '*.md'
```

should match only builds in which the commit added/removed or modified files with the *.md extension

Co-authored-by: 6543 <6543@obermui.de>
2021-06-28 23:50:35 +02:00
Paweł BogusławskiandGitHub 68dbd488a9 Using configured server URL instead of obtained from request (#175)
Woodpecker should use configured server URL when creating self
URL-s for VCS UI and not depend on URL read from request. In
case of internal calls like answers for webhooks from Gitea
on backend, address in URL may be internal and this causes
Gitea to display CI status for commit with intenal URL
to woodpecker not external one.
2021-06-28 19:28:18 +02:00
6543andGitHub bfc4aa8059 Enforce code format (#228)
* format .drone.yml & go code

* improve .editorconfig

* extend Makefile

* enforce go code format

* fix space

* update deps

* clean up
2021-06-22 12:34:35 +02:00
Laszlo Fogas c7ebd68232 Relaced laszlocph/woodpecker with woodpecker-ci/woodpecker 2021-05-25 14:08:27 +02:00
Laszlo Fogas 5ea7098569 Go 1.16, go fmt, go modules update 2021-02-19 09:43:03 +01:00
Laszlo FogasandGitHub 14636cc226 Merge pull request #119 from imduffy15/owner-filter
Add whitelist for syncable owners
2020-05-20 06:53:24 +02:00
Ian 1f8b3c4a45 Fix mistakes caused from splitting out into PRs 2020-05-19 13:20:29 +01:00
Ian 0d90789422 Add whitelist for syncable owners 2020-05-18 16:58:59 +01:00
Ian a11db91e49 Upgrade dependencies 2020-05-18 16:41:15 +01:00
Laszlo Fogas a63a74053e Administration articles moved 2019-11-13 20:04:14 +01:00
Laszlo Fogas 0970d3a971 Make version number visible in UI 2019-11-12 21:42:05 +01:00
Laszlo Fogas 8dee34878d Version is now a string coming from ldlags and git tags 2019-11-12 21:10:16 +01:00
Laszlo Fogas 61a14df51b Pull in frontend 2019-11-12 14:27:39 +01:00
Laszlo FogasandGitHub e2a7917c83 Merge pull request #74 from mhmxs/test-parallel
Make test execution parallel in server
2019-10-08 15:52:21 +02:00
mhmxs 1196222a14 Make test execution parallel in server 2019-10-06 20:30:06 +02:00