Commit graph

65 commits

Author SHA1 Message Date
6543 068063655b
Make pipeline runtime log with description (#970)
* introduce runtime descriptors to pipeline runtime

* nit return orig error at traceStep()

* more logging

* refactor

Co-authored-by: Zav Shotan <zshotan@bloomberg.net>
2022-06-15 18:11:20 +02:00
Anbraten e79ad00826
Add agent tagging / filtering for pipelines (#902)
Officially support labels for pipelines and agents to improve pipeline picking. 

* add pipeline labels
* update, improve docs  and add migration
* update proto file

---
closes #304 & #860
2022-05-31 01:12:18 +02:00
John Olheiser 67d76248a3
Take in an io.Reader instead of file path (#885)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2022-04-19 10:40:48 +02:00
mscherer 1fb8003294
Display system CA error only if there is an error (#870) 2022-04-05 14:37:02 +02:00
mscherer cddc54bae4
Set default logging value of cli to info (#871) 2022-04-05 14:10:10 +02:00
6543 a3ac393264
Use shared func for registering Sigterm on a context (#799) 2022-02-28 09:27:31 +01:00
Anbraten 1cc8122ec8
Support all backends for cli exec (#801) 2022-02-26 03:02:42 +01:00
6543 8ae124d5e6
Remove unused code (#797)
* delete empty code files

* delete outdated readme

* delete unused code

* dedup license
2022-02-25 21:42:45 +01:00
6543 2f91bdd4a0
gofumpt -w -l -extra . (#661) 2022-01-05 21:50:23 +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 ad509fd86f
Add multi-pipeline support to exec & lint (#568)
close #443

* add support to exec
* auto detect multi-pipeline for lint and exec
* de-duplicate code
2021-12-13 19:51:53 +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
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
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
Anbraten 063d0bb32a
Replace DRONE_ with CI_ variables in pipeline steps (#427)
Dropped support for `DRONE_*` environment variables in pipeline steps. Pipeline meta-data can be accessed with `CI_*` variables.
  - `CI_*` prefix replaces `DRONE_*`
  - `CI` value is now `woodpecker`
  - `DRONE=true` has been removed
2021-11-25 20:43:31 +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 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 e3033015ae
Use std methode to get SystemCertPool (#488)
* use std methode to get SystemCertPool

* vendor

* fix lint
2021-10-28 09:14:16 +02: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
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
Anbraten 4cc8594b63
Update links to woodpecker-ci.org (#445) 2021-10-14 18:13:57 +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 01ebbd8c2d
Fix json tag for Pos at struct Line (#422) 2021-10-09 02:43:44 +02:00
luzpaz 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
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
Anbraten 2f267e2a79
Rename drone-go (#390) 2021-10-03 00:27:43 +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
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
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
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
Anbraten 188b9e6eb5
Refactor cli (#329)
- move cli files from `cli/drone` to `cli/`
- move cli main to `cmd/cli/main.go` to match agent and server
- use version from `version/version.go` to match agent and server
2021-09-21 16:36:41 +02:00
sam-tang-sw d802fdb26d
Fix cli matrix filter (#311)
Using `when` (Conditional Execution) with `matrix` did not work, fix it.
2021-09-21 05:47:08 +02:00
6543 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 e0886ef450 CLI build and release 2021-02-19 09:28:39 +01:00
Laszlo Fogas d1287adc66
Merge pull request #132 from JensHeinrich/feature/woodpecker-env
Add WOODPECKER_ variables for server
2021-01-18 14:33:53 +01:00
CrabHo e491af6f9a feat: remove debug log 2020-11-18 14:45:57 +08:00
CrabHo 4097e4dfde feat: support matrix 2020-11-17 15:42:42 +08:00
Jens 143d2ffb78 Add WOODPECKER_ vars to cli main 2020-08-26 13:59:39 +00:00
Jens 6ec3ec4c6e Add WOODPECKER_ vars to cli 2020-08-26 13:57:14 +00:00
mhmxs 53258bf989 Format source code 2019-09-14 14:21:16 +02:00
Laszlo Fogas 630c383181 Project is renamed to Woodpecker 2019-08-27 13:07:19 +02:00
Laszlo Fogas 09e3fce3bd Pull in drone-go 2019-07-09 10:46:15 +02:00
Laszlo Fogas 9bb3e8384d Removed enterprise CLI features 2019-04-07 21:04:24 +02:00
Laszlo Fogas 2922505fe2 CLI is pulled in for simpler(?) workflow 2019-04-06 21:32:14 +02:00
Brad Rydzewski d9fd23a6df experimental branch. playing around with boltdb 2015-04-07 01:20:55 -07:00