Commit graph

5874 commits

Author SHA1 Message Date
qwerty287
111eb7ef48
Fix dropped env vars (#3969)
Co-authored-by: 6543 <6543@obermui.de>
2024-07-25 17:17:09 +02:00
qwerty287
3ae4a8d7bb
Drop version in schema (#3970) 2024-07-25 00:43:43 +02:00
qwerty287
123c4ae03e
Update docker to v27 (#3972) 2024-07-25 00:43:21 +02:00
qwerty287
b6ac64c4f6
Require gitlab 12.4 (#3966) 2024-07-23 20:48:21 +02:00
qwerty287
b330c19bf4
Migrate to maintained httpsign library (#3839)
Co-authored-by: 6543 <6543@obermui.de>
2024-07-23 20:41:37 +02:00
Joan Flotats
047eb19d42
Change Bitbucket PR hook to point the source branch, commit & ref (#3965)
## Description

This is the first fix for: https://github.com/woodpecker-ci/woodpecker/issues/3932

Change the Pull Request hook parser to return the source commit, branch, and ref instead of the destination. Right now, the workflow pulls the destination configuration and code. It should pull the source configuration and code to verify that the configuration and code work as expected before merging the changes.

In case of the close event, the hook parser returns the destination branch, ref and merge commit. Usually, the contributor automatically deletes the source branch after merging the changes to the destination branch. Using the source values will cause the workflow to fail.

After the changes, Woodpecker will correctly download the workflow from the source branch (Pull Request commit), but it will fail to clone the repository. This issue is related to the commit format returned by the Bitbucket webhook. This inconsistency has already been reported: https://jira.atlassian.com/browse/BCLOUD-21201. The webhook returns a short SHA. The problem is that the `git fetch` command requires the full SHA. 

A workaround for this issue is to use the ref to fetch the code:

```yaml
clone:
  git:
    image: woodpeckerci/plugin-git
    settings:
      ref: ${CI_COMMIT_REF}
```

This is not ideal, because the Pull Request head won't always match the workflow commit, but it solves 80% of the event use cases (e.g. trigger a pull request workflow on change). This workaround won't work when re-running a previous workflow pointing to another commit, it will pull the last commit, not the previous one.

## Solutions

The solution proposed by the community is to retrieve the full SHA from the Bitbucket API using the short one. This solution has drawbacks:
- The Bitbucket API rate limit is 1000 req/h. This solution will reduce the maximum number of workflow runs per hour.
- It requires a braking change in the forges interface because the ´Hook(...)´ method does not have an instance of the HTTP Client. 

We propose to allow the git plugin to fetch the source code from a URL. The Bitbucket returns a link pointing to the commit. 

This proposal only requires a small change to the git plugin:
- Add a new optional parameter (e.g. CommitLink)
- Add a clause to the following conditional: 7ac9615f40/plugin.go (L79C1-L88C3)
```go
if p.Pipeline.CommitLink != "" {...}
```
Git commands:
```shell
$ git fetch --no-tags --depth=1 --filter=tree:0 https://bitbucket.org/workspace/repo/commits/692972aabfec
$ git reset --hard -q 692972aabfec # It works with the short SHA
```
Woodpecker will set CommitLink to a blank string for the other forges, but Bitbuckket will use the one returned by the webhook.
2024-07-23 16:58:38 +02:00
6543
659e925d0e
Remove WOODPECKER_DEV_OAUTH_HOST and WOODPECKER_DEV_GITEA_OAUTH_URL (#3961)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-07-23 14:25:39 +02:00
Joan Flotats
3a4ffe951e
Add updated, merged and declined events to bb webhook activation (#3963)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-07-23 14:17:58 +02:00
Anbraten
9948163e6e
Fix login via navbar (#3962) 2024-07-23 13:46:22 +02:00
6543
1c7c87b8f0
Remove deprecated pipeline settings (#3916) 2024-07-23 13:06:47 +02:00
Gianluca Boiano
bbdeb4622c Translated using Weblate (Italian)
Currently translated at 100.0% (329 of 329 strings)

Translation: Woodpecker CI/UI
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/it/
2024-07-22 19:57:52 +00:00
6543
c8411d7f83
cspell lint docs (#3787)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-07-22 20:42:00 +02:00
renovate[bot]
251129a29c
fix(deps): update golang-packages (#3958)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2024-07-22 18:18:26 +02:00
6543
d2b5e203b0
server: remove old unused routes (#3845) 2024-07-22 01:05:05 +02:00
6543
b2970dbf0d
Refactor docker backend and add more test coverage (#2700)
collection of some smal nit's and additions of tests
2024-07-21 21:28:10 +02:00
Gianluca Boiano
720a076dd4 Translated using Weblate (Italian)
Currently translated at 100.0% (329 of 329 strings)

Translation: Woodpecker CI/UI
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/it/
2024-07-21 17:56:11 +00:00
qwerty287
94f8eba542
Frontport 2.6.1 changelog (#3956) 2024-07-21 19:49:51 +02:00
6543
656ab8a9c2
chore(deps): update woodpeckerci/plugin-ready-release-go docker tag to v1.2.0 (#3954) 2024-07-21 18:42:28 +02:00
qwerty287
bb6150ce1b Translated using Weblate (German)
Currently translated at 100.0% (329 of 329 strings)

Translation: Woodpecker CI/UI
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
2024-07-21 15:05:57 +00:00
qwerty287
0863f5df8f
Truncate creation in list (#3952) 2024-07-21 15:00:15 +02:00
qwerty287
aa8db526d3 Translated using Weblate (German)
Currently translated at 100.0% (329 of 329 strings)

Translation: Woodpecker CI/UI
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
2024-07-21 10:17:35 +00:00
qwerty287
1cee5a9516
Improve wording (#3951) 2024-07-21 12:17:29 +02:00
smainz
c7b64e24ab
Make cli plugin log purge recognize steps by name (#3953) 2024-07-21 11:36:01 +02:00
qwerty287
0c98f49b1e
Pin page size (#3946)
Co-authored-by: Lauris BH <lauris@nix.lv>
2024-07-21 09:27:24 +02:00
qwerty287
8a277e7bd9
Improve cron list (#3947) 2024-07-20 18:15:38 +02:00
qwerty287
fed8093520
Update Forgejo SDK (#3948) 2024-07-20 17:02:22 +03:00
Patrick Schratz
6c5abeb196
Fix typos and optimize wording (#3940) 2024-07-20 12:06:16 +02:00
qwerty287
8e2ff338d8
Fix panic if forge is unreachable (#3944) 2024-07-20 11:46:51 +02:00
6543
54b91db6b0
Add PULLREQUEST_DRONE_PULL_REQUEST drone env (#3939) 2024-07-19 17:15:05 +02:00
6543
7903d6f357
CLI: remove step-id and add step-number as option to logs (#3927) 2024-07-19 09:29:22 +02:00
6543
e76f1408f4
Make agent gRPC errors distinguishable (#3936) 2024-07-19 07:24:11 +02:00
Gianluca Boiano
c6e04e39ef Translated using Weblate (Italian)
Currently translated at 100.0% (329 of 329 strings)

Translation: Woodpecker CI/UI
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/it/
2024-07-18 23:39:47 +00:00
woodpecker-bot
805c3156f8
🎉 Release 2.7.0 (#3793)
## [2.7.0](https://github.com/woodpecker-ci/woodpecker/releases/tag/v2.7.0) - 2024-07-18

### 🔒 Security

- Add blocklist of environment variables who could alter execution of plugins [[#3934](https://github.com/woodpecker-ci/woodpecker/pull/3934)]
- Make sure plugins only mount the workspace base in a predefinde location [[#3933](https://github.com/woodpecker-ci/woodpecker/pull/3933)]
- Disallow to set arbitrary environments for plugins [[#3909](https://github.com/woodpecker-ci/woodpecker/pull/3909)]
- Use proper oauth state [[#3847](https://github.com/woodpecker-ci/woodpecker/pull/3847)]
- Enhance token checking [[#3842](https://github.com/woodpecker-ci/woodpecker/pull/3842)]
- Bump github.com/hashicorp/go-retryablehttp v0.7.5 -> v0.7.7 [[#3834](https://github.com/woodpecker-ci/woodpecker/pull/3834)]

###  Features

- Gracefully shutdown server [[#3896](https://github.com/woodpecker-ci/woodpecker/pull/3896)]
- Gracefully shutdown agent [[#3895](https://github.com/woodpecker-ci/woodpecker/pull/3895)]
- Convert urls in logs to links  [[#3904](https://github.com/woodpecker-ci/woodpecker/pull/3904)]
- Allow login using multiple forges [[#3822](https://github.com/woodpecker-ci/woodpecker/pull/3822)]
- Global and organization registries [[#1672](https://github.com/woodpecker-ci/woodpecker/pull/1672)]
- Cli get repo from git remote [[#3830](https://github.com/woodpecker-ci/woodpecker/pull/3830)]
- Add api for forges [[#3733](https://github.com/woodpecker-ci/woodpecker/pull/3733)]

### 📈 Enhancement

- Cli fix pipeline logs [[#3913](https://github.com/woodpecker-ci/woodpecker/pull/3913)]
- Migrate to github.com/urfave/cli/v3 [[#2951](https://github.com/woodpecker-ci/woodpecker/pull/2951)]
- Allow to change the working directory also for plugins and services [[#3914](https://github.com/woodpecker-ci/woodpecker/pull/3914)]
- Remove `unplugin-icons` [[#3809](https://github.com/woodpecker-ci/woodpecker/pull/3809)]
- Release windows binaries as zip file [[#3906](https://github.com/woodpecker-ci/woodpecker/pull/3906)]
- Convert to openapi 3.0 [[#3897](https://github.com/woodpecker-ci/woodpecker/pull/3897)]
- Enhance pipeline list [[#3898](https://github.com/woodpecker-ci/woodpecker/pull/3898)]
- Add user registries UI [[#3888](https://github.com/woodpecker-ci/woodpecker/pull/3888)]
- Sort users by login [[#3891](https://github.com/woodpecker-ci/woodpecker/pull/3891)]
- Exclude dummy backend in production [[#3877](https://github.com/woodpecker-ci/woodpecker/pull/3877)]
- Fix deploy task env [[#3878](https://github.com/woodpecker-ci/woodpecker/pull/3878)]
- Get default branch and show message in pipeline list [[#3867](https://github.com/woodpecker-ci/woodpecker/pull/3867)]
- Add timestamp for last work done by agent [[#3844](https://github.com/woodpecker-ci/woodpecker/pull/3844)]
- Adjust logger types [[#3859](https://github.com/woodpecker-ci/woodpecker/pull/3859)]
- Cleanup state reporting [[#3850](https://github.com/woodpecker-ci/woodpecker/pull/3850)]
- Unify DB tables/columns [[#3806](https://github.com/woodpecker-ci/woodpecker/pull/3806)]
- Let webhook pass on pipeline parsing error [[#3829](https://github.com/woodpecker-ci/woodpecker/pull/3829)]
- Exclude mocks from release build [[#3831](https://github.com/woodpecker-ci/woodpecker/pull/3831)]
- K8s secrets reference from step [[#3655](https://github.com/woodpecker-ci/woodpecker/pull/3655)]

### 🐛 Bug Fixes

- Handle empty repositories in gitea when listing PRs [[#3925](https://github.com/woodpecker-ci/woodpecker/pull/3925)]
- Update alpine package dep for docker images [[#3917](https://github.com/woodpecker-ci/woodpecker/pull/3917)]
- Don't report error if agent was terminated gracefully [[#3894](https://github.com/woodpecker-ci/woodpecker/pull/3894)]
- Let agents continuously report their health [[#3893](https://github.com/woodpecker-ci/woodpecker/pull/3893)]
- Ignore warnings for cli exec [[#3868](https://github.com/woodpecker-ci/woodpecker/pull/3868)]
- Correct favicon states [[#3832](https://github.com/woodpecker-ci/woodpecker/pull/3832)]
- Cleanup of the login flow and tests [[#3810](https://github.com/woodpecker-ci/woodpecker/pull/3810)]
- Fix newlines in logs [[#3808](https://github.com/woodpecker-ci/woodpecker/pull/3808)]
- Fix authentication error handling [[#3807](https://github.com/woodpecker-ci/woodpecker/pull/3807)]

### 📚 Documentation

- Streamline docs for new users [[#3803](https://github.com/woodpecker-ci/woodpecker/pull/3803)]
- Add mastodon verification [[#3843](https://github.com/woodpecker-ci/woodpecker/pull/3843)]
- chore(deps): update docs npm deps non-major [[#3837](https://github.com/woodpecker-ci/woodpecker/pull/3837)]
- fix(deps): update docs npm deps non-major [[#3824](https://github.com/woodpecker-ci/woodpecker/pull/3824)]
- Add openSUSE package [[#3800](https://github.com/woodpecker-ci/woodpecker/pull/3800)]
- chore(deps): update docs npm deps non-major [[#3798](https://github.com/woodpecker-ci/woodpecker/pull/3798)]
- Add "Docker Tags" Plugin [[#3796](https://github.com/woodpecker-ci/woodpecker/pull/3796)]
- chore(deps): update dependency marked to v13 [[#3792](https://github.com/woodpecker-ci/woodpecker/pull/3792)]
- chore: fix some comments [[#3788](https://github.com/woodpecker-ci/woodpecker/pull/3788)]

### Misc

- chore(deps): update web npm deps non-major [[#3930](https://github.com/woodpecker-ci/woodpecker/pull/3930)]
- chore(deps): update dependency vitest to v2 [[#3905](https://github.com/woodpecker-ci/woodpecker/pull/3905)]
- fix(deps): update module github.com/google/go-github/v62 to v63 [[#3910](https://github.com/woodpecker-ci/woodpecker/pull/3910)]
- chore(deps): update docker.io/woodpeckerci/plugin-docker-buildx docker tag to v4.1.0 [[#3908](https://github.com/woodpecker-ci/woodpecker/pull/3908)]
- Update plugin-git and add renovate trigger [[#3901](https://github.com/woodpecker-ci/woodpecker/pull/3901)]
- chore(deps): update docker.io/mstruebing/editorconfig-checker docker tag to v3.0.3 [[#3903](https://github.com/woodpecker-ci/woodpecker/pull/3903)]
- fix(deps): update golang-packages [[#3875](https://github.com/woodpecker-ci/woodpecker/pull/3875)]
- chore(deps): lock file maintenance [[#3876](https://github.com/woodpecker-ci/woodpecker/pull/3876)]
- [pre-commit.ci] pre-commit autoupdate [[#3862](https://github.com/woodpecker-ci/woodpecker/pull/3862)]
- Add dummy backend [[#3820](https://github.com/woodpecker-ci/woodpecker/pull/3820)]
- chore(deps): update dependency replace-in-file to v8 [[#3852](https://github.com/woodpecker-ci/woodpecker/pull/3852)]
- Update forgejo sdk [[#3840](https://github.com/woodpecker-ci/woodpecker/pull/3840)]
- chore(deps): lock file maintenance [[#3838](https://github.com/woodpecker-ci/woodpecker/pull/3838)]
- Allow to set dist dir using env var [[#3814](https://github.com/woodpecker-ci/woodpecker/pull/3814)]
- chore(deps): lock file maintenance [[#3805](https://github.com/woodpecker-ci/woodpecker/pull/3805)]
- chore(deps): update docker.io/lycheeverse/lychee docker tag to v0.15.1 [[#3797](https://github.com/woodpecker-ci/woodpecker/pull/3797)]
2024-07-18 23:24:31 +02:00
6543
31a45e5633
Add blocklist of environment variables who could alter execution of plugins (#3934) 2024-07-18 22:54:29 +02:00
6543
764329ed1d
Make sure plugins only mount the workspace base in a predefinde location (#3933) 2024-07-18 22:52:22 +02:00
renovate[bot]
d6e3ebf051
chore(deps): update web npm deps non-major (#3930)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-07-18 12:31:28 -07:00
6543
da5b9c9257 Translated using Weblate (German)
Currently translated at 100.0% (329 of 329 strings)

Translation: Woodpecker CI/UI
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
2024-07-18 19:20:29 +00:00
6543
925e099115
Remove unused override docs depencency (#3931) 2024-07-18 12:19:18 -07:00
qwerty287
16773855ed
Revert pipeline list UI change (#3926) 2024-07-18 20:53:33 +02:00
smainz
49c2029cad
Cli fix pipeline logs (#3913)
Co-authored-by: Thomas Anderson <127358482+zc-devs@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2024-07-18 20:39:18 +02:00
6543
7b7c83d040
remove undocumented networks option from steps (#3915)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-07-18 18:18:39 +02:00
6543
c81a6d67b1
Add docs for v2.7.0 (#3921) 2024-07-18 14:57:03 +02:00
Harri Avellan
1274de2b2d
Handle empty repositories in gitea when listing PRs (#3925) 2024-07-18 04:30:45 -07:00
6543
cd5f6f71a2
Migrate to github.com/urfave/cli/v3 (#2951) 2024-07-18 01:26:35 +02:00
6543
e39345688d
Allow to change the working directory also plugins and services (#3914) 2024-07-18 01:02:38 +02:00
qwerty287
059cb93d06
Remove unplugin-icons (#3809) 2024-07-17 08:13:56 -07:00
Anbraten
e234db1244
Streamline docs for new users (#3803) 2024-07-17 17:03:47 +02:00
6543
aa276403b3
Update alpine package dep for docker images (#3917) 2024-07-16 21:39:23 +02:00
Michael
575f83cbea Translated using Weblate (French)
Currently translated at 99.7% (336 of 337 strings)

Translation: Woodpecker CI/UI
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
2024-07-15 22:19:23 +00:00
qwerty287
4f06b62cf7 Translated using Weblate (German)
Currently translated at 100.0% (337 of 337 strings)

Translation: Woodpecker CI/UI
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
2024-07-15 22:19:23 +00:00