Commit graph

81 commits

Author SHA1 Message Date
Harikesh00 36e42914fa
Renamed procs/jobs to steps in code (#1331)
Renamed `procs` to `steps` in code for the issue #1288

Co-authored-by: Harikesh Prajapati <harikesh.prajapati@druva.com>
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-10-28 17:38:53 +02:00
qwerty287 e568c42e84
Support plugin-only secrets (#1344)
Closes #1071
2022-10-27 04:21:07 +02:00
qwerty287 849e05bb8b
Rename build to pipeline in code (#1224)
Ref:  #745

Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: 6543 <6543@obermui.de>
2022-10-18 03:24:12 +02:00
Avinil Bedarkar 11f37f4649
Converting all inputs which are coming as secret to lowercase (#1276)
Closes #926

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2022-10-16 14:58:13 +02:00
Anbraten 287800ac62
Add when evaluate filter (#1213)
closes #312 
closes #224
closes #963

Have a look for

https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md
2022-10-06 01:49:23 +02:00
6543 a39e8a0f9a
Make exec run be detected as WoodpeckerCI (#1218)
and exclude docs/docs/40-cli.md from git as it will be generated by CI
2022-09-27 22:19:39 +02:00
Sergio Fenoll c2ba272871
Set a default value for build-event flag of cli exec command (#1212)
Otherwise `cli exec` does not do anything due to the default constraints
applied to a pipeline (i.e., some kind of build event is expected).
2022-09-27 12:02:32 +02:00
[X] b4d89a1cce
Add ability to trigger manual builds (#1156)
closes #83 
closes #240 

Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-09-27 11:05:00 +02:00
Anbraten 3b0263442a
Adding initial version of Kubernetes backend (#552)
Co-authored-by: laszlocph <laszlo@laszlo.cloud>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Rynoxx <rynoxx@grid-servers.net>
2022-09-05 06:01:14 +02:00
6543 383f273392
Add cron feature (#934)
https://woodpecker-ci.org/docs/usage/cron

Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2022-09-01 00:36:32 +02:00
6543 08a99152d6
Dedup code and migrate away from deprecated funcs (#1141)
Co-authored-by: Anbraten <anton@ju60.de>
2022-08-30 01:14:07 +02:00
6543 f21d854114
Move away from deprecated go funcs (#1123) 2022-08-25 08:39:19 +02:00
Lauris BH 366a1e18f3
Add cli support for global and organization secrets (#1113)
* Add cli support for global and organization secrets

* Fix usage of deprecated functions
2022-08-15 20:10:13 +02:00
qwerty287 d22821afc1
Add logs command to CLI & update forges supported features docs (#1064)
* Complete forges overview + add `logs` command to CLI

* Update 10-overview.md

Co-authored-by: 6543 <6543@obermui.de>
2022-08-09 10:17:39 +02:00
Arno Hautala d5e31dc187
Provide global environment variables for pipeline substitution (#968)
* make global environment variables available for pipeline substitution

* lint fixes

* global env support in cli exec; procBuilder tests

* drop GLOBAL_ prefix

* docs

* documentation typo

* Update docs/docs/20-usage/50-environment.md

as suggested by anbraten

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

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Anbraten <anton@ju60.de>
2022-07-30 08:06:03 +02:00
6543 8da0ee47f7
Use variables in pipeline (#1026)
use yaml aliases (https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases) to have pipeline `variables`

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2022-07-17 18:25:56 +02:00
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