Remove steps for publishing release branches (#3125)

This commit is contained in:
qwerty287 2024-01-10 15:10:56 +01:00 committed by GitHub
parent f3420716ab
commit aef3f8f3ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 154 deletions

View file

@ -3,7 +3,6 @@ when:
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
depends_on:
@ -61,7 +60,7 @@ steps:
path: *when_path
- branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
event: [push, tag]
path: *when_path
@ -82,7 +81,7 @@ steps:
path: *when_path
- branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
event: [push, tag]
path: *when_path
@ -105,6 +104,9 @@ steps:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
- event: pull_request
path: *when_path
- event: push
branch: renovate/*
path: *when_path
cross-compile-server:
depends_on:
@ -123,7 +125,6 @@ steps:
when:
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
event: [push, tag]
path: *when_path
@ -168,26 +169,12 @@ steps:
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
build-server-alpine:
depends_on:
- vendor
- build-web
- cross-compile-server-preview
image: *buildx_plugin
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
- evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path
- event: push
branch: renovate/*
path: *when_path
publish-next-server:
depends_on:
@ -219,36 +206,6 @@ steps:
event: push
path: *when_path
publish-release-branch-server:
depends_on:
- cross-compile-server
image: *buildx_plugin
settings:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_server
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
when:
branch: release/*
event: push
path: *when_path
publish-release-branch-server-alpine:
depends_on:
- cross-compile-server
image: *buildx_plugin
settings:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_alpine
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
when:
branch: release/*
event: push
path: *when_path
release-server:
depends_on:
- cross-compile-server
@ -308,9 +265,12 @@ steps:
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
- evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path
- event: push
branch: renovate/*
path: *when_path
publish-next-agent:
depends_on:
@ -350,38 +310,6 @@ steps:
event: push
path: *when_path
publish-release-branch-agent:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_release
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
build_args: *build_args
when:
branch: release/*
event: push
path: *when_path
publish-release-branch-agent-alpine:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.alpine.multiarch
platforms: *platforms_alpine
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
build_args: *build_args
when:
branch: release/*
event: push
path: *when_path
release-agent:
depends_on:
- vendor
@ -449,9 +377,12 @@ steps:
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
- evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path
- event: push
branch: renovate/*
path: *when_path
publish-next-cli:
depends_on:
@ -491,38 +422,6 @@ steps:
event: push
path: *when_path
publish-release-branch-cli:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_release
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
build_args: *build_args
when:
branch: release/*
event: push
path: *when_path
publish-release-branch-cli-alpine:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.alpine.multiarch
platforms: *platforms_alpine
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
build_args: *build_args
when:
branch: release/*
event: push
path: *when_path
release-cli:
depends_on:
- vendor

View file

@ -44,6 +44,7 @@ steps:
- make docs
when:
- path: *when_path
event: [tag, pull_request, push]
- event: manual
build:
@ -55,6 +56,7 @@ steps:
- pnpm build
when:
- path: *when_path
event: [tag, pull_request, push]
- event: manual
deploy-preview:

View file

@ -3,7 +3,6 @@ when:
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
variables:
@ -11,23 +10,20 @@ variables:
- &trivy_plugin woodpeckerci/plugin-trivy:1.0.1
steps:
check backend:
backend:
depends_on: []
image: *trivy_plugin
settings:
skip-dirs: web/,docs/
check docs:
docs:
depends_on: []
image: *trivy_plugin
settings:
skip-dirs: node_modules/,plugins/woodpecker-plugins/node_modules/
dir: docs/
when:
event: [pull_request, push, cron]
branch: ${CI_REPO_DEFAULT_BRANCH}
check web:
web:
depends_on: []
image: *trivy_plugin
settings:

View file

@ -1,9 +1,8 @@
when:
- event: [pull_request, tag]
- event: pull_request
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
variables:
@ -11,13 +10,16 @@ variables:
- &when
- path: &when_path # related config files
- '.woodpecker/test.yml'
- '.golangci.yml'
- '.golangci.yaml'
# go source code
- '**/*.go'
- 'go.*'
# schema changes
- 'pipeline/schema/**'
event: [pull_request, tag]
event: pull_request
- event: push
branch: renovate/*
path: *when_path
steps:
vendor:
@ -25,9 +27,9 @@ steps:
commands:
- go mod vendor
when:
- path:
- <<: *when_path
- '.woodpecker/**'
path:
- <<: *when_path
- '.woodpecker/**'
lint-pipeline:
depends_on:
@ -36,10 +38,9 @@ steps:
commands:
- go run go.woodpecker-ci.org/woodpecker/v2/cmd/cli lint
when:
- <<: *when
- path:
- event: pull_request
path:
- '.woodpecker/**'
- 'pipeline/schema/**'
dummy-web:
image: *golang_image
@ -57,7 +58,7 @@ steps:
- make lint
when: *when
check_swagger:
check-swagger:
depends_on:
- vendor
image: *golang_image
@ -70,7 +71,7 @@ steps:
lint-editorconfig:
image: docker.io/mstruebing/editorconfig-checker:2.7.2
when:
- event: [pull_request, tag]
event: pull_request
lint-license-header:
image: *golang_image

View file

@ -1,10 +1,7 @@
when:
- event: [pull_request, tag]
- event: pull_request
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
branch: renovate/*
variables:
- &node_image 'docker.io/node:21-alpine'
@ -16,10 +13,9 @@ variables:
- 'web/**'
# api source code
- 'server/api/**'
event: [pull_request, tag, deployment]
steps:
install_dependencies:
install-dependencies:
image: *node_image
directory: web/
commands:
@ -29,7 +25,7 @@ steps:
lint:
depends_on:
- install_dependencies
- install-dependencies
image: *node_image
directory: web/
commands:
@ -39,7 +35,7 @@ steps:
formatcheck:
depends_on:
- install_dependencies
- install-dependencies
image: *node_image
directory: web/
commands:
@ -49,7 +45,7 @@ steps:
typecheck:
depends_on:
- install_dependencies
- install-dependencies
image: *node_image
directory: web/
commands:
@ -59,7 +55,7 @@ steps:
test:
depends_on:
- install_dependencies
- install-dependencies
image: *node_image
directory: web/
commands: