Commit graph

202 commits

Author SHA1 Message Date
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
Ulrich Schreiner
0ed7ae7e3f impelement a delete of a repository 2015-02-04 14:42:24 +01:00
Brad Rydzewski
83d1d6ada9 Merge pull request #781 from bradrydzewski/master
Change SSH Key Pair (issue #61)
2015-01-13 21:55:02 -08:00
Brad Rydzewski
1627d5f5da Merge pull request #802 from Bugagazavr/bintray
Bintray
2015-01-13 09:10:50 -08:00
Kirill Zaitsev
ef3fba75a9 Version from file 2015-01-12 20:00:36 +03:00
Matt Bostock
b027bd8392 Run gofmt and add test to prevent regressions
Run `go fmt ./...` [1] and add a test to the `test` make target that
checks if `go fmt` has been run.

[1]: http://blog.golang.org/go-fmt-your-code
2015-01-11 18:54:34 +00:00
Brad Rydzewski
b4ca338948 ability to override the public private key for a repository via the CLI 2015-01-04 15:21:35 -08:00
Kirill Zaitsev
5b07ef5ffe Automatically detect ENV variables 2014-12-27 23:52:43 +03:00
Brad Rydzewski
5539f63ba5 Merge pull request #746 from shawnzhu/inject-params
parse build file with params injection
2014-12-07 16:24:39 -08:00
Ke Zhu
c6bc20dca7 parse build file with params injection 2014-12-07 11:26:43 -05:00
Ke Zhu
a7df1e59e6 fix --deploy and --publish flags to drone build 2014-12-07 10:46:25 -05:00
Brad Rydzewski
8c51215e55 pass docker cert and key as byte arrays or file paths 2014-10-21 01:17:12 -07:00
Brad Rydzewski
617303b155 changed drone build flags from string to bool 2014-10-12 14:09:55 -07:00
Brad Rydzewski
afc3030087 ability to pass --deploy and --publish flags to drone build 2014-10-12 14:07:28 -07:00
Brad Rydzewski
643f811f05 ability to inject private params into the drone build cli command 2014-10-12 13:57:29 -07:00
Brad Rydzewski
46b3d9daae moved cmd to cli folder 2014-09-24 21:24:12 -07:00