mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-26 17:11:03 +00:00
Fix path schema (#723)
- allow array for path - remove "include:" as it is default case - run tests on schema changes too
This commit is contained in:
@@ -11,15 +11,14 @@ pipeline:
|
|||||||
- yarn build
|
- yarn build
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/binaries.yml"
|
||||||
- ".woodpecker/binaries.yml"
|
- "nfpm/*.yml"
|
||||||
- "nfpm/*.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
# web source code
|
||||||
# web source code
|
- "web/**"
|
||||||
- "web/**"
|
|
||||||
|
|
||||||
build-server:
|
build-server:
|
||||||
group: build
|
group: build
|
||||||
@@ -28,15 +27,14 @@ pipeline:
|
|||||||
- make release-server
|
- make release-server
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/binaries.yml"
|
||||||
- ".woodpecker/binaries.yml"
|
- "nfpm/*.yml"
|
||||||
- "nfpm/*.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
# web source code
|
||||||
# web source code
|
- "web/**"
|
||||||
- "web/**"
|
|
||||||
|
|
||||||
build-agent:
|
build-agent:
|
||||||
group: build
|
group: build
|
||||||
@@ -60,13 +58,12 @@ pipeline:
|
|||||||
- make release-cli
|
- make release-cli
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/binaries.yml"
|
||||||
- ".woodpecker/binaries.yml"
|
- "nfpm/*.yml"
|
||||||
- "nfpm/*.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
|
||||||
|
|
||||||
build-deb-rpm:
|
build-deb-rpm:
|
||||||
group: bundle
|
group: bundle
|
||||||
@@ -75,15 +72,14 @@ pipeline:
|
|||||||
- make bundle
|
- make bundle
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/binaries.yml"
|
||||||
- ".woodpecker/binaries.yml"
|
- "nfpm/*.yml"
|
||||||
- "nfpm/*.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
# web source code
|
||||||
# web source code
|
- "web/**"
|
||||||
- "web/**"
|
|
||||||
|
|
||||||
checksums:
|
checksums:
|
||||||
image: golang:1.16
|
image: golang:1.16
|
||||||
@@ -91,15 +87,14 @@ pipeline:
|
|||||||
- make release-checksums
|
- make release-checksums
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/binaries.yml"
|
||||||
- ".woodpecker/binaries.yml"
|
- "nfpm/*.yml"
|
||||||
- "nfpm/*.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
# web source code
|
||||||
# web source code
|
- "web/**"
|
||||||
- "web/**"
|
|
||||||
|
|
||||||
# TODO: upload build artifacts for pushes to ${CI_REPO_DEFAULT_BRANCH}
|
# TODO: upload build artifacts for pushes to ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
|
@@ -6,12 +6,13 @@ pipeline:
|
|||||||
- echo "test" > web/dist/index.html
|
- echo "test" > web/dist/index.html
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/test.yml"
|
||||||
- ".woodpecker/test.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
# schema changes
|
||||||
|
- "pipeline/schema/**"
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
image: golang:1.16
|
image: golang:1.16
|
||||||
@@ -20,13 +21,12 @@ pipeline:
|
|||||||
- make lint
|
- make lint
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/test.yml"
|
||||||
- ".woodpecker/test.yml"
|
- ".golangci.yml"
|
||||||
- ".golangci.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
image: golang:1.16
|
image: golang:1.16
|
||||||
@@ -38,12 +38,13 @@ pipeline:
|
|||||||
- make test-lib
|
- make test-lib
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/test.yml"
|
||||||
- ".woodpecker/test.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
# schema changes
|
||||||
|
- "pipeline/schema/**"
|
||||||
|
|
||||||
sqlite:
|
sqlite:
|
||||||
image: golang:1.16
|
image: golang:1.16
|
||||||
@@ -54,12 +55,11 @@ pipeline:
|
|||||||
- make test-server-datastore
|
- make test-server-datastore
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/test.yml"
|
||||||
- ".woodpecker/test.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: golang:1.16
|
image: golang:1.16
|
||||||
@@ -71,12 +71,11 @@ pipeline:
|
|||||||
- make test-server-datastore
|
- make test-server-datastore
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/test.yml"
|
||||||
- ".woodpecker/test.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: golang:1.16
|
image: golang:1.16
|
||||||
@@ -88,12 +87,11 @@ pipeline:
|
|||||||
- make test-server-datastore
|
- make test-server-datastore
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/test.yml"
|
||||||
- ".woodpecker/test.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
service-postgres:
|
service-postgres:
|
||||||
@@ -104,12 +102,11 @@ services:
|
|||||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/test.yml"
|
||||||
- ".woodpecker/test.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
|
||||||
|
|
||||||
service-mysql:
|
service-mysql:
|
||||||
image: mysql:5.6.27
|
image: mysql:5.6.27
|
||||||
@@ -119,9 +116,8 @@ services:
|
|||||||
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
# related config files
|
||||||
# related config files
|
- ".woodpecker/test.yml"
|
||||||
- ".woodpecker/test.yml"
|
# go source code
|
||||||
# go source code
|
- "**/*.go"
|
||||||
- "**/*.go"
|
- "go.*"
|
||||||
- "go.*"
|
|
||||||
|
@@ -79,6 +79,15 @@ pipeline:
|
|||||||
when:
|
when:
|
||||||
path: "folder/**"
|
path: "folder/**"
|
||||||
|
|
||||||
|
when-path-array:
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- echo "test"
|
||||||
|
when:
|
||||||
|
path:
|
||||||
|
- "folder/**"
|
||||||
|
- "**/*.c"
|
||||||
|
|
||||||
when-path-include-exclude:
|
when-path-include-exclude:
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
|
@@ -260,6 +260,12 @@
|
|||||||
"description": "Execute a step only on commit with certain files added/removed/modified. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#environment",
|
"description": "Execute a step only on commit with certain files added/removed/modified. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#environment",
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{ "type": "string" },
|
{ "type": "string" },
|
||||||
|
{
|
||||||
|
"type" :"array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
Reference in New Issue
Block a user