Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
anbraten committed Oct 23, 2023
2 parents 864f592 + 4803160 commit 56c0aee
Show file tree
Hide file tree
Showing 56 changed files with 5,267 additions and 2,299 deletions.
14 changes: 5 additions & 9 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", ":maintainLockFilesWeekly"],
"extends": ["github>woodpecker-ci/renovate-config"],
"prConcurrentLimit": 5,
"packageRules": [
{
Expand All @@ -19,28 +19,24 @@
{
"groupName": "golang (lang)",
"matchPackagePatterns": ["^golang$", "xgo"],
"matchUpdateTypes": ["minor", "patch"],
"extends": ["schedule:daily"]
"matchUpdateTypes": ["minor", "patch"]
},
{
"groupName": "golang (packages)",
"matchManagers": ["gomod"],
"matchUpdateTypes": ["minor", "patch"],
"extends": ["schedule:daily"]
"matchUpdateTypes": ["minor", "patch"]
},
{
"groupName": "web npm deps non-major",
"matchManagers": ["npm"],
"matchUpdateTypes": ["minor", "patch"],
"matchFileNames": ["web/package.json"],
"extends": ["schedule:daily"]
"matchFileNames": ["web/package.json"]
},
{
"groupName": "docs npm deps non-major",
"matchManagers": ["npm"],
"matchUpdateTypes": ["minor", "patch"],
"matchFileNames": ["docs/**/package.json"],
"extends": ["schedule:daily"]
"matchFileNames": ["docs/**/package.json"]
},
{
"matchDatasources": ["docker"],
Expand Down
2 changes: 1 addition & 1 deletion .woodpecker/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ when:

variables:
- &golang_image 'golang:1.21.3'
- &node_image 'node:20-alpine'
- &node_image 'node:21-alpine'
- &xgo_image 'techknowlogick/xgo:go-1.21.3'
- &xgo_version 'go-1.21.2'

Expand Down
131 changes: 121 additions & 10 deletions .woodpecker/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ depends_on:

variables:
- &golang_image 'golang:1.21.3'
- &node_image 'node:20-alpine'
- &node_image 'node:21-alpine'
- &xgo_image 'techknowlogick/xgo:go-1.21.3'
- &xgo_version 'go-1.21.2'
- &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'
Expand All @@ -23,26 +23,45 @@ variables:
# vars used on push / tag events only
- publish_logins: &publish_logins # Default DockerHub login
- registry: https://index.docker.io/v1/
username:
from_secret: docker_username
username: woodpeckerbot
password:
from_secret: docker_password
# Additional Quay.IO login
- registry: https://quay.io
username:
from_secret: QUAY_IO_USER
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/**'

steps:
vendor:
image: *golang_image
pull: true
commands:
- go mod vendor
when:
- event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
- event: pull_request
path: *when_path
- branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
event: [push, tag]
path: *when_path

###############
# S e r v e r #
Expand All @@ -54,6 +73,16 @@ steps:
- corepack enable
- pnpm install --frozen-lockfile
- pnpm build
when:
- event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
- event: pull_request
path: *when_path
- branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
event: [push, tag]
path: *when_path

cross-compile-server-preview:
image: *xgo_image
Expand All @@ -67,31 +96,66 @@ steps:
TAGS: bindata sqlite sqlite_unlock_notify netgo
XGO_VERSION: *xgo_version
when:
event: pull_request
- event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
- event: pull_request
path: *when_path

publish-server-preview:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [docker_username, docker_password]
secrets: [docker_password]
group: docker
settings:
repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request

publish-server-alpine-preview:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [docker_username, docker_password]
secrets: [docker_password]
group: docker
settings:
repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request

publish-server-preview-dry:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [docker_password]
group: docker
settings:
dry_run: true
repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path

publish-server-alpine-preview-dry:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [docker_password]
group: docker
settings:
dry_run: true
repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path

cross-compile-server:
image: *xgo_image
Expand All @@ -109,6 +173,7 @@ steps:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
event: [push, tag]
path: *when_path

publish-next-server:
image: woodpeckerci/plugin-docker-buildx:2.1.0
Expand All @@ -122,6 +187,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-next-server-alpine:
image: woodpeckerci/plugin-docker-buildx:2.1.0
Expand All @@ -135,6 +201,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-release-branch-server:
image: woodpeckerci/plugin-docker-buildx:2.1.0
Expand All @@ -148,6 +215,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

publish-release-branch-server-alpine:
image: woodpeckerci/plugin-docker-buildx:2.1.0
Expand All @@ -161,6 +229,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

release-server:
group: docker
Expand Down Expand Up @@ -195,16 +264,33 @@ steps:
publish-agent-preview:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [docker_username, docker_password]
secrets: [docker_password]
settings:
repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
build_args: *build_args
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request

publish-agent-preview-dry:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [docker_password]
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:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path

publish-next-agent:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
Expand All @@ -218,6 +304,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-next-agent-alpine:
group: docker
Expand All @@ -232,6 +319,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-release-branch-agent:
group: docker
Expand All @@ -246,6 +334,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

publish-release-branch-agent-alpine:
group: docker
Expand All @@ -260,6 +349,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

release-agent:
group: docker
Expand Down Expand Up @@ -296,15 +386,32 @@ steps:
publish-cli-preview:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [docker_username, docker_password]
secrets: [docker_password]
settings:
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
build_args: *build_args
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request

publish-cli-preview-dry:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [docker_password]
settings:
dry_run: true
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
build_args: *build_args
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path

publish-next-cli:
group: docker
Expand All @@ -319,6 +426,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-next-cli-alpine:
group: docker
Expand All @@ -333,6 +441,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-release-branch-cli:
group: docker
Expand All @@ -347,6 +456,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

publish-release-branch-cli-alpine:
group: docker
Expand All @@ -361,6 +471,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

release-cli:
group: docker
Expand Down
2 changes: 1 addition & 1 deletion .woodpecker/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ when:

variables:
- &golang_image 'golang:1.21.3'
- &node_image 'node:20-alpine'
- &node_image 'node:21-alpine'

steps:
build-cli:
Expand Down
2 changes: 1 addition & 1 deletion .woodpecker/securityscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ when:

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

steps:
check backend:
Expand Down
Loading

0 comments on commit 56c0aee

Please sign in to comment.