Skip to content

Commit

Permalink
Merge branch 'main' into backendopts-backends
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty287 committed Feb 8, 2024
2 parents 4b33710 + e64d596 commit 0e80a3c
Show file tree
Hide file tree
Showing 142 changed files with 12,121 additions and 1,520 deletions.
3 changes: 2 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ tasks:
$DOCKER_COMPOSE_CMD up -d
until curl --output /dev/null --silent --head --fail http://localhost:3000; do printf '.'; sleep 1; done
$GITEA_CLI_CMD admin user create --username woodpecker --password password --email woodpecker@localhost --admin
export GITEA_TOKEN=$($GITEA_CLI_CMD admin user generate-access-token -u woodpecker --scopes repo,write:application --raw)
export GITEA_TOKEN=$($GITEA_CLI_CMD admin user generate-access-token -u woodpecker --scopes write:repository,write:user --raw | tail -n 1 | awk 'NF{ print $NF }')
GITEA_OAUTH_APP=$(curl -X 'POST' 'http://localhost:3000/api/v1/user/applications/oauth2' \
-H 'accept: application/json' -H 'Content-Type: application/json' -H "Authorization: token ${GITEA_TOKEN}" \
-d "{ \"name\": \"Woodpecker CI\", \"confidential_client\": true, \"redirect_uris\": [ \"https://8000-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST}/authorize\" ] }")
touch .env
grep "WOODPECKER_GITEA_CLIENT=" .env \
&& sed "s,^WOODPECKER_GITEA_CLIENT=.*,WOODPECKER_GITEA_CLIENT=$(echo $GITEA_OAUTH_APP | jq -r .client_id)," .env \
|| echo WOODPECKER_GITEA_CLIENT=$(echo $GITEA_OAUTH_APP | jq -r .client_id) >> .env
Expand Down
2 changes: 1 addition & 1 deletion .woodpecker/binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ when:
variables:
- &golang_image 'docker.io/golang:1.21.6'
- &node_image 'docker.io/node:21-alpine'
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.21.5'
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.21.6'
- &xgo_version 'go-1.21.2'

steps:
Expand Down
4 changes: 2 additions & 2 deletions .woodpecker/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ when:
variables:
- &golang_image 'docker.io/golang:1.21.6'
- &node_image 'docker.io/node:21-alpine'
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.21.5'
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.21.6'
- &xgo_version 'go-1.21.2'
- &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:3.0.0'
- &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:3.0.1'
- &platforms_release 'linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/386,linux/amd64,linux/ppc64le,linux/riscv64,linux/s390x,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64'
- &platforms_server 'linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/riscv64'
- &platforms_preview 'linux/amd64'
Expand Down
1 change: 0 additions & 1 deletion .woodpecker/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ steps:

spellcheck:
image: docker.io/node:21-alpine
group: test
commands:
- corepack enable
- pnpx cspell lint --no-progress --gitignore '{**,.*}/{*,.*}'
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# Changelog

## [2.3.0](https://github.com/woodpecker-ci/woodpecker/releases/tag/2.3.0) - 2024-01-31

### ❤️ Thanks to all contributors! ❤️

@anbraten, @HerHde, @qwerty287, @pat-s, @renovate[bot], @lukashass, @zc-devs, @Alonsohhl, @healdropper, @eliasscosta, @runephilosof-karnovgroup

### ✨ Features

- Add release event [[#3226](https://github.com/woodpecker-ci/woodpecker/pull/3226)]

### 📚 Documentation

- Add release types [[#3303](https://github.com/woodpecker-ci/woodpecker/pull/3303)]
- Add opencollective footer [[#3281](https://github.com/woodpecker-ci/woodpecker/pull/3281)]
- Use array syntax in docs [[#3242](https://github.com/woodpecker-ci/woodpecker/pull/3242)]

### 🐛 Bug Fixes

- Fix Gitpod: Gitea auth token creation [[#3299](https://github.com/woodpecker-ci/woodpecker/pull/3299)]
- Fix agent updating [[#3287](https://github.com/woodpecker-ci/woodpecker/pull/3287)]
- Sanitize pod's step label [[#3275](https://github.com/woodpecker-ci/woodpecker/pull/3275)]
- Pipeline errors must be an array [[#3276](https://github.com/woodpecker-ci/woodpecker/pull/3276)]
- fix bitbucket SSO using UUID from bitbucket api response as ForgeRemoteID [[#3265](https://github.com/woodpecker-ci/woodpecker/pull/3265)]
- fix: bug pod service without label service [[#3256](https://github.com/woodpecker-ci/woodpecker/pull/3256)]
- Fix disabling PRs [[#3258](https://github.com/woodpecker-ci/woodpecker/pull/3258)]
- fix: bug annotations [[#3255](https://github.com/woodpecker-ci/woodpecker/pull/3255)]

### 📈 Enhancement

- Update theme on system color mode change [[#3296](https://github.com/woodpecker-ci/woodpecker/pull/3296)]
- Improve secrets availability checks [[#3271](https://github.com/woodpecker-ci/woodpecker/pull/3271)]
- Load more pipeline log lines (500 => 5000) [[#3212](https://github.com/woodpecker-ci/woodpecker/pull/3212)]
- Clean up models [[#3228](https://github.com/woodpecker-ci/woodpecker/pull/3228)]

### Misc

- chore(deps): update docker.io/techknowlogick/xgo docker tag to go-1.21.6 [[#3294](https://github.com/woodpecker-ci/woodpecker/pull/3294)]
- fix(deps): update docs npm deps non-major [[#3295](https://github.com/woodpecker-ci/woodpecker/pull/3295)]
- Remove deprecated `group` from config [[#3289](https://github.com/woodpecker-ci/woodpecker/pull/3289)]
- Add spellcheck config [[#3018](https://github.com/woodpecker-ci/woodpecker/pull/3018)]
- fix(deps): update golang (packages) [[#3284](https://github.com/woodpecker-ci/woodpecker/pull/3284)]
- chore(deps): lock file maintenance [[#3274](https://github.com/woodpecker-ci/woodpecker/pull/3274)]
- chore(deps): update web npm deps non-major [[#3273](https://github.com/woodpecker-ci/woodpecker/pull/3273)]
- Pin prettier version [[#3260](https://github.com/woodpecker-ci/woodpecker/pull/3260)]
- Fix prettier [[#3259](https://github.com/woodpecker-ci/woodpecker/pull/3259)]
- Update UI building in Makefile [[#3250](https://github.com/woodpecker-ci/woodpecker/pull/3250)]

## [2.2.2](https://github.com/woodpecker-ci/woodpecker/releases/tag/2.2.2) - 2024-01-21

### ❤️ Thanks to all contributors! ❤️
Expand Down
1 change: 1 addition & 0 deletions cli/secret/secret_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,6 @@ func secretCreate(c *cli.Context) error {
var defaultSecretEvents = []string{
woodpecker.EventPush,
woodpecker.EventTag,
woodpecker.EventRelease,
woodpecker.EventDeploy,
}
5 changes: 5 additions & 0 deletions cmd/server/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3937,6 +3937,9 @@ const docTemplate = `{
"id": {
"type": "integer"
},
"is_prerelease": {
"type": "boolean"
},
"message": {
"type": "string"
},
Expand Down Expand Up @@ -4383,6 +4386,7 @@ const docTemplate = `{
"pull_request",
"pull_request_closed",
"tag",
"release",
"deployment",
"cron",
"manual"
Expand All @@ -4392,6 +4396,7 @@ const docTemplate = `{
"EventPull",
"EventPullClosed",
"EventTag",
"EventRelease",
"EventDeploy",
"EventCron",
"EventManual"
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.

## Installation

Expand Down
1 change: 1 addition & 0 deletions docs/docs/20-usage/15-terminiology/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- `pull_request`: A pull request event is triggered when a pull request is opened or a new commit is pushed to it.
- `pull_request_closed`: A pull request closed event is triggered when a pull request is closed or merged.
- `tag`: A tag event is triggered when a tag is pushed.
- `release`: A release event is triggered when a release, pre-release or draft is created. (You can apply further filters using [evaluate](../20-workflow-syntax.md#evaluate) with [environment variables](../50-environment.md#built-in-environment-variables).)
- `manual`: A manual event is triggered when a user manually triggers a pipeline.
- `cron`: A cron event is triggered when a cron job is executed.

Expand Down
8 changes: 6 additions & 2 deletions docs/docs/20-usage/20-workflow-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ when:

#### `event`

Available events: `push`, `pull_request`, `pull_request_closed`, `tag`, `deployment`, `cron`, `manual`
Available events: `push`, `pull_request`, `pull_request_closed`, `tag`, `release`, `deployment`, `cron`, `manual`

Execute a step if the build event is a `tag`:

Expand Down Expand Up @@ -757,6 +757,10 @@ when:

### `event`

:::warning
Some events like the release event will be triggered for multiple actions like: releases, pre-releases and drafts. If you want to apply further filters checkout the [evaluate](#evaluate) filter and the available [environment variables](./50-environment.md#built-in-environment-variables).
:::

Execute a step if the build event is a `tag`:

```yaml
Expand All @@ -783,7 +787,7 @@ Execute a step for all build events:

```yaml
when:
event: [push, pull_request, tag, deployment]
event: [push, pull_request, pull_request_closed, tag, deployment, release]
```

### `ref`
Expand Down
1 change: 1 addition & 0 deletions docs/docs/20-usage/50-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ This is the reference list of all environment variables available to your pipeli
| `CI_COMMIT_AUTHOR` | commit author username |
| `CI_COMMIT_AUTHOR_EMAIL` | commit author email address |
| `CI_COMMIT_AUTHOR_AVATAR` | commit author avatar |
| `CI_COMMIT_PRERELEASE` | release is a pre-release (empty if event is not `release`) |
| | **Current pipeline** |
| `CI_PIPELINE_NUMBER` | pipeline number |
| `CI_PIPELINE_PARENT` | number of parent pipeline |
Expand Down
1 change: 1 addition & 0 deletions docs/docs/30-administration/11-forges/10-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
| Event: Push | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Tag | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Pull-Request | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Release | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
| Event: Deploy | :white_check_mark: | :x: | :x: | :x: |
| [Multiple workflows](../../20-usage/25-workflows.md) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [when.path filter](../../20-usage/20-workflow-syntax.md#path) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
6 changes: 5 additions & 1 deletion docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,18 @@ const config: Config = {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/woodpecker-ci/woodpecker/edit/main/docs/',
includeCurrentVersion: true,
lastVersion: '2.2',
lastVersion: '2.3',
versions: {
current: {
label: 'Next',
banner: 'unreleased',
},
'2.3': {
label: '2.3.x',
},
'2.2': {
label: '2.2.x',
banner: 'unmaintained',
},
'2.1': {
label: '2.1.x',
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.1.0",
"@docusaurus/tsconfig": "3.1.0",
"@docusaurus/tsconfig": "3.1.1",
"@docusaurus/types": "^3.1.0",
"@types/node": "^20.11.2",
"@types/react": "^18.2.48",
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/woodpecker-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"axios": "^1.6.0",
"concurrently": "^8.0.0",
"isomorphic-dompurify": "^2.0.0",
"marked": "^11.0.0",
"marked": "^12.0.0",
"tslib": "^2.6.1",
"typescript": "^5.0.0"
},
Expand Down
16 changes: 8 additions & 8 deletions docs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/src/pages/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The Drone CI license was changed after the 0.8 release from Apache 2 to a propri

Woodpecker is having two different kinds of releases: **stable** and **next**.

The **stable** releases (currently version 2.2) are long-term supported (LTS) stable versions. The stable releases are only getting bugfixes.
The **stable** releases (currently version 2.3) are long-term supported (LTS) stable versions. The stable releases are only getting bugfixes.

The **next** release contains all bugfixes and features from `main` branch. Normally it should be pretty stable, but as its frequently updated, it might contain some bugs from time to time. There are no binaries for this version.

Expand Down
89 changes: 89 additions & 0 deletions docs/versioned_docs/version-2.3/10-intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Welcome to Woodpecker

Woodpecker is a simple yet powerful CI/CD engine with great extensibility. It focuses on executing pipelines inside [containers](https://opencontainers.org/).
If you are already using containers in your daily workflow, you'll for sure love Woodpecker.

![woodpecker](woodpecker.png)

## `.woodpecker.yaml`

- Place your pipeline in a file named `.woodpecker.yaml` in your repository
- Pipeline steps can be named as you like
- Run any command in the commands section

```yaml title=".woodpecker.yaml"
steps:
- name: build
image: debian
commands:
- echo "This is the build step"
- name: a-test-step
image: debian
commands:
- echo "Testing.."
```

### Steps are containers

- Define any container image as context
- either use your own and install the needed tools in a custom image
- or search for available images that are already tailored for your needs in image registries like [Docker Hub](https://hub.docker.com/search?type=image)
- List the commands that should be executed in the container

```diff
steps:
- name: build
- image: debian
+ image: mycompany/image-with-awscli
commands:
- aws help
```

### File changes are incremental

- Woodpecker clones the source code in the beginning
- File changes are persisted throughout individual steps as the same volume is being mounted in all steps

```yaml title=".woodpecker.yaml"
steps:
- name: build
image: debian
commands:
- touch myfile
- name: a-test-step
image: debian
commands:
- cat myfile
```

## Plugins are straightforward

- If you copy the same shell script from project to project
- Pack it into a plugin instead
- And make the yaml declarative
- Plugins are Docker images with your script as an entrypoint

```dockerfile title="Dockerfile"
FROM laszlocloud/kubectl
COPY deploy /usr/local/deploy
ENTRYPOINT ["/usr/local/deploy"]
```

```bash title="deploy"
kubectl apply -f $PLUGIN_TEMPLATE
```

```yaml title=".woodpecker.yaml"
steps:
deploy-to-k8s:
image: laszlocloud/my-k8s-plugin
settings:
template: config/k8s/service.yaml
```

See [plugin docs](./20-usage/51-plugins/10-overview.md).

## Continue reading

- [Create a Woodpecker pipeline for your repository](./20-usage/10-intro.md)
- [Setup your own Woodpecker instance](./30-administration/00-deployment/00-overview.md)
Loading

0 comments on commit 0e80a3c

Please sign in to comment.