Skip to content

Commit

Permalink
pre-commit fixes (#2669)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
  • Loading branch information
3 people authored Oct 31, 2023
1 parent bd46c01 commit 856b2ef
Show file tree
Hide file tree
Showing 49 changed files with 663 additions and 642 deletions.
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ repos:
rev: v0.37.0
hooks:
- id: markdownlint
exclude: '^docs/versioned_docs/.*$'
- repo: https://github.com/mrtazz/checkmake
rev: 0.2.2
hooks:
- id: checkmake
exclude: '^docker/Dockerfile.make$' # actually a Dockerfile and not a makefile
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
Expand All @@ -36,5 +38,6 @@ ci:
autoupdate_branch: ''
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: monthly
skip: [check-hooks-apply, check-useless-excludes]
# NB: hadolint not included in pre-commit.ci
skip: [check-hooks-apply, check-useless-excludes, hadolint]
submodules: false
2 changes: 1 addition & 1 deletion .woodpecker/securityscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ when:
- release/*

variables:
- &trivy_image aquasec/trivy:latest
- &trivy_image aquasec/trivy:0.46.1
- &trivy_plugin codeberg.org/woodpecker-plugins/trivy:1.0.1

steps:
Expand Down
1,002 changes: 501 additions & 501 deletions CHANGELOG.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ else

##@ General

.PHONY: all
all: help

.PHONY: version
Expand Down Expand Up @@ -167,6 +168,7 @@ test-ui: ui-dependencies ## Test UI code
test-lib: ## Test lib code
go test -race -cover -coverprofile coverage.out -timeout 30s $(shell go list ./... | grep -v '/cmd\|/agent\|/cli\|/server')

.PHONY: test
test: test-agent test-server test-server-datastore test-cli test-lib test-ui ## Run all tests

##@ Build
Expand All @@ -183,6 +185,7 @@ build-agent: ## Build agent
build-cli: ## Build cli
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags '${LDFLAGS}' -o dist/woodpecker-cli${BIN_SUFFIX} github.com/woodpecker-ci/woodpecker/cmd/cli

.PHONY: build
build: build-agent build-server build-cli ## Build all binaries

release-frontend: build-frontend ## Build frontend
Expand Down Expand Up @@ -250,6 +253,7 @@ release-checksums: ## Create checksums for all release files
# generate shas for tar files
(cd dist/; sha256sum *.* > checksums.txt)

.PHONY: release
release: release-frontend release-server release-agent release-cli ## Release all binaries

bundle-prepare: ## Prepare the bundles
Expand All @@ -267,6 +271,7 @@ bundle-cli: bundle-prepare ## Create bundles for cli
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/nfpm-cli.yml --target ./dist --packager deb
VERSION_NUMBER=$(VERSION_NUMBER) nfpm package --config ./nfpm/nfpm-cli.yml --target ./dist --packager rpm

.PHONY: bundle
bundle: bundle-agent bundle-server bundle-cli ## Create all bundles

##@ Docs
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Woodpecker

<p align="center">
<a href="https://github.com/woodpecker-ci/woodpecker/">
<img alt="Woodpecker" src="docs/static/img/logo.svg" width="220"/>
Expand Down Expand Up @@ -41,12 +43,13 @@
<a href="https://www.tickgit.com/browse?repo=github.com/woodpecker-ci/woodpecker" title="TODOs">
<img src="https://badgen.net/https/api.tickgit.com/badgen/github.com/woodpecker-ci/woodpecker">
</a>
<a href="https://github.com/pre-commit/pre-commit" title="TODOs">
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit">
</a>
</p>
<br/>

# Woodpecker

> Woodpecker is a community fork of the Drone CI system.
Woodpecker is a community fork of the Drone CI system.

![woodpecker](docs/docs/woodpecker.png)

Expand All @@ -58,7 +61,7 @@ Please consider to donate and become a backer. 🙏 [[Become a backer](https://o

## 📖 Documentation

https://woodpecker-ci.org/
<https://woodpecker-ci.org/>

## ✨ Contribute

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Security

We take security seriously.
We take security seriously.
If you discover a security issue, please bring it to their attention right away!

### Reporting a Vulnerability
## Reporting a Vulnerability

Please **DO NOT** file a public issue, instead send your report privately to [`security @ woodpecker-ci.org`](mailto:security@woodpecker-ci.org).

Expand Down
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Command line client for the Woodpecker continuous integration server.

Please see the official documentation at https://woodpecker-ci.org/docs/cli
Please see the official documentation at <https://woodpecker-ci.org/docs/cli>
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

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

### Installation
## Installation

```bash
pnpm install
```

### Local Development
## Local Development

```bash
pnpm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build
## Build

```bash
pnpm build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment
## Deployment

Deployment happen via [CI](https://github.com/woodpecker-ci/woodpecker/blob/d59fdb4602bfdd0d00078716ba61b05c02cbd1af/.woodpecker/docs.yml#L8-L30) to [woodpecker-ci.org](https://woodpecker-ci.org).

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/2023-06-11-hello-blog/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Welcome Woodpecker's blog
description: This our first post on Woodpecker.
description: This our first post on Woodpecker
slug: hello-blog
authors:
- name: Anbraten
Expand Down
18 changes: 9 additions & 9 deletions docs/blog/2023-07-28-release-v1.0.0/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ It took us quite some time, but now we are sure it's ready, and you should reall

<!--truncate-->

We've refactored a lot of code, so contributing to the codebase should be much easier.
Furthermore, a ton of bugs where addressed and various enhancements introduced, along with some highly anticipated features.
We've refactored a lot of code, so contributing to the codebase should be much easier.
Furthermore, a ton of bugs where addressed and various enhancements introduced, along with some highly anticipated features.
With Woodpecker v1.0.0, you can now substantially improve and streamline your code pipelines,
empowering you to automate and optimize workflows like never before.

## Some picked highlights:
## Some picked highlights

### Add Support for Cron Jobs

Expand All @@ -31,33 +31,33 @@ Schedule pipelines to run at specified intervals or times, optimizing repetitive

### YAML Map Merge, Overrides, and Sequence Merge Support

With enhanced YAML support, managing complex configurations becomes a breeze.
With enhanced YAML support, managing complex configurations becomes a breeze.
Merge maps, apply overrides, and sequence merging—all within your YAML files.
This is providing more flexibility and control over your pipelines.
[Read more](/docs/usage/advanced-yaml-syntax)

### Web-UI for Admins

Simplify administration tasks with Woodpecker's new Admin UI.
Simplify administration tasks with Woodpecker's new Admin UI.
Effortlessly manage user accounts, agents, and tasks, including adding new agents or pausing the task queue for maintenance.

![Image of admin queue view](./admin_queue_ui.png)

### Localize Web-UI

Embrace internationalization by changing your locale in the user settings.
Interact with Woodpecker in the language of your choice, tailored to your preferences.
Embrace internationalization by changing your locale in the user settings.
Interact with Woodpecker in the language of your choice, tailored to your preferences.
If your language is not available or only partially translated, consider contributing to our [Weblate](https://translate.woodpecker-ci.org/engage/woodpecker-ci/).

### Add `evaluate` to `when` Filter

Enhance pipeline flexibility with the new "when evaluate" filter, enabling or disabling steps based on custom conditions.
Customize your workflows to dynamically respond to specific triggers and events.
Customize your workflows to dynamically respond to specific triggers and events.
[Read more](/docs/usage/pipeline-syntax#evaluate)

### Global- and Organization-Secrets

Save time and effort by declaring secrets for your entire instance or organization.
Save time and effort by declaring secrets for your entire instance or organization.
Simplify your workflow and securely manage sensitive information across projects.

![Image of settings view of org secrets](./org_secrets.png)
Expand Down
13 changes: 8 additions & 5 deletions docs/docs/20-usage/10-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ Webhooks are used to trigger pipeline executions. When you push code to your rep

![repository list](repo-list.png)

> Required Permissions
>
> The user who enables a repo in Woodpecker must have `Admin` rights on that repo, so that Woodpecker can add the webhook.
>
> Note that manually creating webhooks yourself is not possible. This is because webhooks are signed using a per-repository secret key which is not exposed to end users.
## Required Permissions

The user who enables a repo in Woodpecker must have `Admin` rights on that repo, so that Woodpecker can add the webhook.

:::note
Note that manually creating webhooks yourself is not possible.
This is because webhooks are signed using a per-repository secret key which is not exposed to end users.
:::

## Configuration

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/20-usage/15-terminiology/architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/docs/20-usage/15-terminiology/pipeline-workflow-step.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/docs/20-usage/20-workflow-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ steps:

Keep in mind the name is optional, if not added the steps will be numerated.

### Skip Commits
## Skip Commits

Woodpecker gives the ability to skip individual commits by adding `[SKIP CI]` or `[CI SKIP]` to the commit message. Note this is case-insensitive.

Expand Down
13 changes: 7 additions & 6 deletions docs/docs/30-administration/00-deployment/00-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ A Woodpecker deployment consists of two parts:
- A server which is the heart of Woodpecker and ships the web interface.
- Next to one server you can deploy any number of agents which will run the pipelines.

> Each agent is able to process one pipeline step by default.
>
> If you have 4 agents installed and connected to the Woodpecker server, your system will process 4 workflows in parallel.
>
> You can add more agents to increase the number of parallel workflows or set the agent's `WOODPECKER_MAX_WORKFLOWS=1` environment variable to increase the number of parallel workflows for that agent.
Each agent is able to process one pipeline step by default.
If you have 4 agents installed and connected to the Woodpecker server, your system will process 4 workflows in parallel.

:::tip
You can add more agents to increase the number of parallel workflows or set the agent's `WOODPECKER_MAX_WORKFLOWS=1` environment variable to increase the number of parallel workflows for that agent.
:::

## Which version of Woodpecker should I use?

Expand Down Expand Up @@ -60,7 +61,7 @@ A [Prometheus endpoint](../90-prometheus.md) is exposed.

See the [proxy guide](../70-proxy.md) if you want to see a setup behind Apache, Nginx, Caddy or ngrok.

In the case you need to use Woodpecker with a URL path prefix (like: https://example.org/woodpecker/), you can use the option [`WOODPECKER_ROOT_PATH`](../10-server-config.md#woodpecker_root_path).
In the case you need to use Woodpecker with a URL path prefix (like: <https://example.org/woodpecker/>), you can use the option [`WOODPECKER_ROOT_PATH`](../10-server-config.md#woodpecker_root_path).

## Third-party installation methods

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/30-administration/10-server-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ services:
+ - WOODPECKER_OPEN=true
```

You can **also restrict** registration, by keep registration closed and ...
... **adding** new **users manually** via the CLI: `woodpecker-cli user add`, or
... allowing specific **admin users** via the `WOODPECKER_ADMIN` setting, or
You can **also restrict** registration, by keep registration closed and ...\
... **adding** new **users manually** via the CLI: `woodpecker-cli user add`, or\
... allowing specific **admin users** via the `WOODPECKER_ADMIN` setting, or\
by open registration and **filter by organization** membership through the `WOODPECKER_ORGS` setting.

### To close registration, but allow specific admin users
Expand Down Expand Up @@ -156,7 +156,7 @@ WOODPECKER_CUSTOM_CSS_FILE=/usr/local/www/woodpecker.js

The examples below show how to place a banner message in the top navigation bar of Woodpecker.

##### woodpecker.css
### woodpecker.css

```css
.banner-message {
Expand All @@ -172,7 +172,7 @@ The examples below show how to place a banner message in the top navigation bar
}
```

##### woodpecker.js
### woodpecker.js

```javascript
// place/copy a minified version of jQuery or ZeptoJS here ...
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/30-administration/11-forges/20-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Do not use a "GitHub App" instead of an Oauth2 app as the former will not work c
- Name: An arbitrary name for your App
- Homepage URL: The URL of your Woodpecker instance
- Callback URL: `https://<your-woodpecker-instance>/authorize`
- (optional) Upload the Woodpecker Logo: https://avatars.githubusercontent.com/u/84780935?s=200&v=4
- (optional) Upload the Woodpecker Logo: <https://avatars.githubusercontent.com/u/84780935?s=200&v=4>

## Client Secret Creation

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/30-administration/40-encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Secrets encryption is currently broken and therefore disabled by default. It wil

Check:

- https://github.com/woodpecker-ci/woodpecker/issues/1541 and
- https://github.com/woodpecker-ci/woodpecker/pull/2300
- <https://github.com/woodpecker-ci/woodpecker/issues/1541> and
- <https://github.com/woodpecker-ci/woodpecker/pull/2300>

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/30-administration/90-prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ scrape_configs:
## Unauthenticated Access
Alternatively, the unprotected `/metrics` endpoint might be exposed on the internal port. (Port is configurable via the `WOODPECKER_METRICS_SERVER_ADDR` environment variable, e.g. `:9001`.)
Alternatively, the unprotected `/metrics` endpoint might be exposed on the internal port (Port is configurable via the `WOODPECKER_METRICS_SERVER_ADDR` environment variable, e.g. `:9001`).

## Metric Reference

List of Prometheus metrics specific to Woodpecker:

```
```yaml
# HELP woodpecker_pipeline_count Pipeline count.
# TYPE woodpecker_pipeline_count counter
woodpecker_build_count{branch="main",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 3
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/92-development/01-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Install Golang (>=1.20) as described by [this guide](https://go.dev/doc/install)

### Install make

> GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files. (https://www.gnu.org/software/make/)
> GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files (<https://www.gnu.org/software/make/>).
Install make on:

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/92-development/03-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The following list contains some tools and frameworks used by the Woodpecker UI.

## Messages and Translations

Woodpecker uses [Vue I18n](https://vue-i18n.intlify.dev/) as translation library. New translations have to be added to `web/src/assets/locales/en.json`. The English source file will be automatically imported into [Weblate](https://translate.woodpecker-ci.org/) (the translation system used by Woodpecker) where all other languages will be translated by the community based on the English source.
Woodpecker uses [Vue I18n](https://vue-i18n.intlify.dev/) as translation library. New translations have to be added to `web/src/assets/locales/en.json`. The English source file will be automatically imported into [Weblate](https://translate.woodpecker-ci.org/) (the translation system used by Woodpecker) where all other languages will be translated by the community based on the English source.
You must not provide translations except English in PRs, otherwise weblate could put git into conflicts (when someone has translated in that language file and changes are not into main branch yet)

For more information about translations see [Translations](./07-translations.md).
Loading

0 comments on commit 856b2ef

Please sign in to comment.