mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-02 21:58:43 +00:00
Use dag in ci config (#3010)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
7e2ea306c4
commit
c1a1f7c10b
6 changed files with 163 additions and 102 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -40,6 +40,7 @@ docker-compose.yml
|
||||||
extras/
|
extras/
|
||||||
/build/
|
/build/
|
||||||
/dist/
|
/dist/
|
||||||
|
/data/
|
||||||
|
|
||||||
docs/venv
|
docs/venv
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ variables:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
build-web:
|
build-web:
|
||||||
group: prepare
|
|
||||||
image: *node_image
|
image: *node_image
|
||||||
directory: web/
|
directory: web/
|
||||||
commands:
|
commands:
|
||||||
|
@ -23,13 +22,14 @@ steps:
|
||||||
- pnpm build
|
- pnpm build
|
||||||
|
|
||||||
vendor:
|
vendor:
|
||||||
group: prepare
|
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
commands:
|
commands:
|
||||||
- go mod vendor
|
- go mod vendor
|
||||||
|
|
||||||
cross-compile-server:
|
cross-compile-server:
|
||||||
group: build
|
depends_on:
|
||||||
|
- vendor
|
||||||
|
- build-web
|
||||||
image: *xgo_image
|
image: *xgo_image
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
|
@ -43,35 +43,49 @@ steps:
|
||||||
TARGZ: '1'
|
TARGZ: '1'
|
||||||
|
|
||||||
build-agent:
|
build-agent:
|
||||||
group: build
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
commands:
|
commands:
|
||||||
- make release-agent
|
- make release-agent
|
||||||
|
|
||||||
build-cli:
|
build-cli:
|
||||||
group: build
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
commands:
|
commands:
|
||||||
- make release-cli
|
- make release-cli
|
||||||
|
|
||||||
build-deb-rpm:
|
build-deb-rpm:
|
||||||
group: bundle
|
depends_on:
|
||||||
|
- cross-compile-server
|
||||||
|
- build-agent
|
||||||
|
- build-cli
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
commands:
|
commands:
|
||||||
- make bundle
|
- make bundle
|
||||||
|
|
||||||
checksums:
|
checksums:
|
||||||
|
depends_on:
|
||||||
|
- cross-compile-server
|
||||||
|
- build-agent
|
||||||
|
- build-cli
|
||||||
|
- build-deb-rpm
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
commands:
|
commands:
|
||||||
- make release-checksums
|
- make release-checksums
|
||||||
|
|
||||||
release-dryrun:
|
release-dryrun:
|
||||||
|
depends_on:
|
||||||
|
- checksums
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
commands:
|
commands:
|
||||||
- ls -la dist/*.*
|
- ls -la dist/*.*
|
||||||
- cat dist/checksums.txt
|
- cat dist/checksums.txt
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
depends_on:
|
||||||
|
- checksums
|
||||||
image: docker.io/plugins/github-release
|
image: docker.io/plugins/github-release
|
||||||
secrets:
|
secrets:
|
||||||
- source: github_token
|
- source: github_token
|
||||||
|
|
|
@ -87,6 +87,9 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
cross-compile-server-preview:
|
cross-compile-server-preview:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
|
- build-web
|
||||||
image: *xgo_image
|
image: *xgo_image
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
|
@ -103,61 +106,10 @@ steps:
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-server-preview:
|
|
||||||
image: *buildx_plugin
|
|
||||||
group: docker
|
|
||||||
settings:
|
|
||||||
repo: woodpeckerci/woodpecker-server
|
|
||||||
dockerfile: docker/Dockerfile.server.multiarch
|
|
||||||
platforms: *platforms_preview
|
|
||||||
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
|
||||||
logins: *publish_logins
|
|
||||||
when:
|
|
||||||
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
|
||||||
event: pull_request
|
|
||||||
|
|
||||||
publish-server-alpine-preview:
|
|
||||||
image: *buildx_plugin
|
|
||||||
group: docker
|
|
||||||
settings:
|
|
||||||
repo: woodpeckerci/woodpecker-server
|
|
||||||
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
|
||||||
platforms: *platforms_preview
|
|
||||||
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
|
|
||||||
logins: *publish_logins
|
|
||||||
when:
|
|
||||||
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
|
||||||
event: pull_request
|
|
||||||
|
|
||||||
build-server:
|
|
||||||
image: *buildx_plugin
|
|
||||||
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
|
|
||||||
|
|
||||||
build-server-alpine:
|
|
||||||
image: *buildx_plugin
|
|
||||||
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:
|
cross-compile-server:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
|
- build-web
|
||||||
image: *xgo_image
|
image: *xgo_image
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
|
@ -175,9 +127,70 @@ steps:
|
||||||
event: [push, tag]
|
event: [push, tag]
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-next-server:
|
publish-server-preview:
|
||||||
|
depends_on:
|
||||||
|
- cross-compile-server-preview
|
||||||
|
image: *buildx_plugin
|
||||||
|
settings:
|
||||||
|
repo: woodpeckerci/woodpecker-server
|
||||||
|
dockerfile: docker/Dockerfile.server.multiarch
|
||||||
|
platforms: *platforms_preview
|
||||||
|
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
||||||
|
logins: *publish_logins
|
||||||
|
when:
|
||||||
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
publish-server-alpine-preview:
|
||||||
|
depends_on:
|
||||||
|
- cross-compile-server-preview
|
||||||
|
image: *buildx_plugin
|
||||||
|
settings:
|
||||||
|
repo: woodpeckerci/woodpecker-server
|
||||||
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
||||||
|
platforms: *platforms_preview
|
||||||
|
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
|
||||||
|
logins: *publish_logins
|
||||||
|
when:
|
||||||
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
build-server:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
|
- build-web
|
||||||
|
image: *buildx_plugin
|
||||||
|
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
|
||||||
|
|
||||||
|
build-server-alpine:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
|
- build-web
|
||||||
|
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
|
||||||
|
|
||||||
|
publish-next-server:
|
||||||
|
depends_on:
|
||||||
|
- cross-compile-server
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
group: docker
|
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_server
|
repo: *publish_repos_server
|
||||||
dockerfile: docker/Dockerfile.server.multiarch
|
dockerfile: docker/Dockerfile.server.multiarch
|
||||||
|
@ -190,8 +203,9 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-next-server-alpine:
|
publish-next-server-alpine:
|
||||||
|
depends_on:
|
||||||
|
- cross-compile-server
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
group: docker
|
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_server
|
repo: *publish_repos_server
|
||||||
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
||||||
|
@ -204,8 +218,9 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-release-branch-server:
|
publish-release-branch-server:
|
||||||
|
depends_on:
|
||||||
|
- cross-compile-server
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
group: docker
|
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_server
|
repo: *publish_repos_server
|
||||||
dockerfile: docker/Dockerfile.server.multiarch
|
dockerfile: docker/Dockerfile.server.multiarch
|
||||||
|
@ -218,8 +233,9 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-release-branch-server-alpine:
|
publish-release-branch-server-alpine:
|
||||||
|
depends_on:
|
||||||
|
- cross-compile-server
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
group: docker
|
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_server
|
repo: *publish_repos_server
|
||||||
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
||||||
|
@ -232,7 +248,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
release-server:
|
release-server:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- cross-compile-server
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_server
|
repo: *publish_repos_server
|
||||||
|
@ -245,7 +262,8 @@ steps:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
||||||
release-server-alpine:
|
release-server-alpine:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- cross-compile-server
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_server
|
repo: *publish_repos_server
|
||||||
|
@ -262,7 +280,8 @@ steps:
|
||||||
#############
|
#############
|
||||||
|
|
||||||
publish-agent-preview:
|
publish-agent-preview:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: woodpeckerci/woodpecker-agent
|
repo: woodpeckerci/woodpecker-agent
|
||||||
|
@ -276,7 +295,8 @@ steps:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
|
|
||||||
build-agent:
|
build-agent:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
dry_run: true
|
dry_run: true
|
||||||
|
@ -291,7 +311,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-next-agent:
|
publish-next-agent:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_agent
|
repo: *publish_repos_agent
|
||||||
|
@ -306,7 +327,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-next-agent-alpine:
|
publish-next-agent-alpine:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_agent
|
repo: *publish_repos_agent
|
||||||
|
@ -321,7 +343,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-release-branch-agent:
|
publish-release-branch-agent:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_agent
|
repo: *publish_repos_agent
|
||||||
|
@ -336,7 +359,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-release-branch-agent-alpine:
|
publish-release-branch-agent-alpine:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_agent
|
repo: *publish_repos_agent
|
||||||
|
@ -351,7 +375,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
release-agent:
|
release-agent:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_agent
|
repo: *publish_repos_agent
|
||||||
|
@ -365,7 +390,8 @@ steps:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
||||||
release-agent-alpine:
|
release-agent-alpine:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_agent
|
repo: *publish_repos_agent
|
||||||
|
@ -383,7 +409,8 @@ steps:
|
||||||
#########
|
#########
|
||||||
|
|
||||||
publish-cli-preview:
|
publish-cli-preview:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: woodpeckerci/woodpecker-cli
|
repo: woodpeckerci/woodpecker-cli
|
||||||
|
@ -397,7 +424,8 @@ steps:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
|
|
||||||
build-cli:
|
build-cli:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
dry_run: true
|
dry_run: true
|
||||||
|
@ -412,7 +440,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-next-cli:
|
publish-next-cli:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_cli
|
repo: *publish_repos_cli
|
||||||
|
@ -427,7 +456,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-next-cli-alpine:
|
publish-next-cli-alpine:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_cli
|
repo: *publish_repos_cli
|
||||||
|
@ -442,7 +472,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-release-branch-cli:
|
publish-release-branch-cli:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_cli
|
repo: *publish_repos_cli
|
||||||
|
@ -457,7 +488,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
publish-release-branch-cli-alpine:
|
publish-release-branch-cli-alpine:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_cli
|
repo: *publish_repos_cli
|
||||||
|
@ -472,7 +504,8 @@ steps:
|
||||||
path: *when_path
|
path: *when_path
|
||||||
|
|
||||||
release-cli:
|
release-cli:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_cli
|
repo: *publish_repos_cli
|
||||||
|
@ -486,7 +519,8 @@ steps:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
||||||
release-cli-alpine:
|
release-cli-alpine:
|
||||||
group: docker
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *buildx_plugin
|
image: *buildx_plugin
|
||||||
settings:
|
settings:
|
||||||
repo: *publish_repos_cli
|
repo: *publish_repos_cli
|
||||||
|
|
|
@ -12,13 +12,13 @@ variables:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
check backend:
|
check backend:
|
||||||
group: check
|
depends_on: []
|
||||||
image: *trivy_plugin
|
image: *trivy_plugin
|
||||||
settings:
|
settings:
|
||||||
skip-dirs: web/,docs/
|
skip-dirs: web/,docs/
|
||||||
|
|
||||||
check docs:
|
check docs:
|
||||||
group: check
|
depends_on: []
|
||||||
image: *trivy_plugin
|
image: *trivy_plugin
|
||||||
settings:
|
settings:
|
||||||
skip-dirs: node_modules/,plugins/woodpecker-plugins/node_modules/
|
skip-dirs: node_modules/,plugins/woodpecker-plugins/node_modules/
|
||||||
|
@ -28,7 +28,7 @@ steps:
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
check web:
|
check web:
|
||||||
group: check
|
depends_on: []
|
||||||
image: *trivy_plugin
|
image: *trivy_plugin
|
||||||
settings:
|
settings:
|
||||||
skip-dirs: node_modules/
|
skip-dirs: node_modules/
|
||||||
|
|
|
@ -22,13 +22,14 @@ variables:
|
||||||
steps:
|
steps:
|
||||||
vendor:
|
vendor:
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
group: prepare
|
|
||||||
commands:
|
commands:
|
||||||
- go mod vendor
|
- go mod vendor
|
||||||
when:
|
when:
|
||||||
- path: *when_path
|
- path: *when_path
|
||||||
|
|
||||||
lint-pipeline:
|
lint-pipeline:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
commands:
|
commands:
|
||||||
- go run go.woodpecker-ci.org/woodpecker/v2/cmd/cli lint
|
- go run go.woodpecker-ci.org/woodpecker/v2/cmd/cli lint
|
||||||
|
@ -40,7 +41,6 @@ steps:
|
||||||
|
|
||||||
dummy-web:
|
dummy-web:
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
group: prepare
|
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p web/dist/
|
- mkdir -p web/dist/
|
||||||
- echo "test" > web/dist/index.html
|
- echo "test" > web/dist/index.html
|
||||||
|
@ -48,15 +48,17 @@ steps:
|
||||||
- path: *when_path
|
- path: *when_path
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
group: test
|
|
||||||
commands:
|
commands:
|
||||||
- make lint
|
- make lint
|
||||||
when: *when
|
when: *when
|
||||||
|
|
||||||
check_swagger:
|
check_swagger:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
group: test
|
|
||||||
commands:
|
commands:
|
||||||
- 'make generate-swagger'
|
- 'make generate-swagger'
|
||||||
- 'DIFF=$(git diff | head)'
|
- 'DIFF=$(git diff | head)'
|
||||||
|
@ -65,13 +67,11 @@ steps:
|
||||||
|
|
||||||
lint-editorconfig:
|
lint-editorconfig:
|
||||||
image: docker.io/mstruebing/editorconfig-checker:2.7.2
|
image: docker.io/mstruebing/editorconfig-checker:2.7.2
|
||||||
group: test
|
|
||||||
when:
|
when:
|
||||||
- event: [pull_request, tag]
|
- event: [pull_request, tag]
|
||||||
|
|
||||||
lint-license-header:
|
lint-license-header:
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
group: test
|
|
||||||
commands:
|
commands:
|
||||||
- go install github.com/google/addlicense@latest
|
- go install github.com/google/addlicense@latest
|
||||||
- 'addlicense -check -ignore "vendor/**" **/*.go'
|
- 'addlicense -check -ignore "vendor/**" **/*.go'
|
||||||
|
@ -79,12 +79,12 @@ steps:
|
||||||
|
|
||||||
prettier:
|
prettier:
|
||||||
image: docker.io/woodpeckerci/plugin-prettier:next
|
image: docker.io/woodpeckerci/plugin-prettier:next
|
||||||
group: test
|
|
||||||
when: *when
|
when: *when
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
group: test
|
|
||||||
commands:
|
commands:
|
||||||
- make test-agent
|
- make test-agent
|
||||||
- make test-server
|
- make test-server
|
||||||
|
@ -94,8 +94,9 @@ steps:
|
||||||
- path: *when_path
|
- path: *when_path
|
||||||
|
|
||||||
sqlite:
|
sqlite:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
group: test
|
|
||||||
environment:
|
environment:
|
||||||
- WOODPECKER_DATABASE_DRIVER=sqlite3
|
- WOODPECKER_DATABASE_DRIVER=sqlite3
|
||||||
commands:
|
commands:
|
||||||
|
@ -104,8 +105,9 @@ steps:
|
||||||
- path: *when_path
|
- path: *when_path
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
group: test
|
|
||||||
environment:
|
environment:
|
||||||
- WOODPECKER_DATABASE_DRIVER=postgres
|
- WOODPECKER_DATABASE_DRIVER=postgres
|
||||||
- WOODPECKER_DATABASE_DATASOURCE=host=service-postgres user=postgres dbname=postgres sslmode=disable
|
- WOODPECKER_DATABASE_DATASOURCE=host=service-postgres user=postgres dbname=postgres sslmode=disable
|
||||||
|
@ -114,8 +116,9 @@ steps:
|
||||||
when: *when
|
when: *when
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
|
depends_on:
|
||||||
|
- vendor
|
||||||
image: *golang_image
|
image: *golang_image
|
||||||
group: test
|
|
||||||
environment:
|
environment:
|
||||||
- WOODPECKER_DATABASE_DRIVER=mysql
|
- WOODPECKER_DATABASE_DRIVER=mysql
|
||||||
- WOODPECKER_DATABASE_DATASOURCE=root@tcp(service-mysql:3306)/test?parseTime=true
|
- WOODPECKER_DATABASE_DATASOURCE=root@tcp(service-mysql:3306)/test?parseTime=true
|
||||||
|
@ -124,6 +127,11 @@ steps:
|
||||||
when: *when
|
when: *when
|
||||||
|
|
||||||
codecov:
|
codecov:
|
||||||
|
depends_on:
|
||||||
|
- test
|
||||||
|
- sqlite
|
||||||
|
- postgres
|
||||||
|
- mysql
|
||||||
pull: true
|
pull: true
|
||||||
image: docker.io/woodpeckerci/plugin-codecov:2.1.2
|
image: docker.io/woodpeckerci/plugin-codecov:2.1.2
|
||||||
settings:
|
settings:
|
||||||
|
|
|
@ -19,7 +19,7 @@ variables:
|
||||||
event: [pull_request, tag, deployment]
|
event: [pull_request, tag, deployment]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
deps:
|
install_dependencies:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
directory: web/
|
directory: web/
|
||||||
commands:
|
commands:
|
||||||
|
@ -28,7 +28,8 @@ steps:
|
||||||
when: *when
|
when: *when
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
group: test
|
depends_on:
|
||||||
|
- install_dependencies
|
||||||
image: *node_image
|
image: *node_image
|
||||||
directory: web/
|
directory: web/
|
||||||
commands:
|
commands:
|
||||||
|
@ -37,7 +38,8 @@ steps:
|
||||||
when: *when
|
when: *when
|
||||||
|
|
||||||
formatcheck:
|
formatcheck:
|
||||||
group: test
|
depends_on:
|
||||||
|
- install_dependencies
|
||||||
image: *node_image
|
image: *node_image
|
||||||
directory: web/
|
directory: web/
|
||||||
commands:
|
commands:
|
||||||
|
@ -46,7 +48,8 @@ steps:
|
||||||
when: *when
|
when: *when
|
||||||
|
|
||||||
typecheck:
|
typecheck:
|
||||||
group: test
|
depends_on:
|
||||||
|
- install_dependencies
|
||||||
image: *node_image
|
image: *node_image
|
||||||
directory: web/
|
directory: web/
|
||||||
commands:
|
commands:
|
||||||
|
@ -55,7 +58,8 @@ steps:
|
||||||
when: *when
|
when: *when
|
||||||
|
|
||||||
test:
|
test:
|
||||||
group: test
|
depends_on:
|
||||||
|
- install_dependencies
|
||||||
image: *node_image
|
image: *node_image
|
||||||
directory: web/
|
directory: web/
|
||||||
commands:
|
commands:
|
||||||
|
|
Loading…
Reference in a new issue