From fab7dfb897039c0b4228647d145f3904f778cf5e Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 6 Mar 2026 18:19:45 +0100 Subject: [PATCH 01/15] Fix addlicense --- .woodpecker/test.yaml | 2 +- Makefile | 2 +- cli/admin/org/org_list.go | 14 ++++++++++++++ cli/common/hooks.go | 14 ++++++++++++++ cli/internal/config/config.go | 14 ++++++++++++++ cli/internal/config/config_test.go | 14 ++++++++++++++ cli/lint/utils.go | 14 ++++++++++++++ cli/pipeline/list_test.go | 14 ++++++++++++++ cli/pipeline/pipeline_test.go | 14 ++++++++++++++ cli/pipeline/purge_test.go | 14 ++++++++++++++ cli/repo/repo_show_test.go | 14 ++++++++++++++ cli/repo/repo_test.go | 14 ++++++++++++++ cli/setup/setup.go | 14 ++++++++++++++ cli/setup/token_fetcher.go | 14 ++++++++++++++ cli/setup/ui/ask.go | 14 ++++++++++++++ cli/setup/ui/confirm.go | 14 ++++++++++++++ cli/update/command.go | 14 ++++++++++++++ cli/update/tar.go | 14 ++++++++++++++ cli/update/types.go | 14 ++++++++++++++ cli/update/updater.go | 14 ++++++++++++++ cli/update/updater_test.go | 14 ++++++++++++++ cmd/server/openapi_test.go | 14 ++++++++++++++ pipeline/backend/docker/backend_options.go | 14 ++++++++++++++ pipeline/backend/docker/backend_options_test.go | 14 ++++++++++++++ pipeline/backend/kubernetes/backend_options.go | 14 ++++++++++++++ .../backend/kubernetes/backend_options_test.go | 14 ++++++++++++++ pipeline/backend/kubernetes/namespace.go | 14 ++++++++++++++ pipeline/backend/kubernetes/namespace_test.go | 14 ++++++++++++++ server/api/helper_test.go | 14 ++++++++++++++ server/api/hook_test.go | 14 ++++++++++++++ server/api/login_test.go | 14 ++++++++++++++ server/forge/bitbucketdatacenter/fixtures/hooks.go | 14 ++++++++++++++ server/forge/bitbucketdatacenter/parse.go | 14 ++++++++++++++ server/forge/bitbucketdatacenter/parse_test.go | 14 ++++++++++++++ server/forge/common/event_normalize.go | 14 ++++++++++++++ server/forge/setup/setup.go | 14 ++++++++++++++ server/model/commit.go | 14 ++++++++++++++ server/model/queue.go | 14 ++++++++++++++ server/pipeline/gated_test.go | 14 ++++++++++++++ server/pipeline/items_test.go | 14 ++++++++++++++ server/services/log/file/file.go | 14 ++++++++++++++ server/services/log/service.go | 14 ++++++++++++++ server/services/permissions/admins.go | 14 ++++++++++++++ server/services/permissions/admins_test.go | 14 ++++++++++++++ server/services/permissions/orgs.go | 14 ++++++++++++++ server/services/permissions/orgs_test.go | 14 ++++++++++++++ server/services/permissions/repo_owners.go | 14 ++++++++++++++ server/services/permissions/repo_owners_test.go | 14 ++++++++++++++ .../migration/000_legacy_to_xormigrate.go | 14 ++++++++++++++ shared/token/token_test.go | 14 ++++++++++++++ woodpecker-go/woodpecker/agent.go | 14 ++++++++++++++ woodpecker-go/woodpecker/agent_test.go | 14 ++++++++++++++ woodpecker-go/woodpecker/global_registry.go | 14 ++++++++++++++ woodpecker-go/woodpecker/global_secret.go | 14 ++++++++++++++ woodpecker-go/woodpecker/list_options.go | 14 ++++++++++++++ woodpecker-go/woodpecker/list_options_test.go | 14 ++++++++++++++ woodpecker-go/woodpecker/org.go | 14 ++++++++++++++ woodpecker-go/woodpecker/pipeline.go | 14 ++++++++++++++ woodpecker-go/woodpecker/queue.go | 14 ++++++++++++++ woodpecker-go/woodpecker/queue_test.go | 14 ++++++++++++++ woodpecker-go/woodpecker/repo.go | 14 ++++++++++++++ woodpecker-go/woodpecker/repo_test.go | 14 ++++++++++++++ woodpecker-go/woodpecker/user.go | 14 ++++++++++++++ woodpecker-go/woodpecker/user_test.go | 14 ++++++++++++++ 64 files changed, 870 insertions(+), 2 deletions(-) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 4a26a65a57c..28406ef0a07 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -75,7 +75,7 @@ steps: image: *golang_image commands: - make install-addlicense # cspell:words addlicense - - 'addlicense -check -ignore "vendor/**" **/*.go' + - 'addlicense -check -ignore "vendor/**" -ignore cmd/server/openapi/docs.go **/*.go' when: *when test: diff --git a/Makefile b/Makefile index b391dc6f18d..488b6040963 100644 --- a/Makefile +++ b/Makefile @@ -127,7 +127,7 @@ generate-openapi: ## Run openapi code generation and format it CGO_ENABLED=0 go generate cmd/server/openapi.go generate-license-header: install-addlicense - addlicense -c "Woodpecker Authors" -ignore "vendor/**" **/*.go + addlicense -c "Woodpecker Authors" -l apache -ignore "vendor/**" -ignore cmd/server/openapi/docs.go **/*.go check-xgo: ## Check if xgo is installed @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ diff --git a/cli/admin/org/org_list.go b/cli/admin/org/org_list.go index e5f50068ef2..b67e6120cfc 100644 --- a/cli/admin/org/org_list.go +++ b/cli/admin/org/org_list.go @@ -1,3 +1,17 @@ +// Copyright 2025 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package org import ( diff --git a/cli/common/hooks.go b/cli/common/hooks.go index fb7a4b4c7ba..4b2a22136f1 100644 --- a/cli/common/hooks.go +++ b/cli/common/hooks.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package common import ( diff --git a/cli/internal/config/config.go b/cli/internal/config/config.go index c4abfa9dc2f..735035bc152 100644 --- a/cli/internal/config/config.go +++ b/cli/internal/config/config.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config import ( diff --git a/cli/internal/config/config_test.go b/cli/internal/config/config_test.go index 110805dcc02..697471937db 100644 --- a/cli/internal/config/config_test.go +++ b/cli/internal/config/config_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config import ( diff --git a/cli/lint/utils.go b/cli/lint/utils.go index bfa29c6c01a..211d0f78fa3 100644 --- a/cli/lint/utils.go +++ b/cli/lint/utils.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package lint import ( diff --git a/cli/pipeline/list_test.go b/cli/pipeline/list_test.go index bca49637e6b..ed8d726b1ea 100644 --- a/cli/pipeline/list_test.go +++ b/cli/pipeline/list_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pipeline import ( diff --git a/cli/pipeline/pipeline_test.go b/cli/pipeline/pipeline_test.go index 0abe5a78cf0..e6541d9b7dd 100644 --- a/cli/pipeline/pipeline_test.go +++ b/cli/pipeline/pipeline_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pipeline import ( diff --git a/cli/pipeline/purge_test.go b/cli/pipeline/purge_test.go index 72a1e91a702..0b15ab84b5c 100644 --- a/cli/pipeline/purge_test.go +++ b/cli/pipeline/purge_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pipeline import ( diff --git a/cli/repo/repo_show_test.go b/cli/repo/repo_show_test.go index ec7ad65d1be..6a94e0676cb 100644 --- a/cli/repo/repo_show_test.go +++ b/cli/repo/repo_show_test.go @@ -1,3 +1,17 @@ +// Copyright 2025 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package repo import ( diff --git a/cli/repo/repo_test.go b/cli/repo/repo_test.go index b27b0651200..44f5ead7665 100644 --- a/cli/repo/repo_test.go +++ b/cli/repo/repo_test.go @@ -1,3 +1,17 @@ +// Copyright 2025 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package repo import ( diff --git a/cli/setup/setup.go b/cli/setup/setup.go index e26cb1ab1ae..6f8a10f44ac 100644 --- a/cli/setup/setup.go +++ b/cli/setup/setup.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package setup import ( diff --git a/cli/setup/token_fetcher.go b/cli/setup/token_fetcher.go index 05305e7ca9f..17f05ba3acd 100644 --- a/cli/setup/token_fetcher.go +++ b/cli/setup/token_fetcher.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package setup import ( diff --git a/cli/setup/ui/ask.go b/cli/setup/ui/ask.go index eea4b2b00af..a7a0bae8094 100644 --- a/cli/setup/ui/ask.go +++ b/cli/setup/ui/ask.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package ui import ( diff --git a/cli/setup/ui/confirm.go b/cli/setup/ui/confirm.go index 1a7dfa49436..29465db2370 100644 --- a/cli/setup/ui/confirm.go +++ b/cli/setup/ui/confirm.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package ui import ( diff --git a/cli/update/command.go b/cli/update/command.go index a4dad8530e3..6c576915e21 100644 --- a/cli/update/command.go +++ b/cli/update/command.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package update import ( diff --git a/cli/update/tar.go b/cli/update/tar.go index acf1b03e807..7e46aa64cc0 100644 --- a/cli/update/tar.go +++ b/cli/update/tar.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package update import ( diff --git a/cli/update/types.go b/cli/update/types.go index 7f2bf6b7758..13f7bfd4974 100644 --- a/cli/update/types.go +++ b/cli/update/types.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package update type VersionData struct { diff --git a/cli/update/updater.go b/cli/update/updater.go index 2810989ee9b..0bcffa08026 100644 --- a/cli/update/updater.go +++ b/cli/update/updater.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package update import ( diff --git a/cli/update/updater_test.go b/cli/update/updater_test.go index bb082a79967..7a962e061fa 100644 --- a/cli/update/updater_test.go +++ b/cli/update/updater_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package update import ( diff --git a/cmd/server/openapi_test.go b/cmd/server/openapi_test.go index 448aa1fad17..a1c8d236298 100644 --- a/cmd/server/openapi_test.go +++ b/cmd/server/openapi_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/pipeline/backend/docker/backend_options.go b/pipeline/backend/docker/backend_options.go index b7b2a10e12e..e03b58100f4 100644 --- a/pipeline/backend/docker/backend_options.go +++ b/pipeline/backend/docker/backend_options.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package docker import ( diff --git a/pipeline/backend/docker/backend_options_test.go b/pipeline/backend/docker/backend_options_test.go index 50fb7f73eab..456760f4034 100644 --- a/pipeline/backend/docker/backend_options_test.go +++ b/pipeline/backend/docker/backend_options_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package docker import ( diff --git a/pipeline/backend/kubernetes/backend_options.go b/pipeline/backend/kubernetes/backend_options.go index 64fd49f1417..d664b599bb6 100644 --- a/pipeline/backend/kubernetes/backend_options.go +++ b/pipeline/backend/kubernetes/backend_options.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package kubernetes import ( diff --git a/pipeline/backend/kubernetes/backend_options_test.go b/pipeline/backend/kubernetes/backend_options_test.go index 14526a8f85e..38db3601908 100644 --- a/pipeline/backend/kubernetes/backend_options_test.go +++ b/pipeline/backend/kubernetes/backend_options_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package kubernetes import ( diff --git a/pipeline/backend/kubernetes/namespace.go b/pipeline/backend/kubernetes/namespace.go index d5ddfaaa112..f68591b70b0 100644 --- a/pipeline/backend/kubernetes/namespace.go +++ b/pipeline/backend/kubernetes/namespace.go @@ -1,3 +1,17 @@ +// Copyright 2025 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package kubernetes import ( diff --git a/pipeline/backend/kubernetes/namespace_test.go b/pipeline/backend/kubernetes/namespace_test.go index c8e4682dceb..e247d31153d 100644 --- a/pipeline/backend/kubernetes/namespace_test.go +++ b/pipeline/backend/kubernetes/namespace_test.go @@ -1,3 +1,17 @@ +// Copyright 2025 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package kubernetes import ( diff --git a/server/api/helper_test.go b/server/api/helper_test.go index 4dd17b1b8ad..46c8fab3d00 100644 --- a/server/api/helper_test.go +++ b/server/api/helper_test.go @@ -1,3 +1,17 @@ +// Copyright 2023 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package api import ( diff --git a/server/api/hook_test.go b/server/api/hook_test.go index f294e504214..b38fa35790a 100644 --- a/server/api/hook_test.go +++ b/server/api/hook_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package api_test import ( diff --git a/server/api/login_test.go b/server/api/login_test.go index 1119e20d0a8..2b3da9866d0 100644 --- a/server/api/login_test.go +++ b/server/api/login_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package api_test import ( diff --git a/server/forge/bitbucketdatacenter/fixtures/hooks.go b/server/forge/bitbucketdatacenter/fixtures/hooks.go index d311c6457b3..2639f769c43 100644 --- a/server/forge/bitbucketdatacenter/fixtures/hooks.go +++ b/server/forge/bitbucketdatacenter/fixtures/hooks.go @@ -1,3 +1,17 @@ +// Copyright 2025 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package fixtures import _ "embed" diff --git a/server/forge/bitbucketdatacenter/parse.go b/server/forge/bitbucketdatacenter/parse.go index b24fb00ecd8..a01bd5c597c 100644 --- a/server/forge/bitbucketdatacenter/parse.go +++ b/server/forge/bitbucketdatacenter/parse.go @@ -1,3 +1,17 @@ +// Copyright 2025 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package bitbucketdatacenter import ( diff --git a/server/forge/bitbucketdatacenter/parse_test.go b/server/forge/bitbucketdatacenter/parse_test.go index 628e0d51808..c70e51b91e4 100644 --- a/server/forge/bitbucketdatacenter/parse_test.go +++ b/server/forge/bitbucketdatacenter/parse_test.go @@ -1,3 +1,17 @@ +// Copyright 2025 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package bitbucketdatacenter import ( diff --git a/server/forge/common/event_normalize.go b/server/forge/common/event_normalize.go index c030cd1c36b..c0d826dec6a 100644 --- a/server/forge/common/event_normalize.go +++ b/server/forge/common/event_normalize.go @@ -1,3 +1,17 @@ +// Copyright 2025 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package common func NormalizeEventReason(in string) string { diff --git a/server/forge/setup/setup.go b/server/forge/setup/setup.go index 95c4caa67c9..9cb84f47b39 100644 --- a/server/forge/setup/setup.go +++ b/server/forge/setup/setup.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package setup import ( diff --git a/server/model/commit.go b/server/model/commit.go index 2de74fc44ba..67b7362862e 100644 --- a/server/model/commit.go +++ b/server/model/commit.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package model type Commit struct { diff --git a/server/model/queue.go b/server/model/queue.go index 4802c27f1a7..bd912b8b1e0 100644 --- a/server/model/queue.go +++ b/server/model/queue.go @@ -1,3 +1,17 @@ +// Copyright 2021 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package model // QueueTask represents a task in the queue with additional API-specific fields. diff --git a/server/pipeline/gated_test.go b/server/pipeline/gated_test.go index 3209875d576..9c61d951fb0 100644 --- a/server/pipeline/gated_test.go +++ b/server/pipeline/gated_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pipeline import ( diff --git a/server/pipeline/items_test.go b/server/pipeline/items_test.go index 291877b9377..56bae711cce 100644 --- a/server/pipeline/items_test.go +++ b/server/pipeline/items_test.go @@ -1,3 +1,17 @@ +// Copyright 2023 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pipeline import ( diff --git a/server/services/log/file/file.go b/server/services/log/file/file.go index e5c400728d2..105f9a4c345 100644 --- a/server/services/log/file/file.go +++ b/server/services/log/file/file.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package file import ( diff --git a/server/services/log/service.go b/server/services/log/service.go index c4d98a84501..1a45cdd3926 100644 --- a/server/services/log/service.go +++ b/server/services/log/service.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package log import "go.woodpecker-ci.org/woodpecker/v3/server/model" diff --git a/server/services/permissions/admins.go b/server/services/permissions/admins.go index 86bd5500a48..9b7362483a4 100644 --- a/server/services/permissions/admins.go +++ b/server/services/permissions/admins.go @@ -1,3 +1,17 @@ +// Copyright 2023 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package permissions import ( diff --git a/server/services/permissions/admins_test.go b/server/services/permissions/admins_test.go index f7cbb55b996..c20f445bb5e 100644 --- a/server/services/permissions/admins_test.go +++ b/server/services/permissions/admins_test.go @@ -1,3 +1,17 @@ +// Copyright 2023 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package permissions import ( diff --git a/server/services/permissions/orgs.go b/server/services/permissions/orgs.go index 312ed8ea9df..e47748d85c4 100644 --- a/server/services/permissions/orgs.go +++ b/server/services/permissions/orgs.go @@ -1,3 +1,17 @@ +// Copyright 2023 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package permissions import ( diff --git a/server/services/permissions/orgs_test.go b/server/services/permissions/orgs_test.go index e7ead62b646..0a1852387c4 100644 --- a/server/services/permissions/orgs_test.go +++ b/server/services/permissions/orgs_test.go @@ -1,3 +1,17 @@ +// Copyright 2023 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package permissions import ( diff --git a/server/services/permissions/repo_owners.go b/server/services/permissions/repo_owners.go index 07db15a1e3f..1c57a5ddf67 100644 --- a/server/services/permissions/repo_owners.go +++ b/server/services/permissions/repo_owners.go @@ -1,3 +1,17 @@ +// Copyright 2023 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package permissions import ( diff --git a/server/services/permissions/repo_owners_test.go b/server/services/permissions/repo_owners_test.go index 77206eb795e..30d7d47c7b8 100644 --- a/server/services/permissions/repo_owners_test.go +++ b/server/services/permissions/repo_owners_test.go @@ -1,3 +1,17 @@ +// Copyright 2023 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package permissions import ( diff --git a/server/store/datastore/migration/000_legacy_to_xormigrate.go b/server/store/datastore/migration/000_legacy_to_xormigrate.go index d3b59117ca5..b82721c917a 100644 --- a/server/store/datastore/migration/000_legacy_to_xormigrate.go +++ b/server/store/datastore/migration/000_legacy_to_xormigrate.go @@ -1,3 +1,17 @@ +// Copyright 2023 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package migration import ( diff --git a/shared/token/token_test.go b/shared/token/token_test.go index 0c1f3b97301..bbd2225c31a 100644 --- a/shared/token/token_test.go +++ b/shared/token/token_test.go @@ -1,3 +1,17 @@ +// Copyright 2021 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package token_test import ( diff --git a/woodpecker-go/woodpecker/agent.go b/woodpecker-go/woodpecker/agent.go index 81ff8883c1b..8eb4cb034b2 100644 --- a/woodpecker-go/woodpecker/agent.go +++ b/woodpecker-go/woodpecker/agent.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import "fmt" diff --git a/woodpecker-go/woodpecker/agent_test.go b/woodpecker-go/woodpecker/agent_test.go index a10d756ee72..1a5587c6e18 100644 --- a/woodpecker-go/woodpecker/agent_test.go +++ b/woodpecker-go/woodpecker/agent_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/global_registry.go b/woodpecker-go/woodpecker/global_registry.go index 1936b7b4774..07749e2e863 100644 --- a/woodpecker-go/woodpecker/global_registry.go +++ b/woodpecker-go/woodpecker/global_registry.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/global_secret.go b/woodpecker-go/woodpecker/global_secret.go index 1be6053fa65..ae7e972683e 100644 --- a/woodpecker-go/woodpecker/global_secret.go +++ b/woodpecker-go/woodpecker/global_secret.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/list_options.go b/woodpecker-go/woodpecker/list_options.go index 8107fa30845..cb43632de9b 100644 --- a/woodpecker-go/woodpecker/list_options.go +++ b/woodpecker-go/woodpecker/list_options.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/list_options_test.go b/woodpecker-go/woodpecker/list_options_test.go index 22d45d92ee6..3ec6808152d 100644 --- a/woodpecker-go/woodpecker/list_options_test.go +++ b/woodpecker-go/woodpecker/list_options_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/org.go b/woodpecker-go/woodpecker/org.go index 7e6f15895a8..2f19523e055 100644 --- a/woodpecker-go/woodpecker/org.go +++ b/woodpecker-go/woodpecker/org.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/pipeline.go b/woodpecker-go/woodpecker/pipeline.go index 4eec3ef0171..aaecec9178e 100644 --- a/woodpecker-go/woodpecker/pipeline.go +++ b/woodpecker-go/woodpecker/pipeline.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/queue.go b/woodpecker-go/woodpecker/queue.go index 1e0f27e15fa..579fe441888 100644 --- a/woodpecker-go/woodpecker/queue.go +++ b/woodpecker-go/woodpecker/queue.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import "fmt" diff --git a/woodpecker-go/woodpecker/queue_test.go b/woodpecker-go/woodpecker/queue_test.go index 11ab1b8a860..dc23285a1e7 100644 --- a/woodpecker-go/woodpecker/queue_test.go +++ b/woodpecker-go/woodpecker/queue_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/repo.go b/woodpecker-go/woodpecker/repo.go index 385992e720b..2eaacfa35dd 100644 --- a/woodpecker-go/woodpecker/repo.go +++ b/woodpecker-go/woodpecker/repo.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/repo_test.go b/woodpecker-go/woodpecker/repo_test.go index 442d8c4c4b8..2f88292d5d4 100644 --- a/woodpecker-go/woodpecker/repo_test.go +++ b/woodpecker-go/woodpecker/repo_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/user.go b/woodpecker-go/woodpecker/user.go index dc3d4aed590..66ef5b9470c 100644 --- a/woodpecker-go/woodpecker/user.go +++ b/woodpecker-go/woodpecker/user.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( diff --git a/woodpecker-go/woodpecker/user_test.go b/woodpecker-go/woodpecker/user_test.go index 709ca66b085..7e7a43429b1 100644 --- a/woodpecker-go/woodpecker/user_test.go +++ b/woodpecker-go/woodpecker/user_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package woodpecker import ( From ccd11d561a7981ae4871da66ad2a05587653a77c Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 6 Mar 2026 18:20:36 +0100 Subject: [PATCH 02/15] Run with addlicense docker image --- .woodpecker/test.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 28406ef0a07..07ff61f5cdf 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -72,9 +72,8 @@ steps: when: *when lint-license-header: - image: *golang_image + image: ghcr.io/google/addlicense:v1.2.0 commands: - - make install-addlicense # cspell:words addlicense - 'addlicense -check -ignore "vendor/**" -ignore cmd/server/openapi/docs.go **/*.go' when: *when From 646b54c000251890283f61f40c92247464c96fdb Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 6 Mar 2026 18:23:39 +0100 Subject: [PATCH 03/15] Revert "Run with addlicense docker image" This reverts commit ccd11d561a7981ae4871da66ad2a05587653a77c. --- .woodpecker/test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 07ff61f5cdf..28406ef0a07 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -72,8 +72,9 @@ steps: when: *when lint-license-header: - image: ghcr.io/google/addlicense:v1.2.0 + image: *golang_image commands: + - make install-addlicense # cspell:words addlicense - 'addlicense -check -ignore "vendor/**" -ignore cmd/server/openapi/docs.go **/*.go' when: *when From 91c7097b8392649791952bb92d4022f8f052f212 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 6 Mar 2026 18:54:14 +0100 Subject: [PATCH 04/15] remove header from one file --- cmd/cli/app.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/cmd/cli/app.go b/cmd/cli/app.go index 6d65561fbcf..dd97ceb6c63 100644 --- a/cmd/cli/app.go +++ b/cmd/cli/app.go @@ -1,17 +1,3 @@ -// Copyright 2021 Woodpecker Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package main import ( From 553d73120ec9f55bb2aaac263505f4c68d83342d Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 6 Mar 2026 19:07:12 +0100 Subject: [PATCH 05/15] only run test workflow for now --- .woodpecker/binaries.yaml | 114 --------- .woodpecker/docker.yaml | 400 -------------------------------- .woodpecker/docs.yaml | 173 -------------- .woodpecker/links.yaml | 31 --- .woodpecker/release-helper.yaml | 15 -- .woodpecker/securityscan.yaml | 42 ---- .woodpecker/social.yaml | 45 ---- .woodpecker/static.yaml | 26 --- .woodpecker/web.yaml | 66 ------ 9 files changed, 912 deletions(-) delete mode 100644 .woodpecker/binaries.yaml delete mode 100644 .woodpecker/docker.yaml delete mode 100644 .woodpecker/docs.yaml delete mode 100644 .woodpecker/links.yaml delete mode 100644 .woodpecker/release-helper.yaml delete mode 100644 .woodpecker/securityscan.yaml delete mode 100644 .woodpecker/social.yaml delete mode 100644 .woodpecker/static.yaml delete mode 100644 .woodpecker/web.yaml diff --git a/.woodpecker/binaries.yaml b/.woodpecker/binaries.yaml deleted file mode 100644 index f24e6bc33ec..00000000000 --- a/.woodpecker/binaries.yaml +++ /dev/null @@ -1,114 +0,0 @@ -when: - - event: tag - - event: pull_request - branch: ${CI_REPO_DEFAULT_BRANCH} - path: - - Makefile - - .woodpecker/binaries.yaml - -variables: - - &golang_image 'docker.io/golang:1.26' - - &node_image 'docker.io/node:24-alpine' - - &xgo_image 'docker.io/techknowlogick/xgo:go-1.26.x' - -# cspell:words bindata netgo - -steps: - build-web: - image: *node_image - directory: web/ - commands: - - corepack enable - - pnpm install --frozen-lockfile - - pnpm build - - vendor: - image: *golang_image - commands: - - go mod vendor - - cross-compile-server: - depends_on: - - vendor - - build-web - image: *xgo_image - pull: true - commands: - - apt update - - apt install -y tree - - make cross-compile-server - environment: - PLATFORMS: linux|arm64/v8;linux|amd64;linux|riscv64;windows|amd64 - TAGS: bindata sqlite sqlite_unlock_notify netgo - ARCHIVE_IT: '1' - - build-tarball: - depends_on: - - vendor - - build-web - image: *golang_image - commands: - - make build-tarball - - build-agent: - depends_on: - - vendor - image: *golang_image - commands: - - apt update - - apt install -y zip - - make release-agent - - build-cli: - depends_on: - - vendor - image: *golang_image - commands: - - apt update - - apt install -y zip - - make release-cli - - build-deb-rpm: - depends_on: - - cross-compile-server - - build-agent - - build-cli - image: *golang_image - commands: - - make bundle - - checksums: - depends_on: - - cross-compile-server - - build-agent - - build-cli - - build-deb-rpm - - build-tarball - image: *golang_image - commands: - - make release-checksums - - release-dryrun: - depends_on: - - checksums - image: *golang_image - commands: - - ls -la dist/*.* - - cat dist/checksums.txt - - release: - depends_on: - - checksums - image: woodpeckerci/plugin-release:0.2.6 - settings: - api_key: - from_secret: github_token - files: - - dist/*.tar.gz - - dist/*.zip - - dist/*.deb - - dist/*.rpm - - dist/checksums.txt - title: ${CI_COMMIT_TAG##v} - when: - event: tag diff --git a/.woodpecker/docker.yaml b/.woodpecker/docker.yaml deleted file mode 100644 index 67cf70d8484..00000000000 --- a/.woodpecker/docker.yaml +++ /dev/null @@ -1,400 +0,0 @@ -variables: - - &golang_image 'docker.io/golang:1.26' - - &node_image 'docker.io/node:24-alpine' - - &xgo_image 'docker.io/techknowlogick/xgo:go-1.26.x' - - &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:6.0.4' - - &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' - - &platforms_alpine 'linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le' - - &build_args 'CI_COMMIT_SHA=${CI_COMMIT_SHA},CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH},CI_COMMIT_TAG=${CI_COMMIT_TAG}' - - # cspell:words woodpeckerbot netgo - - # vars used on push / tag events only - - publish_logins: &publish_logins # Default DockerHub login - - registry: https://index.docker.io/v1/ - username: woodpeckerbot - password: - from_secret: docker_password - # Additional Quay.IO login - - registry: https://quay.io - username: 'woodpeckerci+wp_ci' - password: - from_secret: QUAY_IO_TOKEN - - &publish_repos_server 'woodpeckerci/woodpecker-server,quay.io/woodpeckerci/woodpecker-server' - - &publish_repos_agent 'woodpeckerci/woodpecker-agent,quay.io/woodpeckerci/woodpecker-agent' - - &publish_repos_cli 'woodpeckerci/woodpecker-cli,quay.io/woodpeckerci/woodpecker-cli' - - path: &when_path # web source code - - 'web/**' - # api source code - - 'server/api/**' - # go source code - - '**/*.go' - - 'go.*' - # schema changes - - 'pipeline/schema/**' - # Dockerfile changes - - 'docker/**' - # pipeline config changes - - '.woodpecker/docker.yaml' - -when: - - event: [pull_request, tag] - - event: push - branch: ${CI_REPO_DEFAULT_BRANCH} - path: *when_path - - event: pull_request_metadata - evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' - -steps: - vendor: - image: *golang_image - pull: true - commands: - - go mod vendor - when: - - event: [pull_request, pull_request_metadata] - evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' - - event: pull_request - path: *when_path - - branch: - - ${CI_REPO_DEFAULT_BRANCH} - event: [push, tag] - path: *when_path - - ############### - # S e r v e r # - ############### - build-web: - image: *node_image - directory: web/ - commands: - - corepack enable - - pnpm install --frozen-lockfile - - pnpm build - when: - - event: [pull_request, pull_request_metadata] - evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' - - event: pull_request - path: *when_path - - branch: - - ${CI_REPO_DEFAULT_BRANCH} - event: [push, tag] - path: *when_path - - cross-compile-server-preview: - depends_on: - - vendor - - build-web - image: *xgo_image - pull: true - commands: - - apt update - - apt install -y tree - - make cross-compile-server - environment: - PLATFORMS: linux|amd64 - TAGS: sqlite sqlite_unlock_notify netgo - when: - - event: [pull_request, pull_request_metadata] - evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' - - event: pull_request - path: *when_path - - cross-compile-server: - depends_on: - - vendor - - build-web - image: *xgo_image - pull: true - commands: - - apt update - - apt install -y tree - - make cross-compile-server - environment: - PLATFORMS: linux|arm/v7;linux|arm64/v8;linux|amd64;linux|ppc64le;linux|riscv64 - TAGS: sqlite sqlite_unlock_notify netgo - when: - branch: - - ${CI_REPO_DEFAULT_BRANCH} - event: [push, tag] - path: *when_path - - publish-server-alpine-preview: - depends_on: - - cross-compile-server-preview - image: *buildx_plugin - settings: - repo: woodpeckerci/woodpecker-server - dockerfile: docker/Dockerfile.server.alpine.multiarch.rootless - platforms: *platforms_preview - tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine - logins: *publish_logins - when: &when-preview - evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' - event: [pull_request, pull_request_metadata] - - build-server-dryrun: - depends_on: - - vendor - - build-web - - cross-compile-server-preview - image: *buildx_plugin - settings: - dry_run: true - repo: woodpeckerci/woodpecker-server - dockerfile: docker/Dockerfile.server.multiarch.rootless - platforms: *platforms_preview - tag: pull_${CI_COMMIT_PULL_REQUEST} - when: &when-dryrun - - evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")' - event: pull_request - path: *when_path - - publish-next-server: - depends_on: - - cross-compile-server - image: *buildx_plugin - settings: - repo: *publish_repos_server - dockerfile: docker/Dockerfile.server.multiarch.rootless - platforms: *platforms_server - tag: [next, 'next-${CI_COMMIT_SHA:0:10}'] - logins: *publish_logins - when: &when-publish-next - branch: ${CI_REPO_DEFAULT_BRANCH} - event: push - path: *when_path - - publish-next-server-alpine: - depends_on: - - cross-compile-server - image: *buildx_plugin - settings: - repo: *publish_repos_server - dockerfile: docker/Dockerfile.server.alpine.multiarch.rootless - platforms: *platforms_alpine - tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine'] - logins: *publish_logins - when: *when-publish-next - - release-server: - depends_on: - - cross-compile-server - image: *buildx_plugin - settings: - repo: *publish_repos_server - dockerfile: docker/Dockerfile.server.multiarch.rootless - platforms: *platforms_server - tag: ['${CI_COMMIT_TAG%%.*}', '${CI_COMMIT_TAG%.*}', '${CI_COMMIT_TAG}'] - logins: *publish_logins - when: &when-release - event: tag - - release-server-alpine: - depends_on: - - cross-compile-server - image: *buildx_plugin - settings: - repo: *publish_repos_server - dockerfile: docker/Dockerfile.server.alpine.multiarch.rootless - platforms: *platforms_alpine - tag: ['${CI_COMMIT_TAG%%.*}-alpine', '${CI_COMMIT_TAG%.*}-alpine', '${CI_COMMIT_TAG}-alpine'] - logins: *publish_logins - when: *when-release - - ############# - # A g e n t # - ############# - - publish-agent-preview-alpine: - depends_on: - - vendor - image: *buildx_plugin - settings: - repo: woodpeckerci/woodpecker-agent - dockerfile: docker/Dockerfile.agent.alpine.multiarch - platforms: *platforms_preview - tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine - build_args: *build_args - logins: *publish_logins - when: *when-preview - - build-agent-dryrun: - depends_on: - - vendor - image: *buildx_plugin - settings: - dry_run: true - repo: woodpeckerci/woodpecker-agent - dockerfile: docker/Dockerfile.agent.multiarch - platforms: *platforms_preview - tag: pull_${CI_COMMIT_PULL_REQUEST} - build_args: *build_args - when: *when-dryrun - - publish-next-agent: - depends_on: - - vendor - # we also depend on cross-compile-server as we would have to hight - # ram usage otherwise - - cross-compile-server - image: *buildx_plugin - settings: - repo: *publish_repos_agent - dockerfile: docker/Dockerfile.agent.multiarch - platforms: *platforms_release - buildkit_oci_max_parallelism: 6 - tag: [next, 'next-${CI_COMMIT_SHA:0:10}'] - logins: *publish_logins - build_args: *build_args - when: - branch: ${CI_REPO_DEFAULT_BRANCH} - event: push - path: *when_path - - publish-next-agent-alpine: - depends_on: - - vendor - # we also depend on cross-compile-server as we would have to hight - # ram usage otherwise - - cross-compile-server - image: *buildx_plugin - settings: - repo: *publish_repos_agent - dockerfile: docker/Dockerfile.agent.alpine.multiarch - platforms: *platforms_alpine - tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine'] - logins: *publish_logins - build_args: *build_args - when: *when-publish-next - - release-agent: - depends_on: - - vendor - # we also depend on cross-compile-server as we would have to hight - # ram usage otherwise - - cross-compile-server - image: *buildx_plugin - settings: - repo: *publish_repos_agent - dockerfile: docker/Dockerfile.agent.multiarch - platforms: *platforms_release - buildkit_oci_max_parallelism: 6 - tag: ['${CI_COMMIT_TAG%%.*}', '${CI_COMMIT_TAG%.*}', '${CI_COMMIT_TAG}'] - logins: *publish_logins - build_args: *build_args - when: *when-release - - release-agent-alpine: - depends_on: - - vendor - # we also depend on cross-compile-server as we would have to hight - # ram usage otherwise - - cross-compile-server - image: *buildx_plugin - settings: - repo: *publish_repos_agent - dockerfile: docker/Dockerfile.agent.alpine.multiarch - platforms: *platforms_alpine - tag: ['${CI_COMMIT_TAG%%.*}-alpine', '${CI_COMMIT_TAG%.*}-alpine', '${CI_COMMIT_TAG}-alpine'] - logins: *publish_logins - build_args: *build_args - when: *when-release - - ######### - # C L I # - ######### - - build-cli-alpine-preview: - depends_on: - - vendor - image: *buildx_plugin - settings: - repo: woodpeckerci/woodpecker-cli - dockerfile: docker/Dockerfile.cli.alpine.multiarch.rootless - platforms: *platforms_preview - tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine - build_args: *build_args - logins: *publish_logins - when: *when-preview - - build-cli-dryrun: - depends_on: - - vendor - image: *buildx_plugin - settings: - dry_run: true - repo: woodpeckerci/woodpecker-cli - dockerfile: docker/Dockerfile.cli.multiarch.rootless - platforms: *platforms_preview - tag: pull_${CI_COMMIT_PULL_REQUEST} - build_args: *build_args - when: *when-dryrun - - publish-next-cli: - depends_on: - - vendor - # we also depend on publish-next-agent as we would have to hight - # ram usage otherwise - - publish-next-agent - image: *buildx_plugin - settings: - repo: *publish_repos_cli - dockerfile: docker/Dockerfile.cli.multiarch.rootless - platforms: *platforms_release - buildkit_oci_max_parallelism: 6 - tag: [next, 'next-${CI_COMMIT_SHA:0:10}'] - logins: *publish_logins - build_args: *build_args - when: *when-publish-next - - publish-next-cli-alpine: - depends_on: - - vendor - # we also depend on publish-next-agent as we would have to hight - # ram usage otherwise - - publish-next-agent - image: *buildx_plugin - settings: - repo: *publish_repos_cli - dockerfile: docker/Dockerfile.cli.alpine.multiarch.rootless - platforms: *platforms_alpine - tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine'] - logins: *publish_logins - build_args: *build_args - when: *when-publish-next - - release-cli: - depends_on: - - vendor - # we also depend on release-agent as we would have to hight - # ram usage otherwise - - release-agent - image: *buildx_plugin - settings: - repo: *publish_repos_cli - dockerfile: docker/Dockerfile.cli.multiarch.rootless - platforms: *platforms_release - buildkit_oci_max_parallelism: 6 - tag: ['${CI_COMMIT_TAG%%.*}', '${CI_COMMIT_TAG%.*}', '${CI_COMMIT_TAG}'] - logins: *publish_logins - build_args: *build_args - when: *when-release - - release-cli-alpine: - depends_on: - - vendor - # we also depend on release-agent as we would have to hight - # ram usage otherwise - - release-agent - image: *buildx_plugin - settings: - repo: *publish_repos_cli - dockerfile: docker/Dockerfile.cli.alpine.multiarch.rootless - platforms: *platforms_alpine - tag: ['${CI_COMMIT_TAG%%.*}-alpine', '${CI_COMMIT_TAG%.*}-alpine', '${CI_COMMIT_TAG}-alpine'] - logins: *publish_logins - build_args: *build_args - when: *when-release diff --git a/.woodpecker/docs.yaml b/.woodpecker/docs.yaml deleted file mode 100644 index 747f6e67e59..00000000000 --- a/.woodpecker/docs.yaml +++ /dev/null @@ -1,173 +0,0 @@ -variables: - - &golang_image 'docker.io/golang:1.26' - - &node_image 'docker.io/node:24-alpine' - - &alpine_image 'docker.io/alpine:3.23' - - path: &when_path - - 'docs/**' - - '.woodpecker/docs.yaml' - # since we generate docs for cli tool we have to watch this too - - 'cli/**' - - 'cmd/cli/**' - # api docs - - 'server/api/**' - - path: &docker_path # web source code - - 'web/**' - # api source code - - 'server/api/**' - # go source code - - '**/*.go' - - 'go.*' - # schema changes - - 'pipeline/schema/**' - # Dockerfile changes - - 'docker/**' - -when: - - event: tag - - event: pull_request - - event: push - path: - - <<: *when_path - - <<: *docker_path - branch: - - ${CI_REPO_DEFAULT_BRANCH} - - event: pull_request_closed - path: *when_path - - event: manual - evaluate: 'TASK == "docs"' - -steps: - - name: install-dependencies - image: *node_image - directory: docs/ - commands: - - corepack enable - - pnpm install --frozen-lockfile - when: - - path: *when_path - event: [tag, pull_request, push] - - event: manual - - - name: format-check - image: *node_image - directory: docs/ - commands: - - corepack enable - - pnpm format:check - when: - - path: *when_path - event: pull_request - - - name: build-cli - image: *golang_image - commands: - - make generate-docs - when: - - path: *when_path - event: [tag, pull_request, push] - - event: manual - - - name: build - image: *node_image - directory: docs/ - commands: - - corepack enable - - pnpm build - when: - - path: *when_path - event: [tag, pull_request, push] - - event: manual - - - name: deploy-preview - image: docker.io/woodpeckerci/plugin-surge-preview:1.4.2 - settings: - path: 'docs/build/' - surge_token: - from_secret: SURGE_TOKEN - forge_repo_token: - from_secret: GITHUB_TOKEN_SURGE - failure: ignore - when: - - event: [pull_request, pull_request_closed] - path: *when_path - - - name: deploy-prepare - image: *alpine_image - environment: - BOT_PRIVATE_KEY: - from_secret: BOT_PRIVATE_KEY - commands: - - apk add openssh-client git - - mkdir -p $HOME/.ssh - - ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts - - echo "$BOT_PRIVATE_KEY" > $HOME/.ssh/id_rsa - - chmod 0600 $HOME/.ssh/id_rsa - - git clone --depth 1 --single-branch git@github.com:woodpecker-ci/woodpecker-ci.github.io.git ./docs_repo - when: - - event: push - path: - - <<: *when_path - - <<: *docker_path - branch: ${CI_REPO_DEFAULT_BRANCH} - - event: [manual, tag] - - # update latest and next version - - name: version-next - image: *alpine_image - commands: - - apk add jq - - jq '.next = "next-${CI_COMMIT_SHA:0:10}"' ./docs_repo/version.json > ./docs_repo/version.json.tmp - - mv ./docs_repo/version.json.tmp ./docs_repo/version.json - when: - - event: push - path: *docker_path - branch: ${CI_REPO_DEFAULT_BRANCH} - - - name: version-release - image: *alpine_image - commands: - - apk add jq - - if [[ "${CI_COMMIT_TAG}" != *"rc"* ]] ; then jq '.latest = "${CI_COMMIT_TAG}"' ./docs_repo/version.json > ./docs_repo/version.json.tmp && mv ./docs_repo/version.json.tmp ./docs_repo/version.json ; fi - - jq '.rc = "${CI_COMMIT_TAG}"' ./docs_repo/version.json > ./docs_repo/version.json.tmp - - mv ./docs_repo/version.json.tmp ./docs_repo/version.json - when: - - event: tag - - - name: copy-files - image: *alpine_image - commands: - - apk add rsync - # copy all docs files and delete all old ones, but leave CNAME, index.yaml and version.json untouched - - rsync -r --exclude .git --exclude CNAME --exclude index.yaml --exclude README.md --exclude version.json --delete docs/build/ ./docs_repo - when: - - event: push - path: *when_path - branch: ${CI_REPO_DEFAULT_BRANCH} - - event: manual - - - name: deploy - image: *alpine_image - environment: - BOT_PRIVATE_KEY: - from_secret: BOT_PRIVATE_KEY - commands: - - apk add openssh-client rsync git - - mkdir -p $HOME/.ssh - - ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts - - echo "$BOT_PRIVATE_KEY" > $HOME/.ssh/id_rsa - - chmod 0600 $HOME/.ssh/id_rsa - - git config --global user.email "woodpecker-bot@obermui.de" - - git config --global user.name "woodpecker-bot" - - cd ./docs_repo - - git add . - # exit successfully if nothing changed - - test -n "$(git status --porcelain)" || exit 0 - - git commit -m "Deploy website - based on ${CI_COMMIT_SHA}" - - git push - when: - - event: push - path: - - <<: *when_path - - <<: *docker_path - branch: ${CI_REPO_DEFAULT_BRANCH} - - event: [manual, tag] diff --git a/.woodpecker/links.yaml b/.woodpecker/links.yaml deleted file mode 100644 index f23ce6056e1..00000000000 --- a/.woodpecker/links.yaml +++ /dev/null @@ -1,31 +0,0 @@ -when: - - event: cron - cron: links - -steps: - - name: links - image: docker.io/lycheeverse/lychee:0.23.0 - failure: ignore - depends_on: [] - commands: - - lychee pipeline/frontend/yaml/linter/schema/schema.json > links.md - - lychee --exclude localhost docs/docs/ >> links.md - - lychee --exclude localhost docs/src/pages/ >> links.md - - echo -e "\nLast checked:$(date)" >> links.md - - - name: Update issue - image: docker.io/alpine:3.23 - depends_on: links - environment: - GITHUB_TOKEN: - from_secret: github_token - commands: - - apk add -q --no-cache jq curl - - export ISSUE_NUMBER=5326 - - export DESCRIPTION=$(cat links.md) - - | - curl -X PATCH \ - -H "Authorization: token $GITHUB_TOKEN" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${CI_REPO}/issues/$ISSUE_NUMBER \ - -d "$(jq -n --arg body "$DESCRIPTION" '{body: $body}')" diff --git a/.woodpecker/release-helper.yaml b/.woodpecker/release-helper.yaml deleted file mode 100644 index 31ad2385587..00000000000 --- a/.woodpecker/release-helper.yaml +++ /dev/null @@ -1,15 +0,0 @@ -when: - - event: push - branch: - - ${CI_REPO_DEFAULT_BRANCH} - - release/* - -steps: - - name: release-helper - image: docker.io/woodpeckerci/plugin-ready-release-go:4.0.0 - settings: - release_branch: ${CI_COMMIT_BRANCH} - forge_type: github - git_email: woodpecker-bot@obermui.de - github_token: - from_secret: GITHUB_TOKEN diff --git a/.woodpecker/securityscan.yaml b/.woodpecker/securityscan.yaml deleted file mode 100644 index ee396b62ca6..00000000000 --- a/.woodpecker/securityscan.yaml +++ /dev/null @@ -1,42 +0,0 @@ -when: - - event: [pull_request] - - event: push - branch: - - ${CI_REPO_DEFAULT_BRANCH} - -variables: - - &trivy_plugin docker.io/woodpeckerci/plugin-trivy:1.4.4 - -steps: - backend: - depends_on: [] - image: *trivy_plugin - settings: - server: server - skip-dirs: web/,docs/ - - docs: - depends_on: [] - image: *trivy_plugin - settings: - server: server - skip-dirs: node_modules/,plugins/woodpecker-plugins/node_modules/ - dir: docs/ - - web: - depends_on: [] - image: *trivy_plugin - settings: - server: server - skip-dirs: node_modules/ - dir: web/ - -services: - server: - image: *trivy_plugin - failure: ignore # as we don't care about the exit code - settings: - service: true - db-repository: mirror.gcr.io/aquasec/trivy-db:2 - ports: - - 10000 diff --git a/.woodpecker/social.yaml b/.woodpecker/social.yaml deleted file mode 100644 index 41e5caaf6b4..00000000000 --- a/.woodpecker/social.yaml +++ /dev/null @@ -1,45 +0,0 @@ -depends_on: - - docker - - binaries - -when: - - event: tag - evaluate: 'CI_COMMIT_TAG matches "^v?[0-9]+\\\\.[0-9]+\\\\.[0-9]+$"' - -steps: - - name: mastodon-toot - image: docker.io/woodpeckerci/plugin-mastodon-post - settings: - server_url: https://floss.social - access_token: - from_secret: mastodon_token - visibility: public - ai_token: - from_secret: openai_token - ai_prompt: | - We want to present the next version of our app on Mastodon. - Therefore we want to post a catching text, so users will know why they should - update to the newest version. Highlight the most special features. If there is no special feature - included just summarize the changes in a few sentences. The whole text should not be longer than 240 - characters. Avoid naming contributors from. Use #WoodpeckerCI, #release and - additional fitting hashtags and emojis to make the post more appealing - - The changelog entry: {{ changelog }} - - - name: bluesky-post - image: docker.io/woodpeckerci/plugin-bluesky-post - settings: - app_password: - from_secret: bluesky_token - identifier: woodpecker-ci.org - ai_token: - from_secret: openai_token - ai_prompt: | - We want to present the next version of our app on Mastodon. - Therefore we want to post a catching text, so users will know why they should - update to the newest version. Highlight the most special features. If there is no special feature - included just summarize the changes in a few sentences. The whole text should not be longer than 240 - characters. Avoid naming contributors from. Use #WoodpeckerCI, #release and - additional fitting hashtags and emojis to make the post more appealing - - The changelog entry: {{ changelog }} diff --git a/.woodpecker/static.yaml b/.woodpecker/static.yaml deleted file mode 100644 index d46741e9a3a..00000000000 --- a/.woodpecker/static.yaml +++ /dev/null @@ -1,26 +0,0 @@ -when: - - event: pull_request - -steps: - - name: lint-editorconfig - image: docker.io/woodpeckerci/plugin-editorconfig-checker:0.3.3 - depends_on: [] - when: - - event: pull_request - - - name: spellcheck - image: docker.io/node:24-alpine - depends_on: [] - commands: - - corepack enable - - pnpx cspell lint --no-progress --gitignore '{**,.*}/{*,.*}' - - apk add --no-cache -U tree # busybox tree don't understand "-I" - # cspell:disable-next-line - - tree --gitignore -I 012_columns_rename_procs_to_steps.go -I versioned_docs -I '*opensource.svg'| pnpx cspell lint --no-progress stdin - - - name: prettier - image: docker.io/woodpeckerci/plugin-prettier:next - pull: true - depends_on: [] - settings: - version: 3.6.2 diff --git a/.woodpecker/web.yaml b/.woodpecker/web.yaml deleted file mode 100644 index 886c52400ef..00000000000 --- a/.woodpecker/web.yaml +++ /dev/null @@ -1,66 +0,0 @@ -when: - - event: pull_request - - event: push - branch: - - release/* - -variables: - - &node_image 'docker.io/node:24-alpine' - - &when - path: - # related config files - - '.woodpecker/web.yaml' - # web source code - - 'web/**' - # api source code - - 'server/api/**' - -steps: - install-dependencies: - image: *node_image - directory: web/ - commands: - - corepack enable - - pnpm install --frozen-lockfile - when: *when - - lint: - depends_on: - - install-dependencies - image: *node_image - directory: web/ - commands: - - corepack enable - - pnpm lint - when: *when - - format-check: - depends_on: - - install-dependencies - image: *node_image - directory: web/ - commands: - - corepack enable - - pnpm format:check - when: *when - - typecheck: - depends_on: - - install-dependencies - image: *node_image - directory: web/ - commands: - - corepack enable - - pnpm typecheck - when: *when - - test: - depends_on: - - install-dependencies - - format-check # wait for it else test artifacts are falsely detected as wrong - image: *node_image - directory: web/ - commands: - - corepack enable - - pnpm test - when: *when From 7e93949923613c0c17105af3b410d402b76c4096 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 6 Mar 2026 19:28:36 +0100 Subject: [PATCH 06/15] try again with full path --- .woodpecker/test.yaml | 134 +----------------------------------------- 1 file changed, 2 insertions(+), 132 deletions(-) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 28406ef0a07..ed8775c563d 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -21,140 +21,10 @@ when: path: *when_path steps: - vendor: - image: *golang_image - commands: - - go mod vendor - when: - path: - - <<: *when_path - - '.woodpecker/**' - - lint-pipeline: - depends_on: - - vendor - image: *golang_image - commands: - - go run go.woodpecker-ci.org/woodpecker/v3/cmd/cli lint - environment: - WOODPECKER_DISABLE_UPDATE_CHECK: true - WOODPECKER_LINT_STRICT: true - WOODPECKER_PLUGINS_PRIVILEGED: 'docker.io/woodpeckerci/plugin-docker-buildx' - when: - - event: pull_request - path: - - '.woodpecker/**' - - dummy-web: - image: *golang_image - commands: - - mkdir -p web/dist/ - - echo "test" > web/dist/index.html - when: - - path: *when_path - - lint: - depends_on: - - vendor - image: golangci/golangci-lint:v2.10.1 - commands: - - make lint - when: *when - - check-openapi: - depends_on: - - vendor - image: *golang_image - commands: - - 'make generate-openapi' - - 'DIFF=$(git diff | head)' - - '[ -n "$DIFF" ] && { echo "openapi not up to date, exec `make generate-openapi` and commit"; exit 1; } || true' - when: *when - lint-license-header: image: *golang_image commands: - make install-addlicense # cspell:words addlicense - - 'addlicense -check -ignore "vendor/**" -ignore cmd/server/openapi/docs.go **/*.go' - when: *when - - test: - depends_on: - - vendor - image: *golang_image - commands: - - make test-agent - - make test-server - - make test-cli - - make test-lib - when: - - path: *when_path - - sqlite: - depends_on: - - vendor - image: *golang_image - environment: - WOODPECKER_DATABASE_DRIVER: sqlite3 - commands: - - make test-server-datastore-coverage - when: - - path: *when_path - - postgres: - depends_on: - - vendor - image: *golang_image - environment: - WOODPECKER_DATABASE_DRIVER: postgres - WOODPECKER_DATABASE_DATASOURCE: 'host=postgres user=postgres dbname=postgres sslmode=disable' # cspell:disable-line - commands: - - make test-server-datastore - when: *when - - mysql: - depends_on: - - vendor - image: *golang_image - environment: - WOODPECKER_DATABASE_DRIVER: mysql - WOODPECKER_DATABASE_DATASOURCE: root@tcp(mysql:3306)/test?parseTime=true - commands: - - make test-server-datastore - when: *when - - codecov: - depends_on: - - test - - sqlite - pull: true - image: docker.io/woodpeckerci/plugin-codecov:2.2.2 - settings: - files: - - agent-coverage.out - - cli-coverage.out - - coverage.out - - server-coverage.out - - datastore-coverage.out - token: - from_secret: codecov_token - when: - - path: *when_path - failure: ignore - -services: - postgres: - image: docker.io/postgres:18 - ports: ['5432'] - environment: - POSTGRES_USER: postgres - POSTGRES_HOST_AUTH_METHOD: trust - when: *when - - mysql: - image: docker.io/mysql:9.6.0 - ports: ['3306'] - environment: - MYSQL_DATABASE: test - MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + - pwd + - 'addlicense -check -ignore "vendor/**" -ignore cmd/server/openapi/docs.go $(pwd)/**/*.go' when: *when From ec5fb1e04c4e3025e694a47f03a463a2121b95fe Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 19 Mar 2026 13:00:44 +0100 Subject: [PATCH 07/15] try the explicite way --- .woodpecker/test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index ed8775c563d..d6ef0975bc8 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -24,7 +24,7 @@ steps: lint-license-header: image: *golang_image commands: - - make install-addlicense # cspell:words addlicense - - pwd - - 'addlicense -check -ignore "vendor/**" -ignore cmd/server/openapi/docs.go $(pwd)/**/*.go' + - make generate-license-header + - 'DIFF=$(git diff | head)' + - '[ -n "$DIFF" ] && { echo "license headers not up to date, exec `make generate-license-header` and commit"; exit 1; } || true' when: *when From e7dc5d83efe6057e345e561e85981d85645e55f6 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 19 Mar 2026 13:02:32 +0100 Subject: [PATCH 08/15] try more --- .woodpecker/test.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index d6ef0975bc8..5a90debea0e 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -24,6 +24,9 @@ steps: lint-license-header: image: *golang_image commands: + - pwd + - ls + - echo **/*.go - make generate-license-header - 'DIFF=$(git diff | head)' - '[ -n "$DIFF" ] && { echo "license headers not up to date, exec `make generate-license-header` and commit"; exit 1; } || true' From 4ac02d8a3f089d0335be397a3185cb7d0ac20454 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 19 Mar 2026 13:06:09 +0100 Subject: [PATCH 09/15] enable globstar --- .woodpecker/test.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 5a90debea0e..201d1c7fc55 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -24,9 +24,7 @@ steps: lint-license-header: image: *golang_image commands: - - pwd - - ls - - echo **/*.go + - shopt -s globstar - make generate-license-header - 'DIFF=$(git diff | head)' - '[ -n "$DIFF" ] && { echo "license headers not up to date, exec `make generate-license-header` and commit"; exit 1; } || true' From 72e665db0df21a8299756f26fcb5d6d54d5f8517 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 19 Mar 2026 13:15:57 +0100 Subject: [PATCH 10/15] more debug --- .woodpecker/test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 201d1c7fc55..b628428c572 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -24,6 +24,8 @@ steps: lint-license-header: image: *golang_image commands: + - env + - ls /bin/sh /bin/bash - shopt -s globstar - make generate-license-header - 'DIFF=$(git diff | head)' From 1e80c53b7f5134365fe6458fe894cfe51c0f387e Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 19 Mar 2026 13:17:04 +0100 Subject: [PATCH 11/15] explicitely use bash --- .woodpecker/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index b628428c572..4ee135b70f7 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -23,9 +23,9 @@ when: steps: lint-license-header: image: *golang_image + # use bash as shell so we can use ** + entrypoint: ["/bin/bash", "-c", "echo $CI_SCRIPT | base64 -d | /bin/sh -e"] commands: - - env - - ls /bin/sh /bin/bash - shopt -s globstar - make generate-license-header - 'DIFF=$(git diff | head)' From fe75731fc4e5e1a01a15f5a9af767cd980533495 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 19 Mar 2026 13:26:40 +0100 Subject: [PATCH 12/15] directly run in bash --- .woodpecker/test.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 4ee135b70f7..1ba11f03b1c 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -23,11 +23,7 @@ when: steps: lint-license-header: image: *golang_image - # use bash as shell so we can use ** - entrypoint: ["/bin/bash", "-c", "echo $CI_SCRIPT | base64 -d | /bin/sh -e"] commands: - - shopt -s globstar - - make generate-license-header - - 'DIFF=$(git diff | head)' - - '[ -n "$DIFF" ] && { echo "license headers not up to date, exec `make generate-license-header` and commit"; exit 1; } || true' + - make install-addlicense # cspell:words addlicense + - bash -c 'shopt -s globstar; addlicense -check -ignore "vendor/**" -ignore cmd/server/openapi/docs.go **/*.go' when: *when From 6c77b5918657fbe1916762e82730036a8b81cc3c Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 19 Mar 2026 13:27:41 +0100 Subject: [PATCH 13/15] success again --- cmd/cli/app.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmd/cli/app.go b/cmd/cli/app.go index dd97ceb6c63..6d65561fbcf 100644 --- a/cmd/cli/app.go +++ b/cmd/cli/app.go @@ -1,3 +1,17 @@ +// Copyright 2021 Woodpecker Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( From 23df2300becc580c58e4bdb543602a09481ec7ce Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 19 Mar 2026 13:29:09 +0100 Subject: [PATCH 14/15] restore pipelines --- .woodpecker/binaries.yaml | 114 +++++++++ .woodpecker/docker.yaml | 400 ++++++++++++++++++++++++++++++++ .woodpecker/docs.yaml | 173 ++++++++++++++ .woodpecker/links.yaml | 31 +++ .woodpecker/release-helper.yaml | 15 ++ .woodpecker/securityscan.yaml | 42 ++++ .woodpecker/social.yaml | 45 ++++ .woodpecker/static.yaml | 26 +++ .woodpecker/test.yaml | 131 +++++++++++ .woodpecker/web.yaml | 66 ++++++ 10 files changed, 1043 insertions(+) create mode 100644 .woodpecker/binaries.yaml create mode 100644 .woodpecker/docker.yaml create mode 100644 .woodpecker/docs.yaml create mode 100644 .woodpecker/links.yaml create mode 100644 .woodpecker/release-helper.yaml create mode 100644 .woodpecker/securityscan.yaml create mode 100644 .woodpecker/social.yaml create mode 100644 .woodpecker/static.yaml create mode 100644 .woodpecker/web.yaml diff --git a/.woodpecker/binaries.yaml b/.woodpecker/binaries.yaml new file mode 100644 index 00000000000..a08bbb753da --- /dev/null +++ b/.woodpecker/binaries.yaml @@ -0,0 +1,114 @@ +when: + - event: tag + - event: pull_request + branch: ${CI_REPO_DEFAULT_BRANCH} + path: + - Makefile + - .woodpecker/binaries.yaml + +variables: + - &golang_image 'docker.io/golang:1.26' + - &node_image 'docker.io/node:24-alpine' + - &xgo_image 'docker.io/techknowlogick/xgo:go-1.26.x' + +# cspell:words bindata netgo + +steps: + build-web: + image: *node_image + directory: web/ + commands: + - corepack enable + - pnpm install --frozen-lockfile + - pnpm build + + vendor: + image: *golang_image + commands: + - go mod vendor + + cross-compile-server: + depends_on: + - vendor + - build-web + image: *xgo_image + pull: true + commands: + - apt update + - apt install -y tree + - make cross-compile-server + environment: + PLATFORMS: linux|arm64/v8;linux|amd64;linux|riscv64;windows|amd64 + TAGS: bindata sqlite sqlite_unlock_notify netgo + ARCHIVE_IT: '1' + + build-tarball: + depends_on: + - vendor + - build-web + image: *golang_image + commands: + - make build-tarball + + build-agent: + depends_on: + - vendor + image: *golang_image + commands: + - apt update + - apt install -y zip + - make release-agent + + build-cli: + depends_on: + - vendor + image: *golang_image + commands: + - apt update + - apt install -y zip + - make release-cli + + build-deb-rpm: + depends_on: + - cross-compile-server + - build-agent + - build-cli + image: *golang_image + commands: + - make bundle + + checksums: + depends_on: + - cross-compile-server + - build-agent + - build-cli + - build-deb-rpm + - build-tarball + image: *golang_image + commands: + - make release-checksums + + release-dryrun: + depends_on: + - checksums + image: *golang_image + commands: + - ls -la dist/*.* + - cat dist/checksums.txt + + release: + depends_on: + - checksums + image: woodpeckerci/plugin-release:0.3.0 + settings: + api_key: + from_secret: github_token + files: + - dist/*.tar.gz + - dist/*.zip + - dist/*.deb + - dist/*.rpm + - dist/checksums.txt + title: ${CI_COMMIT_TAG##v} + when: + event: tag diff --git a/.woodpecker/docker.yaml b/.woodpecker/docker.yaml new file mode 100644 index 00000000000..67cf70d8484 --- /dev/null +++ b/.woodpecker/docker.yaml @@ -0,0 +1,400 @@ +variables: + - &golang_image 'docker.io/golang:1.26' + - &node_image 'docker.io/node:24-alpine' + - &xgo_image 'docker.io/techknowlogick/xgo:go-1.26.x' + - &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:6.0.4' + - &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' + - &platforms_alpine 'linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le' + - &build_args 'CI_COMMIT_SHA=${CI_COMMIT_SHA},CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH},CI_COMMIT_TAG=${CI_COMMIT_TAG}' + + # cspell:words woodpeckerbot netgo + + # vars used on push / tag events only + - publish_logins: &publish_logins # Default DockerHub login + - registry: https://index.docker.io/v1/ + username: woodpeckerbot + password: + from_secret: docker_password + # Additional Quay.IO login + - registry: https://quay.io + username: 'woodpeckerci+wp_ci' + password: + from_secret: QUAY_IO_TOKEN + - &publish_repos_server 'woodpeckerci/woodpecker-server,quay.io/woodpeckerci/woodpecker-server' + - &publish_repos_agent 'woodpeckerci/woodpecker-agent,quay.io/woodpeckerci/woodpecker-agent' + - &publish_repos_cli 'woodpeckerci/woodpecker-cli,quay.io/woodpeckerci/woodpecker-cli' + - path: &when_path # web source code + - 'web/**' + # api source code + - 'server/api/**' + # go source code + - '**/*.go' + - 'go.*' + # schema changes + - 'pipeline/schema/**' + # Dockerfile changes + - 'docker/**' + # pipeline config changes + - '.woodpecker/docker.yaml' + +when: + - event: [pull_request, tag] + - event: push + branch: ${CI_REPO_DEFAULT_BRANCH} + path: *when_path + - event: pull_request_metadata + evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' + +steps: + vendor: + image: *golang_image + pull: true + commands: + - go mod vendor + when: + - event: [pull_request, pull_request_metadata] + evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' + - event: pull_request + path: *when_path + - branch: + - ${CI_REPO_DEFAULT_BRANCH} + event: [push, tag] + path: *when_path + + ############### + # S e r v e r # + ############### + build-web: + image: *node_image + directory: web/ + commands: + - corepack enable + - pnpm install --frozen-lockfile + - pnpm build + when: + - event: [pull_request, pull_request_metadata] + evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' + - event: pull_request + path: *when_path + - branch: + - ${CI_REPO_DEFAULT_BRANCH} + event: [push, tag] + path: *when_path + + cross-compile-server-preview: + depends_on: + - vendor + - build-web + image: *xgo_image + pull: true + commands: + - apt update + - apt install -y tree + - make cross-compile-server + environment: + PLATFORMS: linux|amd64 + TAGS: sqlite sqlite_unlock_notify netgo + when: + - event: [pull_request, pull_request_metadata] + evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' + - event: pull_request + path: *when_path + + cross-compile-server: + depends_on: + - vendor + - build-web + image: *xgo_image + pull: true + commands: + - apt update + - apt install -y tree + - make cross-compile-server + environment: + PLATFORMS: linux|arm/v7;linux|arm64/v8;linux|amd64;linux|ppc64le;linux|riscv64 + TAGS: sqlite sqlite_unlock_notify netgo + when: + branch: + - ${CI_REPO_DEFAULT_BRANCH} + event: [push, tag] + path: *when_path + + publish-server-alpine-preview: + depends_on: + - cross-compile-server-preview + image: *buildx_plugin + settings: + repo: woodpeckerci/woodpecker-server + dockerfile: docker/Dockerfile.server.alpine.multiarch.rootless + platforms: *platforms_preview + tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine + logins: *publish_logins + when: &when-preview + evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"' + event: [pull_request, pull_request_metadata] + + build-server-dryrun: + depends_on: + - vendor + - build-web + - cross-compile-server-preview + image: *buildx_plugin + settings: + dry_run: true + repo: woodpeckerci/woodpecker-server + dockerfile: docker/Dockerfile.server.multiarch.rootless + platforms: *platforms_preview + tag: pull_${CI_COMMIT_PULL_REQUEST} + when: &when-dryrun + - evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")' + event: pull_request + path: *when_path + + publish-next-server: + depends_on: + - cross-compile-server + image: *buildx_plugin + settings: + repo: *publish_repos_server + dockerfile: docker/Dockerfile.server.multiarch.rootless + platforms: *platforms_server + tag: [next, 'next-${CI_COMMIT_SHA:0:10}'] + logins: *publish_logins + when: &when-publish-next + branch: ${CI_REPO_DEFAULT_BRANCH} + event: push + path: *when_path + + publish-next-server-alpine: + depends_on: + - cross-compile-server + image: *buildx_plugin + settings: + repo: *publish_repos_server + dockerfile: docker/Dockerfile.server.alpine.multiarch.rootless + platforms: *platforms_alpine + tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine'] + logins: *publish_logins + when: *when-publish-next + + release-server: + depends_on: + - cross-compile-server + image: *buildx_plugin + settings: + repo: *publish_repos_server + dockerfile: docker/Dockerfile.server.multiarch.rootless + platforms: *platforms_server + tag: ['${CI_COMMIT_TAG%%.*}', '${CI_COMMIT_TAG%.*}', '${CI_COMMIT_TAG}'] + logins: *publish_logins + when: &when-release + event: tag + + release-server-alpine: + depends_on: + - cross-compile-server + image: *buildx_plugin + settings: + repo: *publish_repos_server + dockerfile: docker/Dockerfile.server.alpine.multiarch.rootless + platforms: *platforms_alpine + tag: ['${CI_COMMIT_TAG%%.*}-alpine', '${CI_COMMIT_TAG%.*}-alpine', '${CI_COMMIT_TAG}-alpine'] + logins: *publish_logins + when: *when-release + + ############# + # A g e n t # + ############# + + publish-agent-preview-alpine: + depends_on: + - vendor + image: *buildx_plugin + settings: + repo: woodpeckerci/woodpecker-agent + dockerfile: docker/Dockerfile.agent.alpine.multiarch + platforms: *platforms_preview + tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine + build_args: *build_args + logins: *publish_logins + when: *when-preview + + build-agent-dryrun: + depends_on: + - vendor + image: *buildx_plugin + settings: + dry_run: true + repo: woodpeckerci/woodpecker-agent + dockerfile: docker/Dockerfile.agent.multiarch + platforms: *platforms_preview + tag: pull_${CI_COMMIT_PULL_REQUEST} + build_args: *build_args + when: *when-dryrun + + publish-next-agent: + depends_on: + - vendor + # we also depend on cross-compile-server as we would have to hight + # ram usage otherwise + - cross-compile-server + image: *buildx_plugin + settings: + repo: *publish_repos_agent + dockerfile: docker/Dockerfile.agent.multiarch + platforms: *platforms_release + buildkit_oci_max_parallelism: 6 + tag: [next, 'next-${CI_COMMIT_SHA:0:10}'] + logins: *publish_logins + build_args: *build_args + when: + branch: ${CI_REPO_DEFAULT_BRANCH} + event: push + path: *when_path + + publish-next-agent-alpine: + depends_on: + - vendor + # we also depend on cross-compile-server as we would have to hight + # ram usage otherwise + - cross-compile-server + image: *buildx_plugin + settings: + repo: *publish_repos_agent + dockerfile: docker/Dockerfile.agent.alpine.multiarch + platforms: *platforms_alpine + tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine'] + logins: *publish_logins + build_args: *build_args + when: *when-publish-next + + release-agent: + depends_on: + - vendor + # we also depend on cross-compile-server as we would have to hight + # ram usage otherwise + - cross-compile-server + image: *buildx_plugin + settings: + repo: *publish_repos_agent + dockerfile: docker/Dockerfile.agent.multiarch + platforms: *platforms_release + buildkit_oci_max_parallelism: 6 + tag: ['${CI_COMMIT_TAG%%.*}', '${CI_COMMIT_TAG%.*}', '${CI_COMMIT_TAG}'] + logins: *publish_logins + build_args: *build_args + when: *when-release + + release-agent-alpine: + depends_on: + - vendor + # we also depend on cross-compile-server as we would have to hight + # ram usage otherwise + - cross-compile-server + image: *buildx_plugin + settings: + repo: *publish_repos_agent + dockerfile: docker/Dockerfile.agent.alpine.multiarch + platforms: *platforms_alpine + tag: ['${CI_COMMIT_TAG%%.*}-alpine', '${CI_COMMIT_TAG%.*}-alpine', '${CI_COMMIT_TAG}-alpine'] + logins: *publish_logins + build_args: *build_args + when: *when-release + + ######### + # C L I # + ######### + + build-cli-alpine-preview: + depends_on: + - vendor + image: *buildx_plugin + settings: + repo: woodpeckerci/woodpecker-cli + dockerfile: docker/Dockerfile.cli.alpine.multiarch.rootless + platforms: *platforms_preview + tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine + build_args: *build_args + logins: *publish_logins + when: *when-preview + + build-cli-dryrun: + depends_on: + - vendor + image: *buildx_plugin + settings: + dry_run: true + repo: woodpeckerci/woodpecker-cli + dockerfile: docker/Dockerfile.cli.multiarch.rootless + platforms: *platforms_preview + tag: pull_${CI_COMMIT_PULL_REQUEST} + build_args: *build_args + when: *when-dryrun + + publish-next-cli: + depends_on: + - vendor + # we also depend on publish-next-agent as we would have to hight + # ram usage otherwise + - publish-next-agent + image: *buildx_plugin + settings: + repo: *publish_repos_cli + dockerfile: docker/Dockerfile.cli.multiarch.rootless + platforms: *platforms_release + buildkit_oci_max_parallelism: 6 + tag: [next, 'next-${CI_COMMIT_SHA:0:10}'] + logins: *publish_logins + build_args: *build_args + when: *when-publish-next + + publish-next-cli-alpine: + depends_on: + - vendor + # we also depend on publish-next-agent as we would have to hight + # ram usage otherwise + - publish-next-agent + image: *buildx_plugin + settings: + repo: *publish_repos_cli + dockerfile: docker/Dockerfile.cli.alpine.multiarch.rootless + platforms: *platforms_alpine + tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine'] + logins: *publish_logins + build_args: *build_args + when: *when-publish-next + + release-cli: + depends_on: + - vendor + # we also depend on release-agent as we would have to hight + # ram usage otherwise + - release-agent + image: *buildx_plugin + settings: + repo: *publish_repos_cli + dockerfile: docker/Dockerfile.cli.multiarch.rootless + platforms: *platforms_release + buildkit_oci_max_parallelism: 6 + tag: ['${CI_COMMIT_TAG%%.*}', '${CI_COMMIT_TAG%.*}', '${CI_COMMIT_TAG}'] + logins: *publish_logins + build_args: *build_args + when: *when-release + + release-cli-alpine: + depends_on: + - vendor + # we also depend on release-agent as we would have to hight + # ram usage otherwise + - release-agent + image: *buildx_plugin + settings: + repo: *publish_repos_cli + dockerfile: docker/Dockerfile.cli.alpine.multiarch.rootless + platforms: *platforms_alpine + tag: ['${CI_COMMIT_TAG%%.*}-alpine', '${CI_COMMIT_TAG%.*}-alpine', '${CI_COMMIT_TAG}-alpine'] + logins: *publish_logins + build_args: *build_args + when: *when-release diff --git a/.woodpecker/docs.yaml b/.woodpecker/docs.yaml new file mode 100644 index 00000000000..747f6e67e59 --- /dev/null +++ b/.woodpecker/docs.yaml @@ -0,0 +1,173 @@ +variables: + - &golang_image 'docker.io/golang:1.26' + - &node_image 'docker.io/node:24-alpine' + - &alpine_image 'docker.io/alpine:3.23' + - path: &when_path + - 'docs/**' + - '.woodpecker/docs.yaml' + # since we generate docs for cli tool we have to watch this too + - 'cli/**' + - 'cmd/cli/**' + # api docs + - 'server/api/**' + - path: &docker_path # web source code + - 'web/**' + # api source code + - 'server/api/**' + # go source code + - '**/*.go' + - 'go.*' + # schema changes + - 'pipeline/schema/**' + # Dockerfile changes + - 'docker/**' + +when: + - event: tag + - event: pull_request + - event: push + path: + - <<: *when_path + - <<: *docker_path + branch: + - ${CI_REPO_DEFAULT_BRANCH} + - event: pull_request_closed + path: *when_path + - event: manual + evaluate: 'TASK == "docs"' + +steps: + - name: install-dependencies + image: *node_image + directory: docs/ + commands: + - corepack enable + - pnpm install --frozen-lockfile + when: + - path: *when_path + event: [tag, pull_request, push] + - event: manual + + - name: format-check + image: *node_image + directory: docs/ + commands: + - corepack enable + - pnpm format:check + when: + - path: *when_path + event: pull_request + + - name: build-cli + image: *golang_image + commands: + - make generate-docs + when: + - path: *when_path + event: [tag, pull_request, push] + - event: manual + + - name: build + image: *node_image + directory: docs/ + commands: + - corepack enable + - pnpm build + when: + - path: *when_path + event: [tag, pull_request, push] + - event: manual + + - name: deploy-preview + image: docker.io/woodpeckerci/plugin-surge-preview:1.4.2 + settings: + path: 'docs/build/' + surge_token: + from_secret: SURGE_TOKEN + forge_repo_token: + from_secret: GITHUB_TOKEN_SURGE + failure: ignore + when: + - event: [pull_request, pull_request_closed] + path: *when_path + + - name: deploy-prepare + image: *alpine_image + environment: + BOT_PRIVATE_KEY: + from_secret: BOT_PRIVATE_KEY + commands: + - apk add openssh-client git + - mkdir -p $HOME/.ssh + - ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts + - echo "$BOT_PRIVATE_KEY" > $HOME/.ssh/id_rsa + - chmod 0600 $HOME/.ssh/id_rsa + - git clone --depth 1 --single-branch git@github.com:woodpecker-ci/woodpecker-ci.github.io.git ./docs_repo + when: + - event: push + path: + - <<: *when_path + - <<: *docker_path + branch: ${CI_REPO_DEFAULT_BRANCH} + - event: [manual, tag] + + # update latest and next version + - name: version-next + image: *alpine_image + commands: + - apk add jq + - jq '.next = "next-${CI_COMMIT_SHA:0:10}"' ./docs_repo/version.json > ./docs_repo/version.json.tmp + - mv ./docs_repo/version.json.tmp ./docs_repo/version.json + when: + - event: push + path: *docker_path + branch: ${CI_REPO_DEFAULT_BRANCH} + + - name: version-release + image: *alpine_image + commands: + - apk add jq + - if [[ "${CI_COMMIT_TAG}" != *"rc"* ]] ; then jq '.latest = "${CI_COMMIT_TAG}"' ./docs_repo/version.json > ./docs_repo/version.json.tmp && mv ./docs_repo/version.json.tmp ./docs_repo/version.json ; fi + - jq '.rc = "${CI_COMMIT_TAG}"' ./docs_repo/version.json > ./docs_repo/version.json.tmp + - mv ./docs_repo/version.json.tmp ./docs_repo/version.json + when: + - event: tag + + - name: copy-files + image: *alpine_image + commands: + - apk add rsync + # copy all docs files and delete all old ones, but leave CNAME, index.yaml and version.json untouched + - rsync -r --exclude .git --exclude CNAME --exclude index.yaml --exclude README.md --exclude version.json --delete docs/build/ ./docs_repo + when: + - event: push + path: *when_path + branch: ${CI_REPO_DEFAULT_BRANCH} + - event: manual + + - name: deploy + image: *alpine_image + environment: + BOT_PRIVATE_KEY: + from_secret: BOT_PRIVATE_KEY + commands: + - apk add openssh-client rsync git + - mkdir -p $HOME/.ssh + - ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts + - echo "$BOT_PRIVATE_KEY" > $HOME/.ssh/id_rsa + - chmod 0600 $HOME/.ssh/id_rsa + - git config --global user.email "woodpecker-bot@obermui.de" + - git config --global user.name "woodpecker-bot" + - cd ./docs_repo + - git add . + # exit successfully if nothing changed + - test -n "$(git status --porcelain)" || exit 0 + - git commit -m "Deploy website - based on ${CI_COMMIT_SHA}" + - git push + when: + - event: push + path: + - <<: *when_path + - <<: *docker_path + branch: ${CI_REPO_DEFAULT_BRANCH} + - event: [manual, tag] diff --git a/.woodpecker/links.yaml b/.woodpecker/links.yaml new file mode 100644 index 00000000000..f23ce6056e1 --- /dev/null +++ b/.woodpecker/links.yaml @@ -0,0 +1,31 @@ +when: + - event: cron + cron: links + +steps: + - name: links + image: docker.io/lycheeverse/lychee:0.23.0 + failure: ignore + depends_on: [] + commands: + - lychee pipeline/frontend/yaml/linter/schema/schema.json > links.md + - lychee --exclude localhost docs/docs/ >> links.md + - lychee --exclude localhost docs/src/pages/ >> links.md + - echo -e "\nLast checked:$(date)" >> links.md + + - name: Update issue + image: docker.io/alpine:3.23 + depends_on: links + environment: + GITHUB_TOKEN: + from_secret: github_token + commands: + - apk add -q --no-cache jq curl + - export ISSUE_NUMBER=5326 + - export DESCRIPTION=$(cat links.md) + - | + curl -X PATCH \ + -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${CI_REPO}/issues/$ISSUE_NUMBER \ + -d "$(jq -n --arg body "$DESCRIPTION" '{body: $body}')" diff --git a/.woodpecker/release-helper.yaml b/.woodpecker/release-helper.yaml new file mode 100644 index 00000000000..31ad2385587 --- /dev/null +++ b/.woodpecker/release-helper.yaml @@ -0,0 +1,15 @@ +when: + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} + - release/* + +steps: + - name: release-helper + image: docker.io/woodpeckerci/plugin-ready-release-go:4.0.0 + settings: + release_branch: ${CI_COMMIT_BRANCH} + forge_type: github + git_email: woodpecker-bot@obermui.de + github_token: + from_secret: GITHUB_TOKEN diff --git a/.woodpecker/securityscan.yaml b/.woodpecker/securityscan.yaml new file mode 100644 index 00000000000..ee396b62ca6 --- /dev/null +++ b/.woodpecker/securityscan.yaml @@ -0,0 +1,42 @@ +when: + - event: [pull_request] + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +variables: + - &trivy_plugin docker.io/woodpeckerci/plugin-trivy:1.4.4 + +steps: + backend: + depends_on: [] + image: *trivy_plugin + settings: + server: server + skip-dirs: web/,docs/ + + docs: + depends_on: [] + image: *trivy_plugin + settings: + server: server + skip-dirs: node_modules/,plugins/woodpecker-plugins/node_modules/ + dir: docs/ + + web: + depends_on: [] + image: *trivy_plugin + settings: + server: server + skip-dirs: node_modules/ + dir: web/ + +services: + server: + image: *trivy_plugin + failure: ignore # as we don't care about the exit code + settings: + service: true + db-repository: mirror.gcr.io/aquasec/trivy-db:2 + ports: + - 10000 diff --git a/.woodpecker/social.yaml b/.woodpecker/social.yaml new file mode 100644 index 00000000000..41e5caaf6b4 --- /dev/null +++ b/.woodpecker/social.yaml @@ -0,0 +1,45 @@ +depends_on: + - docker + - binaries + +when: + - event: tag + evaluate: 'CI_COMMIT_TAG matches "^v?[0-9]+\\\\.[0-9]+\\\\.[0-9]+$"' + +steps: + - name: mastodon-toot + image: docker.io/woodpeckerci/plugin-mastodon-post + settings: + server_url: https://floss.social + access_token: + from_secret: mastodon_token + visibility: public + ai_token: + from_secret: openai_token + ai_prompt: | + We want to present the next version of our app on Mastodon. + Therefore we want to post a catching text, so users will know why they should + update to the newest version. Highlight the most special features. If there is no special feature + included just summarize the changes in a few sentences. The whole text should not be longer than 240 + characters. Avoid naming contributors from. Use #WoodpeckerCI, #release and + additional fitting hashtags and emojis to make the post more appealing + + The changelog entry: {{ changelog }} + + - name: bluesky-post + image: docker.io/woodpeckerci/plugin-bluesky-post + settings: + app_password: + from_secret: bluesky_token + identifier: woodpecker-ci.org + ai_token: + from_secret: openai_token + ai_prompt: | + We want to present the next version of our app on Mastodon. + Therefore we want to post a catching text, so users will know why they should + update to the newest version. Highlight the most special features. If there is no special feature + included just summarize the changes in a few sentences. The whole text should not be longer than 240 + characters. Avoid naming contributors from. Use #WoodpeckerCI, #release and + additional fitting hashtags and emojis to make the post more appealing + + The changelog entry: {{ changelog }} diff --git a/.woodpecker/static.yaml b/.woodpecker/static.yaml new file mode 100644 index 00000000000..d46741e9a3a --- /dev/null +++ b/.woodpecker/static.yaml @@ -0,0 +1,26 @@ +when: + - event: pull_request + +steps: + - name: lint-editorconfig + image: docker.io/woodpeckerci/plugin-editorconfig-checker:0.3.3 + depends_on: [] + when: + - event: pull_request + + - name: spellcheck + image: docker.io/node:24-alpine + depends_on: [] + commands: + - corepack enable + - pnpx cspell lint --no-progress --gitignore '{**,.*}/{*,.*}' + - apk add --no-cache -U tree # busybox tree don't understand "-I" + # cspell:disable-next-line + - tree --gitignore -I 012_columns_rename_procs_to_steps.go -I versioned_docs -I '*opensource.svg'| pnpx cspell lint --no-progress stdin + + - name: prettier + image: docker.io/woodpeckerci/plugin-prettier:next + pull: true + depends_on: [] + settings: + version: 3.6.2 diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 1ba11f03b1c..1213716d20a 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -21,9 +21,140 @@ when: path: *when_path steps: + vendor: + image: *golang_image + commands: + - go mod vendor + when: + path: + - <<: *when_path + - '.woodpecker/**' + + lint-pipeline: + depends_on: + - vendor + image: *golang_image + commands: + - go run go.woodpecker-ci.org/woodpecker/v3/cmd/cli lint + environment: + WOODPECKER_DISABLE_UPDATE_CHECK: true + WOODPECKER_LINT_STRICT: true + WOODPECKER_PLUGINS_PRIVILEGED: 'docker.io/woodpeckerci/plugin-docker-buildx' + when: + - event: pull_request + path: + - '.woodpecker/**' + + dummy-web: + image: *golang_image + commands: + - mkdir -p web/dist/ + - echo "test" > web/dist/index.html + when: + - path: *when_path + + lint: + depends_on: + - vendor + image: golangci/golangci-lint:v2.11.3 + commands: + - make lint + when: *when + + check-openapi: + depends_on: + - vendor + image: *golang_image + commands: + - 'make generate-openapi' + - 'DIFF=$(git diff | head)' + - '[ -n "$DIFF" ] && { echo "openapi not up to date, exec `make generate-openapi` and commit"; exit 1; } || true' + when: *when + lint-license-header: image: *golang_image commands: - make install-addlicense # cspell:words addlicense - bash -c 'shopt -s globstar; addlicense -check -ignore "vendor/**" -ignore cmd/server/openapi/docs.go **/*.go' when: *when + + test: + depends_on: + - vendor + image: *golang_image + commands: + - make test-agent + - make test-server + - make test-cli + - make test-lib + when: + - path: *when_path + + sqlite: + depends_on: + - vendor + image: *golang_image + environment: + WOODPECKER_DATABASE_DRIVER: sqlite3 + commands: + - make test-server-datastore-coverage + when: + - path: *when_path + + postgres: + depends_on: + - vendor + image: *golang_image + environment: + WOODPECKER_DATABASE_DRIVER: postgres + WOODPECKER_DATABASE_DATASOURCE: 'host=postgres user=postgres dbname=postgres sslmode=disable' # cspell:disable-line + commands: + - make test-server-datastore + when: *when + + mysql: + depends_on: + - vendor + image: *golang_image + environment: + WOODPECKER_DATABASE_DRIVER: mysql + WOODPECKER_DATABASE_DATASOURCE: root@tcp(mysql:3306)/test?parseTime=true + commands: + - make test-server-datastore + when: *when + + codecov: + depends_on: + - test + - sqlite + pull: true + image: docker.io/woodpeckerci/plugin-codecov:2.2.2 + settings: + files: + - agent-coverage.out + - cli-coverage.out + - coverage.out + - server-coverage.out + - datastore-coverage.out + token: + from_secret: codecov_token + when: + - path: *when_path + failure: ignore + +services: + postgres: + image: docker.io/postgres:18 + ports: ['5432'] + environment: + POSTGRES_USER: postgres + POSTGRES_HOST_AUTH_METHOD: trust + when: *when + + mysql: + image: docker.io/mysql:9.6.0 + ports: ['3306'] + environment: + MYSQL_DATABASE: test + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + when: *when diff --git a/.woodpecker/web.yaml b/.woodpecker/web.yaml new file mode 100644 index 00000000000..886c52400ef --- /dev/null +++ b/.woodpecker/web.yaml @@ -0,0 +1,66 @@ +when: + - event: pull_request + - event: push + branch: + - release/* + +variables: + - &node_image 'docker.io/node:24-alpine' + - &when + path: + # related config files + - '.woodpecker/web.yaml' + # web source code + - 'web/**' + # api source code + - 'server/api/**' + +steps: + install-dependencies: + image: *node_image + directory: web/ + commands: + - corepack enable + - pnpm install --frozen-lockfile + when: *when + + lint: + depends_on: + - install-dependencies + image: *node_image + directory: web/ + commands: + - corepack enable + - pnpm lint + when: *when + + format-check: + depends_on: + - install-dependencies + image: *node_image + directory: web/ + commands: + - corepack enable + - pnpm format:check + when: *when + + typecheck: + depends_on: + - install-dependencies + image: *node_image + directory: web/ + commands: + - corepack enable + - pnpm typecheck + when: *when + + test: + depends_on: + - install-dependencies + - format-check # wait for it else test artifacts are falsely detected as wrong + image: *node_image + directory: web/ + commands: + - corepack enable + - pnpm test + when: *when From c8d008570d44d9db7ef905061d60719b30637d57 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 19 Mar 2026 13:56:25 +0100 Subject: [PATCH 15/15] fix cspell --- .cspell.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.cspell.json b/.cspell.json index c94adfffdd3..40df26a469d 100644 --- a/.cspell.json +++ b/.cspell.json @@ -181,6 +181,7 @@ "sess", "sfnt", "shellescape", + "shopt", "sigstore", "Sonatype", "SSHURL",