Stephen Muth
1816f6c715
Allow adding additional labels/annotations to kubernetes worker pods ( #1510 )
...
Example agent environment configuration using the new value:
```yaml
- env:
- name: WOODPECKER_BACKEND
value: kubernetes
- name: WOODPECKER_BACKEND_K8S_NAMESPACE
value: default
- name: WOODPECKER_BACKEND_K8S_POD_LABELS
value: '{"sidecar.istio.io/inject":"false"}'
```
2022-12-31 01:37:09 +01:00
6543
b6399c0a08
Refactor agent: split code in subfunctions ( #1441 )
...
logs of a killed pipeline are stored, with this pull
2022-11-23 15:35:24 +01:00
smainz
b8900cdf88
Fix wrong drone env vars ( #1419 )
...
Provide up to date drone compatibility environment variables to each step execution.
closes #1416
Before a step is executed, some environemnt variables are updated.
This ensures, that the updated environment variables are copied to their corresponding `DRONE_` environemt variables.
Side effect is that the `DRONE_` environemnt variables are no longer available in the metadata which should not harm as they are not used inside woodpecker.
2022-11-22 23:57:12 +01:00
Michaël Dierick
7859bde63d
add support for DRONE_COMMIT_SHA alias ( #1421 )
...
[The docker plugin
uses](d0e7d7f01b/cmd/drone-docker/main.go (L43)
)
the `DRONE_COMMIT_SHA` variant. According to [drone
reference](https://docs.drone.io/pipeline/environment/reference/ ) doc,
`DRONE_COMMIT_SHA` and `DRONE_COMMIT` are the same thing (although the
default value in the docker plugin suggests the 8-char short form).
2022-11-16 18:14:06 +01:00
Sergio Fenoll
f0e518a5a2
Add option to ignore failures on steps ( #1219 )
...
closes #1181
closes #834
Adds `ignore_failure` to pipeline steps. When it's set to true,
if the step fails the following steps continue to execute as if no failure had occurred.
---
failure enums idea:
* fail (default) = if other steps run in parallel, wait for them and
then let workflow fail
* cancel = if other steps run in parallel, kill them
* ignore = we mark the step as failed but it wont have any impact
2022-11-15 19:47:27 +01:00
Josh Soref
023d03dd61
Spelling ( #1405 )
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-09 08:12:17 +01:00
6543
e8490a757f
GenerateScript should not return encoded script ( #1397 )
...
followup to #1395
2022-11-06 13:36:34 +01:00
6543
18311d4360
Split and refactor ( #1394 )
...
Closes #974
2022-11-06 12:44:04 +01:00
qwerty287
e901f605b1
Fix local
and ssh
backends ( #1395 )
...
Base64-encoded string was not decoded.
2022-11-05 14:44:33 +02:00
qwerty287
3372d1a87c
Rename remote
to forge
( #1357 )
...
As of #745
Co-authored-by: Anbraten <anton@ju60.de>
2022-11-05 00:35:06 +01:00
6543
b15ca52a63
Move constrain to only have a single command in backend to run to dedicated backends ( #1032 )
...
at the moment we compile a script that we can pipe in as single command
this is because of the constrains the docker backend gives us.
so we move it into the docker backend and eventually get rid of it altogether
2022-10-31 00:26:49 +01:00
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
f6cac78119
Allow to change directory for steps ( #1329 )
...
Add `directory` YAML key that changes the workdir. Can replace a `cd`
before your commands start or make it possible to run plugins in a
subdirectory.
2022-10-24 16:31:06 +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
6543
f9dd6518c0
CI: add branches filter ( #1130 )
...
Co-authored-by: Anbraten <anton@ju60.de>
2022-10-10 12:49:30 +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
Anbraten
f1339412eb
Fix invalid service names for Kubernetes ( #1234 )
...
closes #1232
2022-10-05 13:39:48 +02:00
6543
da997fa34a
Add support sub-settings and secrets in sub-settings ( #1221 )
2022-10-03 19:25:43 +02:00
shrumble
6d6e54afab
Add manual to event enum ( #1226 )
2022-09-29 22:30:00 +02:00
Anbraten
70114ed1fd
Fix handling of empty strings for default docker volumes ( #1209 )
2022-09-27 11:43:35 +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
Lauris BH
2e08dd2333
Add option to set default volumes for docker backend ( #1203 )
2022-09-26 16:59:26 +02:00
6543
9c99406a06
Use archive.org to preserve code comment
2022-09-26 14:52:28 +02:00
Zav Shotan
ec9b0a62a7
Add support for pipeline root.when conditions ( #770 )
...
Co-authored-by: Zav Shotan <zshotan@bloomberg.net>
Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: 6543 <6543@obermui.de>
2022-09-26 09:27:20 +02:00
Alexis Lefebvre
3266e5f3cc
use example.com instead of foo.com ( #1188 )
...
http://example.com/ is a reserved domain name, which is perfect for
examples, while foo.com is a random domain name
2022-09-14 15:20:27 +02:00
6543
795bbd8988
Add dedicated DroneCI env compatibility layer ( #1185 )
...
for more info see `https://github.com/drone-plugins/drone-plugin-lib/pull/37/files ` and c79d49c862
2022-09-14 09:30:37 +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
c79d49c862
Delete old fallbacks and compatible stuff ( #791 )
...
Drop ...
* ... DRONE_ and deprecated pipeline environment vars
* ... deprecated sqlite3 file path
2022-09-01 14:31:12 +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
ca84f703e3
Add default event filter ( #1140 )
...
breakout from #934
when new events are added you don't have to worry that pipeline will behave different as it does now with this
Co-authored-by: Anbraten <anton@ju60.de>
2022-08-30 00:36:37 +02:00
6543
9a57602174
Pipeline compiler should not alter specified image ( #1005 )
...
* pipeline compiler should not alter specifyed image
adress #1003
2022-08-26 20:00:11 +02:00
6543
f21d854114
Move away from deprecated go funcs ( #1123 )
2022-08-25 08:39:19 +02:00
6543
d3eea72663
Bump deps ( #1125 )
...
* upgrade to codeberg.org/6543/go-yaml2json v0.2.1
* upgraded github.com/bmatcuk/doublestar/v4 v4.0.2 => v4.2.0
* upgraded github.com/docker/cli v20.10.14+incompatible => v20.10.17+incompatible
* upgraded github.com/docker/docker v20.10.14+incompatible => v20.10.17+incompatible
* upgraded github.com/gin-gonic/gin v1.7.7 => v1.8.1
* upgraded github.com/golang-jwt/jwt/v4 v4.4.1 => v4.4.2
* upgraded github.com/moby/moby v20.10.14+incompatible => v20.10.17+incompatible
* upgraded github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 => v0.0.0-20220808134915-39b0c02b01ae
* upgraded github.com/lafriks/ttlcache/v3 v3.1.0 => v3.2.0
* upgraded github.com/mattn/go-sqlite3 v1.14.12 => v1.14.15
* upgraded github.com/lib/pq v1.10.5 => v1.10.6
* github.com/prometheus/client_golang v1.12.1 => v1.13.0
* upgraded github.com/urfave/cli/v2 v2.5.1 => v2.11.2
* upgraded github.com/rs/zerolog v1.26.1 => v1.27.0
* upgraded golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 => v0.0.0-20220822191816-0ebed06d0094
* upgraded github.com/xanzy/go-gitlab v0.64.0 => v0.73.1
* upgraded google.golang.org/grpc v1.47.0 => v1.49.0
2022-08-25 08:09:05 +02:00
6543
a46723334b
refactor: use switch-case not try-err ( #1112 )
2022-08-15 14:39:08 +02:00
Lauris BH
5a945c10e9
Fix to show build pipeline parse error ( #1066 )
2022-08-15 14:37:46 +02:00
Anbraten
fc862bf627
Default clone do checkout tags on tag pipeline ( #1110 )
2022-08-15 11:52:30 +02:00
Anbraten
e269890643
Allow multiple when conditions ( #1087 )
...
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: LamaAni <zshotan@bloomberg.net>
2022-08-14 19:32:49 +02:00
Florian Märkl
7031904dbe
Wait to finish reading logs before calling Wait() on pipeline ( #1010 )
...
This fixes errors like the following and chopped off logs ...
2022-07-31 17:12:15 +02:00
6543
1e8d4cc455
Update jsonschema and pipeline linting
2022-07-19 15:09:39 +02:00
6543
d2556a0613
Update jsonschema and define "services" ( #1036 )
...
Co-authored-by: Anbraten <anton@ju60.de>
2022-07-19 15:01:36 +02:00
6543
69ec44075c
Let single line command be a single command ( #1009 )
...
* rm go-shlex usage
* update
2022-07-19 07:20:27 +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
31bad81979
Use external lib to convert yaml to json ( #1028 )
...
this move shared/yml/* into an independent lib
2022-07-17 17:23:31 +02:00
Florian Märkl
4879e922c1
Avoid calling /bin/env in local backend ( #1011 )
...
/bin/env was used to resolve a command name against PATH and pass
additional environment variables.
All of this can also be achieved using functionality already provided by
go's exec lib, which will then internally pass the appropriate arguments
to e.g. execve.
2022-07-04 20:27:17 +02:00
Florian Märkl
061596d802
Gracefully handle non-zero exit code in local backend ( #1002 )
...
A non-zero exit code signifies a pipeline failure, but is not a fatal error in the agent.
Since exec reports this as exec.ExitError, this has to be handled explicitly.
This also fixes logs not being shown on build errors.
2022-07-02 15:56:08 +02:00
6543
9449b67da9
fix regression from 81dcdea2be
(missmatch)
2022-06-16 23:11:27 +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
Zav Shotan
81dcdea2be
Add support for steps to be a list (instead of dict) ( #826 )
...
- Support for pipeline/containers as list
- Support for container name in logs (step.Name)
Co-authored-by: Zav Shotan <zshotan@bloomberg.net>
Co-authored-by: 6543 <6543@obermui.de>
2022-06-13 23:13:09 +02:00