diff --git a/.woodpecker/binaries.yml b/.woodpecker/binaries.yml index 088637aa9..06ac4928c 100644 --- a/.woodpecker/binaries.yml +++ b/.woodpecker/binaries.yml @@ -15,7 +15,7 @@ variables: # web source code - "web/**" -pipeline: +pipeline: &legacy build-web: group: prepare image: *node_image @@ -98,3 +98,5 @@ pipeline: title: ${CI_COMMIT_TAG##v} when: event: tag + +steps: *legacy diff --git a/.woodpecker/docker.yml b/.woodpecker/docker.yml index b292999f2..d00371676 100644 --- a/.woodpecker/docker.yml +++ b/.woodpecker/docker.yml @@ -12,7 +12,7 @@ variables: - &platforms_preview 'linux/arm/v6,linux/arm64/v8,linux/amd64,linux/riscv64,windows/amd64' - &platforms_alpine 'linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le' -pipeline: +pipeline: &legacy vendor: image: *golang_image pull: true @@ -331,3 +331,5 @@ pipeline: tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"] when: event: tag + +steps: *legacy diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml index bd690a7f2..68ea224c2 100644 --- a/.woodpecker/docs.yml +++ b/.woodpecker/docs.yml @@ -8,7 +8,7 @@ variables: - "cli/**" - "cmd/cli/**" -pipeline: +pipeline: &legacy build-cli: image: *golang_image commands: @@ -82,3 +82,5 @@ pipeline: path: *when_path - cron: update_docs event: cron + +steps: *legacy diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index ac8b60c0f..7ddf5c6ed 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -10,7 +10,7 @@ variables: # schema changes - "pipeline/schema/**" -pipeline: +pipeline: &legacy vendor: image: *golang_image group: prepare @@ -146,3 +146,5 @@ services: - MYSQL_ALLOW_EMPTY_PASSWORD=yes when: path: *when_path + +steps: *legacy diff --git a/.woodpecker/web.yml b/.woodpecker/web.yml index b7c2f50a7..52f61b5e9 100644 --- a/.woodpecker/web.yml +++ b/.woodpecker/web.yml @@ -6,7 +6,7 @@ variables: # web source code - "web/**" -pipeline: +pipeline: &legacy deps: image: *node_image directory: web/ @@ -64,3 +64,5 @@ pipeline: - pnpm test when: path: *when_path + +steps: *legacy diff --git a/docs/docs/10-intro.md b/docs/docs/10-intro.md index 90d644d27..73ffb1eb6 100644 --- a/docs/docs/10-intro.md +++ b/docs/docs/10-intro.md @@ -12,7 +12,7 @@ Woodpecker is a simple CI engine with great extensibility. It runs your pipeline ```yaml # .woodpecker.yml -pipeline: +steps: build: image: debian commands: @@ -23,7 +23,7 @@ pipeline: - echo "Testing.." ``` -### Pipeline steps are containers +### Steps are containers - Define any container image as context - either use your own and install the needed tools in custom image or @@ -31,7 +31,7 @@ pipeline: - List the commands that should be executed in your container, in order to build or test your application ```diff -pipeline: +steps: build: - image: debian + image: mycompany/image-with-awscli @@ -41,12 +41,12 @@ pipeline: ### File changes are incremental -- Woodpecker clones the source code in the beginning pipeline +- Woodpecker clones the source code in the beginning - Changes to files are persisted through steps as the same volume is mounted to all steps ```yaml # .woodpecker.yml -pipeline: +steps: build: image: debian commands: @@ -78,7 +78,7 @@ kubectl apply -f $PLUGIN_TEMPLATE ```yaml # .woodpecker.yml -pipeline: +steps: deploy-to-k8s: image: laszlocloud/my-k8s-plugin settings: diff --git a/docs/docs/20-usage/10-intro.md b/docs/docs/20-usage/10-intro.md index 327418a74..539191c3b 100644 --- a/docs/docs/20-usage/10-intro.md +++ b/docs/docs/20-usage/10-intro.md @@ -32,7 +32,7 @@ Read more at: [https://github.com/go-yaml/yaml](https://github.com/go-yaml/yaml/ Example pipeline configuration: ```yaml -pipeline: +steps: build: image: golang commands: @@ -50,7 +50,7 @@ services: Example pipeline configuration with multiple, serial steps: ```yaml -pipeline: +steps: backend: image: golang commands: diff --git a/docs/docs/20-usage/15-terminology.md b/docs/docs/20-usage/15-terminology.md index f27446b5c..68fc5ef0b 100644 --- a/docs/docs/20-usage/15-terminology.md +++ b/docs/docs/20-usage/15-terminology.md @@ -37,6 +37,6 @@ Sometimes there exist multiple terms that can be used for a thing, we try to def [Forge]: ../30-administration/11-forges/10-overview.md [Plugin]: ./51-plugins/10-plugins.md [Workspace]: ./20-pipeline-syntax.md#workspace -[Matrix]: ./30-matrix-pipelines.md +[Matrix]: ./30-matrix-workflows.md [Docker]: ../30-administration/22-backends/10-docker.md [Local]: ../30-administration/22-backends/20-local.md diff --git a/docs/docs/20-usage/20-pipeline-syntax.md b/docs/docs/20-usage/20-pipeline-syntax.md index e60c14910..0f7f197a6 100644 --- a/docs/docs/20-usage/20-pipeline-syntax.md +++ b/docs/docs/20-usage/20-pipeline-syntax.md @@ -2,10 +2,10 @@ The pipeline section defines a list of steps to build, test and deploy your code. Pipeline steps are executed serially, in the order in which they are defined. If a step returns a non-zero exit code, the pipeline immediately aborts and returns a failure status. -Example pipeline: +Example steps: ```yaml -pipeline: +steps: backend: image: golang commands: @@ -24,7 +24,7 @@ In the above example we define two pipeline steps, `frontend` and `backend`. The Another way to name a step is by using the name keyword: ```yaml -pipeline: +steps: - name: backend image: golang commands: @@ -54,7 +54,7 @@ Every step of your pipeline executes arbitrary commands inside a specified conta The associated commit of a current pipeline run is checked out with git to a workspace which is mounted to every step of the pipeline as the working directory. ```diff - pipeline: + steps: backend: image: golang commands: @@ -69,7 +69,7 @@ The associated commit of a current pipeline run is checked out with git to a wor ```yaml # .woodpecker.yml -pipeline: +steps: build: image: debian commands: @@ -87,7 +87,7 @@ Woodpecker pulls the defined image and uses it as environment to execute the pip When using the `local` backend, the `image` entry is used to specify the shell, such as Bash or Fish, that is used to run the commands. ```diff - pipeline: + steps: build: + image: golang:1.6 commands: @@ -116,7 +116,7 @@ image: index.docker.io/library/golang:1.7 Woodpecker does not automatically upgrade container images. Example configuration to always pull the latest image when updates are available: ```diff - pipeline: + steps: build: image: golang:latest + pull: true @@ -131,7 +131,7 @@ These credentials are never exposed to your pipeline, which means they cannot be Example configuration using a private image: ```diff - pipeline: + steps: build: + image: gcr.io/custom/golang commands: @@ -168,7 +168,7 @@ For specific details on configuring access to Google Container Registry, please Commands of every pipeline step are executed serially as if you would enter them into your local shell. ```diff - pipeline: + steps: backend: image: golang commands: @@ -211,7 +211,7 @@ For more details check the [secrets docs](./40-secrets.md). Some of the pipeline steps may be allowed to fail without causing the whole pipeline to report a failure (e.g., a step executing a linting check). To enable this, add `failure: ignore` to your pipeline step. If Woodpecker encounters an error while executing the step, it will report it as failed but still execute the next steps of the pipeline, if any, without affecting the status of the pipeline. ```diff - pipeline: + steps: backend: image: golang commands: @@ -225,7 +225,7 @@ Some of the pipeline steps may be allowed to fail without causing the whole pipe Woodpecker supports defining a list of conditions for a pipeline step by using a `when` block. If at least one of the conditions in the `when` block evaluate to true the step is executed, otherwise it is skipped. A condition can be a check like: ```diff - pipeline: + steps: slack: image: plugins/slack settings: @@ -242,7 +242,7 @@ Woodpecker supports defining a list of conditions for a pipeline step by using a Example conditional execution by repository: ```diff - pipeline: + steps: slack: image: plugins/slack settings: @@ -260,7 +260,7 @@ Branch conditions are not applied to tags. Example conditional execution by branch: ```diff -pipeline: +steps: slack: image: plugins/slack settings: @@ -363,7 +363,7 @@ when: There are use cases for executing pipeline steps on failure, such as sending notifications for failed pipelines. Use the status constraint to execute steps even when the pipeline fails: ```diff -pipeline: +steps: slack: image: plugins/slack settings: @@ -375,7 +375,7 @@ pipeline: #### `platform` :::note -This condition should be used in conjunction with a [matrix](./30-matrix-pipelines.md#example-matrix-pipeline-using-multiple-platforms) pipeline as a regular pipeline will only executed by a single agent which only has one arch. +This condition should be used in conjunction with a [matrix](./30-matrix-workflows.md#example-matrix-pipeline-using-multiple-platforms) pipeline as a regular pipeline will only executed by a single agent which only has one arch. ::: Execute a step for a specific platform: @@ -489,7 +489,7 @@ Woodpecker supports parallel step execution for same-machine fan-in and fan-out. Example parallel configuration: ```diff - pipeline: + steps: backend: + group: build image: golang @@ -547,7 +547,7 @@ The workspace can be customized using the workspace block in the YAML file: + base: /go + path: src/github.com/octocat/hello-world - pipeline: + steps: build: image: golang:latest commands: @@ -562,7 +562,7 @@ The base attribute defines a shared base volume available to all pipeline steps. + base: /go path: src/github.com/octocat/hello-world - pipeline: + steps: deps: image: golang:latest commands: @@ -600,7 +600,7 @@ git clone https://github.com/octocat/hello-world \ Woodpecker has integrated support for matrix builds. Woodpecker executes a separate build task for each combination in the matrix, allowing you to build and test a single commit against multiple configurations. -For more details check the [matrix build docs](./30-matrix-pipelines.md). +For more details check the [matrix build docs](./30-matrix-workflows.md). ## `platform` @@ -614,7 +614,7 @@ Assuming we have two agents, one `arm` and one `amd64`. Previously this pipeline ```diff +platform: linux/arm64 -pipeline: +steps: build: image: golang commands: @@ -639,7 +639,7 @@ You can add additional labels as a key value map: + weather: sun + hostname: "" # this label will be ignored as it is empty -pipeline: +steps: build: image: golang commands: @@ -664,7 +664,7 @@ You can manually configure the clone step in your pipeline for customization: + git: + image: woodpeckerci/plugin-git - pipeline: + steps: build: image: golang commands: @@ -723,7 +723,7 @@ To use the ssh git url in `.gitmodules` for users cloning with ssh, and also use + submodule_override: + my-module: https://github.com/octocat/my-module.git -pipeline: +steps: ... ``` @@ -747,7 +747,7 @@ Example conditional execution by repository: +when: + repo: test/test + - pipeline: + steps: slack: image: plugins/slack settings: @@ -766,7 +766,7 @@ Example conditional execution by branch: +when: + branch: master + - pipeline: + steps: slack: image: plugins/slack settings: @@ -896,7 +896,7 @@ Woodpecker gives the ability to configure privileged mode in the YAML. You can u > Privileged mode is only available to trusted repositories and for security reasons should only be used in private environments. See [project settings](./71-project-settings.md#trusted) to enable trusted mode. ```diff - pipeline: + steps: build: image: docker environment: diff --git a/docs/docs/20-usage/25-workflows.md b/docs/docs/20-usage/25-workflows.md index d576a22f7..57b67003a 100644 --- a/docs/docs/20-usage/25-workflows.md +++ b/docs/docs/20-usage/25-workflows.md @@ -36,7 +36,7 @@ If you still need to pass artifacts between the workflows you need use some stor .woodpecker/.build.yml ```yaml -pipeline: +steps: build: image: debian:stable-slim commands: @@ -47,7 +47,7 @@ pipeline: .woodpecker/.deploy.yml ```yaml -pipeline: +steps: deploy: image: debian:stable-slim commands: @@ -62,7 +62,7 @@ depends_on: .woodpecker/.test.yml ```yaml -pipeline: +steps: test: image: debian:stable-slim commands: @@ -76,7 +76,7 @@ depends_on: .woodpecker/.lint.yml ```yaml -pipeline: +steps: lint: image: debian:stable-slim commands: @@ -97,7 +97,7 @@ Dependencies between workflows can be set with the `depends_on` element. A workf The name for a `depends_on` entry is the filename without the path, leading dots and without the file extension `.yml` or `.yaml`. If the project config for example uses `.woodpecker/` as path for CI files with a file named `.woodpecker/.lint.yml` the corresponding `depends_on` entry would be `lint`. ```diff -pipeline: +steps: deploy: image: debian:stable-slim commands: @@ -112,7 +112,7 @@ pipeline: Workflows that need to run even on failures should set the `runs_on` tag. ```diff -pipeline: +steps: notify: image: debian:stable-slim commands: diff --git a/docs/docs/20-usage/30-matrix-pipelines.md b/docs/docs/20-usage/30-matrix-workflows.md similarity index 96% rename from docs/docs/20-usage/30-matrix-pipelines.md rename to docs/docs/20-usage/30-matrix-workflows.md index 1283f49d2..0e0e07e5d 100644 --- a/docs/docs/20-usage/30-matrix-pipelines.md +++ b/docs/docs/20-usage/30-matrix-workflows.md @@ -1,4 +1,4 @@ -# Matrix pipelines +# Matrix workflows Woodpecker has integrated support for matrix workflows. Woodpecker executes a separate workflow for each combination in the matrix, allowing you to build and test a single commit against multiple configurations. @@ -42,7 +42,7 @@ matrix: - mysql:6.5 - mariadb:10.1 -pipeline: +steps: build: image: golang:${GO_VERSION} commands: @@ -58,7 +58,7 @@ services: Example YAML file after injecting the matrix parameters: ```diff -pipeline: +steps: build: - image: golang:${GO_VERSION} + image: golang:1.4 @@ -87,7 +87,7 @@ matrix: - 1.8 - latest -pipeline: +steps: build: image: golang:${TAG} commands: @@ -104,7 +104,7 @@ matrix: - golang:1.8 - golang:latest -pipeline: +steps: build: image: ${IMAGE} commands: @@ -122,7 +122,7 @@ matrix: platform: ${platform} -pipeline: +steps: test: image: alpine commands: diff --git a/docs/docs/20-usage/35-advanced-yaml-syntax.md b/docs/docs/20-usage/35-advanced-yaml-syntax.md index 83f9e4f19..b5ea914c9 100644 --- a/docs/docs/20-usage/35-advanced-yaml-syntax.md +++ b/docs/docs/20-usage/35-advanced-yaml-syntax.md @@ -6,7 +6,7 @@ You can use [YAML anchors & aliases](https://yaml.org/spec/1.2.2/#3222-anchors-a To convert this: ```yml -pipeline: +steps: test: image: golang:1.18 commands: go test ./... @@ -21,7 +21,7 @@ Just add a new section called **variables** like this: +variables: + - &golang_image 'golang:1.18' - pipeline: + steps: test: - image: golang:1.18 + image: *golang_image @@ -44,7 +44,7 @@ variables: special: true - &some-plugin codeberg.org/6543/docker-images/print_env -pipeline: +steps: develop: image: *some-plugin settings: @@ -74,7 +74,7 @@ variables: hello_cmd: &hello_cmd - echo hello -pipeline: +steps: step1: image: debian commands: diff --git a/docs/docs/20-usage/40-secrets.md b/docs/docs/20-usage/40-secrets.md index 0a27e84e8..613a03fdb 100644 --- a/docs/docs/20-usage/40-secrets.md +++ b/docs/docs/20-usage/40-secrets.md @@ -5,7 +5,7 @@ Woodpecker provides the ability to store named parameters external to the YAML c Secrets are exposed to your pipeline steps and plugins as uppercase environment variables and can therefore be referenced in the commands section of your pipeline. ```diff -pipeline: +steps: docker: image: docker commands: @@ -20,7 +20,7 @@ In this example, the secret named `secret_token` would be passed to the pipeline **NOTE:** the `from_secret` syntax only works with the newer `settings` block. ```diff -pipeline: +steps: docker: image: my-plugin settings: @@ -32,7 +32,7 @@ pipeline: Please note parameter expressions are subject to pre-processing. When using secrets in parameter expressions they should be escaped. ```diff -pipeline: +steps: docker: image: docker commands: @@ -52,7 +52,7 @@ Secrets are added to the Woodpecker secret store on the UI or with the CLI. There may be scenarios where you are required to store secrets using alternate names. You can map the alternate secret name to the expected name using the below syntax: ```diff -pipeline: +steps: docker: image: plugins/docker repo: octocat/hello-world diff --git a/docs/docs/20-usage/45-cron.md b/docs/docs/20-usage/45-cron.md index f607579bc..a668c246e 100644 --- a/docs/docs/20-usage/45-cron.md +++ b/docs/docs/20-usage/45-cron.md @@ -12,7 +12,7 @@ Read more at: [pipeline-syntax#event](./20-pipeline-syntax.md#event) 1. To create a new cron job adjust your pipeline config(s) and add the event filter to all steps you would like to run by the cron job: ```diff - pipeline: + steps: sync_locales: image: weblate_sync settings: diff --git a/docs/docs/20-usage/50-environment.md b/docs/docs/20-usage/50-environment.md index 5770bee68..67f610b0f 100644 --- a/docs/docs/20-usage/50-environment.md +++ b/docs/docs/20-usage/50-environment.md @@ -3,7 +3,7 @@ Woodpecker provides the ability to pass environment variables to individual pipeline steps. Example pipeline step with custom environment variables: ```diff -pipeline: +steps: build: image: golang + environment: @@ -18,7 +18,7 @@ pipeline: Please note that the environment section is not able to expand environment variables. If you need to expand variables they should be exported in the commands section. ```diff -pipeline: +steps: build: image: golang - environment: @@ -32,7 +32,7 @@ pipeline: > Please be warned that `${variable}` expressions are subject to pre-processing. If you do not want the pre-processor to evaluate your expression it must be escaped: ```diff -pipeline: +steps: build: image: golang commands: @@ -146,7 +146,7 @@ services: These can be used, for example, to manage the image tag used by multiple projects. ```diff -pipeline: +steps: build: - image: golang:1.18 + image: golang:${GOLANG_VERSION} @@ -164,7 +164,7 @@ Woodpecker provides the ability to substitute environment variables at runtime. Example commit substitution: ```diff -pipeline: +steps: docker: image: plugins/docker settings: @@ -174,7 +174,7 @@ pipeline: Example tag substitution: ```diff -pipeline: +steps: docker: image: plugins/docker settings: @@ -202,7 +202,7 @@ Woodpecker also emulates bash string operations. This gives us the ability to ma Example variable substitution with substring: ```diff -pipeline: +steps: docker: image: plugins/docker settings: @@ -212,7 +212,7 @@ pipeline: Example variable substitution strips `v` prefix from `v.1.0.0`: ```diff -pipeline: +steps: docker: image: plugins/docker settings: diff --git a/docs/docs/20-usage/51-plugins/10-plugins.md b/docs/docs/20-usage/51-plugins/10-plugins.md index e7b511fc9..b580095d6 100644 --- a/docs/docs/20-usage/51-plugins/10-plugins.md +++ b/docs/docs/20-usage/51-plugins/10-plugins.md @@ -7,7 +7,7 @@ They are automatically pulled from the default container registry the agent's ha Example pipeline using the Docker and Slack plugins: ```yaml -pipeline: +steps: build: image: golang commands: diff --git a/docs/docs/20-usage/51-plugins/20-sample-plugin.md b/docs/docs/20-usage/51-plugins/20-sample-plugin.md index d7bf5918d..317303e76 100644 --- a/docs/docs/20-usage/51-plugins/20-sample-plugin.md +++ b/docs/docs/20-usage/51-plugins/20-sample-plugin.md @@ -7,7 +7,7 @@ This provides a brief tutorial for creating a Woodpecker webhook plugin, using s The below example demonstrates how we might configure a webhook plugin in the YAML file: ```yaml -pipeline: +steps: webhook: image: foo/webhook settings: diff --git a/docs/docs/20-usage/60-services.md b/docs/docs/20-usage/60-services.md index 62039fe36..df2467200 100644 --- a/docs/docs/20-usage/60-services.md +++ b/docs/docs/20-usage/60-services.md @@ -7,7 +7,7 @@ Services are accessed using custom hostnames. In the example below, the MySQL service is assigned the hostname `database` and is available at `database:3306`. ```diff -pipeline: +steps: build: image: golang commands: @@ -43,7 +43,7 @@ services: Service and long running containers can also be included in the pipeline section of the configuration using the detach parameter without blocking other steps. This should be used when explicit control over startup order is required. ```diff -pipeline: +steps: build: image: golang commands: @@ -67,7 +67,7 @@ Containers from detached steps will terminate when the pipeline ends. Service containers require time to initialize and begin to accept connections. If you are unable to connect to a service you may need to wait a few seconds or implement a backoff. ```diff -pipeline: +steps: test: image: golang commands: @@ -89,7 +89,7 @@ services: environment: - MYSQL_DATABASE=test - MYSQL_ROOT_PASSWORD=example -pipeline: +steps: get-version: image: ubuntu commands: diff --git a/docs/docs/20-usage/70-volumes.md b/docs/docs/20-usage/70-volumes.md index 2e9100a33..297f14ec0 100644 --- a/docs/docs/20-usage/70-volumes.md +++ b/docs/docs/20-usage/70-volumes.md @@ -7,7 +7,7 @@ Volumes are only available to trusted repositories and for security reasons shou ::: ```diff -pipeline: +steps: build: image: docker commands: diff --git a/docs/docs/30-administration/100-external-configuration-api.md b/docs/docs/30-administration/100-external-configuration-api.md index 6a7a21b55..42851a411 100644 --- a/docs/docs/30-administration/100-external-configuration-api.md +++ b/docs/docs/30-administration/100-external-configuration-api.md @@ -84,7 +84,7 @@ WOODPECKER_CONFIG_SERVICE_ENDPOINT=https://example.com/ciconfig "configs": [ { "name": ".woodpecker.yml", - "data": "pipeline:\n backend:\n image: alpine\n commands:\n - echo \"Hello there from Repo (.woodpecker.yml)\"\n" + "data": "steps:\n backend:\n image: alpine\n commands:\n - echo \"Hello there from Repo (.woodpecker.yml)\"\n" } ] } @@ -97,7 +97,7 @@ WOODPECKER_CONFIG_SERVICE_ENDPOINT=https://example.com/ciconfig "configs": [ { "name": "central-override", - "data": "pipeline:\n backend:\n image: alpine\n commands:\n - echo \"Hello there from ConfigAPI\"\n" + "data": "steps:\n backend:\n image: alpine\n commands:\n - echo \"Hello there from ConfigAPI\"\n" } ] } diff --git a/docs/docs/30-administration/22-backends/20-local.md b/docs/docs/30-administration/22-backends/20-local.md index 76f589eb5..5e57b04ce 100644 --- a/docs/docs/30-administration/22-backends/20-local.md +++ b/docs/docs/30-administration/22-backends/20-local.md @@ -85,7 +85,7 @@ used to run the commands. ```yaml # .woodpecker.yml -pipeline: +steps: build: image: bash commands: @@ -116,7 +116,7 @@ only run on this agent: labels: type: exec -pipeline: +steps: [...] ``` diff --git a/docs/docs/30-administration/22-backends/40-kubernetes.md b/docs/docs/30-administration/22-backends/40-kubernetes.md index bb4e7ae43..69b9e04cf 100644 --- a/docs/docs/30-administration/22-backends/40-kubernetes.md +++ b/docs/docs/30-administration/22-backends/40-kubernetes.md @@ -46,7 +46,7 @@ The kubernetes backend also allows for specifying requests and limits on a per-s Example pipeline configuration: ```yaml -pipeline: +steps: build: image: golang commands: diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index 434fbde41..ec30ca3c6 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -18,6 +18,7 @@ Some versions need some changes to the server configuration or the pipeline conf - The pipelines are now also read from `.yaml` files, the new default order is `.woodpecker/*.yml` and `.woodpecker/*.yaml` (without any prioritization) -> `.woodpecker.yml` -> `.woodpecker.yaml` - Dropped support for [Coding](https://coding.net/) and [Gogs](https://gogs.io). - `/api/queue/resume` & `/api/queue/pause` endpoint methods were changed from `GET` to `POST` +- rename `pipeline:` key in your workflow config to `steps:` ## 0.15.0 @@ -75,7 +76,7 @@ Some versions need some changes to the server configuration or the pipeline conf - Plugin Settings moved into `settings` section: ```diff - pipeline: + steps: something: image: my/plugin - setting1: foo diff --git a/pipeline/frontend/metadata_test.go b/pipeline/frontend/metadata_test.go index 3b5860742..3def1c344 100644 --- a/pipeline/frontend/metadata_test.go +++ b/pipeline/frontend/metadata_test.go @@ -33,11 +33,11 @@ func TestEnvVarSubst(t *testing.T) { want string }{{ name: "simple substitution", - yaml: `pipeline: + yaml: `steps: step1: image: ${HELLO_IMAGE}`, environ: map[string]string{"HELLO_IMAGE": "hello-world"}, - want: `pipeline: + want: `steps: step1: image: hello-world`, }} diff --git a/pipeline/frontend/yaml/linter/linter_test.go b/pipeline/frontend/yaml/linter/linter_test.go index 1be131826..d752e8e29 100644 --- a/pipeline/frontend/yaml/linter/linter_test.go +++ b/pipeline/frontend/yaml/linter/linter_test.go @@ -8,7 +8,7 @@ import ( func TestLint(t *testing.T) { testdatas := []struct{ Title, Data string }{{Title: "map", Data: ` -pipeline: +steps: build: image: docker privileged: true @@ -27,7 +27,7 @@ services: redis: image: redis `}, {Title: "list", Data: ` -pipeline: +steps: - name: build image: docker privileged: true @@ -50,7 +50,7 @@ variables: commands: - go version -pipeline: +steps: test base step: <<: *base-step test base step with latest image: @@ -82,52 +82,52 @@ func TestLintErrors(t *testing.T) { want: "Invalid or missing pipeline section", }, { - from: "pipeline: { build: { image: '' } }", + from: "steps: { build: { image: '' } }", want: "Invalid or missing image", }, { - from: "pipeline: { build: { image: golang, privileged: true } }", + from: "steps: { build: { image: golang, privileged: true } }", want: "Insufficient privileges to use privileged mode", }, { - from: "pipeline: { build: { image: golang, shm_size: 10gb } }", + from: "steps: { build: { image: golang, shm_size: 10gb } }", want: "Insufficient privileges to override shm_size", }, { - from: "pipeline: { build: { image: golang, dns: [ 8.8.8.8 ] } }", + from: "steps: { build: { image: golang, dns: [ 8.8.8.8 ] } }", want: "Insufficient privileges to use custom dns", }, { - from: "pipeline: { build: { image: golang, dns_search: [ example.com ] } }", + from: "steps: { build: { image: golang, dns_search: [ example.com ] } }", want: "Insufficient privileges to use dns_search", }, { - from: "pipeline: { build: { image: golang, devices: [ '/dev/tty0:/dev/tty0' ] } }", + from: "steps: { build: { image: golang, devices: [ '/dev/tty0:/dev/tty0' ] } }", want: "Insufficient privileges to use devices", }, { - from: "pipeline: { build: { image: golang, extra_hosts: [ 'somehost:162.242.195.82' ] } }", + from: "steps: { build: { image: golang, extra_hosts: [ 'somehost:162.242.195.82' ] } }", want: "Insufficient privileges to use extra_hosts", }, { - from: "pipeline: { build: { image: golang, network_mode: host } }", + from: "steps: { build: { image: golang, network_mode: host } }", want: "Insufficient privileges to use network_mode", }, { - from: "pipeline: { build: { image: golang, networks: [ outside, default ] } }", + from: "steps: { build: { image: golang, networks: [ outside, default ] } }", want: "Insufficient privileges to use networks", }, { - from: "pipeline: { build: { image: golang, volumes: [ '/opt/data:/var/lib/mysql' ] } }", + from: "steps: { build: { image: golang, volumes: [ '/opt/data:/var/lib/mysql' ] } }", want: "Insufficient privileges to use volumes", }, { - from: "pipeline: { build: { image: golang, network_mode: 'container:name' } }", + from: "steps: { build: { image: golang, network_mode: 'container:name' } }", want: "Insufficient privileges to use network_mode", }, { - from: "pipeline: { build: { image: golang, sysctls: [ net.core.somaxconn=1024 ] } }", + from: "steps: { build: { image: golang, sysctls: [ net.core.somaxconn=1024 ] } }", want: "Insufficient privileges to use sysctls", }, } diff --git a/pipeline/frontend/yaml/parse.go b/pipeline/frontend/yaml/parse.go index 947f7410a..10bfb2d3d 100644 --- a/pipeline/frontend/yaml/parse.go +++ b/pipeline/frontend/yaml/parse.go @@ -29,6 +29,12 @@ func ParseBytes(b []byte) (*types.Workflow, error) { out.BranchesDontUseIt = nil } + // support deprecated pipeline keyword + if len(out.PipelineDontUseIt.ContainerList) != 0 && len(out.Steps.ContainerList) == 0 { + out.Steps.ContainerList = out.PipelineDontUseIt.ContainerList + } + out.PipelineDontUseIt.ContainerList = nil + return out, nil } diff --git a/pipeline/frontend/yaml/parse_test.go b/pipeline/frontend/yaml/parse_test.go index 12cbe1a05..3f9f9aef8 100644 --- a/pipeline/frontend/yaml/parse_test.go +++ b/pipeline/frontend/yaml/parse_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/franela/goblin" + "github.com/stretchr/testify/assert" "github.com/woodpecker-ci/woodpecker/pipeline/frontend/metadata" yaml_base_types "github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml/types/base" @@ -123,6 +124,41 @@ func TestParse(t *testing.T) { }) } +func TestParseLegacy(t *testing.T) { + sampleYamlPipelineLegacy := ` +pipeline: + say hello: + image: bash + commands: echo hello +` + + sampleYamlPipelineLegacyIgnore := ` +steps: + say hello: + image: bash + commands: echo hello + +pipeline: + old crap: + image: bash + commands: meh! +` + + workflow1, err := ParseString(sampleYamlPipelineLegacy) + if !assert.NoError(t, err) { + t.Fail() + } + + workflow2, err := ParseString(sampleYamlPipelineLegacyIgnore) + if !assert.NoError(t, err) { + t.Fail() + } + + assert.EqualValues(t, workflow1, workflow2) + assert.Len(t, workflow1.Steps.ContainerList, 1) + assert.EqualValues(t, "say hello", workflow1.Steps.ContainerList[0].Name) +} + var sampleYaml = ` image: hello-world when: @@ -137,7 +173,7 @@ build: workspace: path: src/github.com/octocat/hello-world base: /go -pipeline: +steps: test: image: golang commands: @@ -178,7 +214,7 @@ runs_on: var simpleYamlAnchors = ` vars: image: &image plugins/slack -pipeline: +steps: notify_success: image: *image ` @@ -186,7 +222,7 @@ pipeline: var sampleVarYaml = ` _slack: &SLACK image: plugins/slack -pipeline: +steps: notify_fail: *SLACK notify_success: << : *SLACK diff --git a/pipeline/frontend/yaml/types/workflow.go b/pipeline/frontend/yaml/types/workflow.go index aaf983781..ca03250e9 100644 --- a/pipeline/frontend/yaml/types/workflow.go +++ b/pipeline/frontend/yaml/types/workflow.go @@ -12,7 +12,7 @@ type ( Platform string `yaml:"platform,omitempty"` Workspace Workspace `yaml:"workspace,omitempty"` Clone ContainerList `yaml:"clone,omitempty"` - Steps ContainerList `yaml:"pipeline"` // TODO: discussed if we should rename it to "steps" + Steps ContainerList `yaml:"steps,omitempty"` Services ContainerList `yaml:"services,omitempty"` Labels base.SliceOrMap `yaml:"labels,omitempty"` DependsOn []string `yaml:"depends_on,omitempty"` @@ -24,6 +24,8 @@ type ( Volumes WorkflowVolumes `yaml:"volumes,omitempty"` // Deprecated BranchesDontUseIt *constraint.List `yaml:"branches,omitempty"` + // Deprecated + PipelineDontUseIt ContainerList `yaml:"pipeline,omitempty"` } // Workspace defines a pipeline workspace. diff --git a/pipeline/samples/sample_1/pipeline.yml b/pipeline/samples/sample_1/pipeline.yml index 34c7700df..c628e92e7 100644 --- a/pipeline/samples/sample_1/pipeline.yml +++ b/pipeline/samples/sample_1/pipeline.yml @@ -7,7 +7,7 @@ clone: image: woodpeckerci/plugin-git depth: 50 -pipeline: +steps: build: image: golang:1.7 commands: diff --git a/pipeline/samples/sample_10_windows/pipeline.yml b/pipeline/samples/sample_10_windows/pipeline.yml index fd595bd39..7e8f9bfb8 100644 --- a/pipeline/samples/sample_10_windows/pipeline.yml +++ b/pipeline/samples/sample_10_windows/pipeline.yml @@ -9,7 +9,7 @@ clone: image: woodpeckerci/plugin-git:windows depth: 50 -pipeline: +steps: build: image: golang:1.10.1-nanoserver-sac2016 commands: diff --git a/pipeline/samples/sample_2/pipeline.yml b/pipeline/samples/sample_2/pipeline.yml index 57e26d9d6..7deb92348 100644 --- a/pipeline/samples/sample_2/pipeline.yml +++ b/pipeline/samples/sample_2/pipeline.yml @@ -2,7 +2,7 @@ workspace: base: /go path: src/github.com/go-sql-driver/mysql -pipeline: +steps: build: image: golang:1.7 environment: diff --git a/pipeline/samples/sample_3/pipeline.yml b/pipeline/samples/sample_3/pipeline.yml index b7903527b..adac66ced 100644 --- a/pipeline/samples/sample_3/pipeline.yml +++ b/pipeline/samples/sample_3/pipeline.yml @@ -7,7 +7,7 @@ clone: image: woodpeckerci/plugin-git depth: 50 -pipeline: +steps: build: image: golang:1.7 commands: diff --git a/pipeline/samples/sample_4/pipeline.yml b/pipeline/samples/sample_4/pipeline.yml index a3aa144ca..998b9992c 100644 --- a/pipeline/samples/sample_4/pipeline.yml +++ b/pipeline/samples/sample_4/pipeline.yml @@ -7,7 +7,7 @@ clone: image: woodpeckerci/plugin-git depth: 50 -pipeline: +steps: build: image: golang:1.7 commands: diff --git a/pipeline/samples/sample_5/pipeline.yml b/pipeline/samples/sample_5/pipeline.yml index e8c935084..90659a7ab 100644 --- a/pipeline/samples/sample_5/pipeline.yml +++ b/pipeline/samples/sample_5/pipeline.yml @@ -7,7 +7,7 @@ clone: image: woodpeckerci/plugin-git depth: 50 -pipeline: +steps: # these steps define a parallel execution # group and will fan out. diff --git a/pipeline/samples/sample_6/pipeline.yml b/pipeline/samples/sample_6/pipeline.yml index fe2ae7ce6..0c684a86b 100644 --- a/pipeline/samples/sample_6/pipeline.yml +++ b/pipeline/samples/sample_6/pipeline.yml @@ -7,7 +7,7 @@ clone: image: woodpeckerci/plugin-git depth: 50 -pipeline: +steps: build: image: golang:1.7 commands: diff --git a/pipeline/samples/sample_7_redis/pipeline.yml b/pipeline/samples/sample_7_redis/pipeline.yml index c0e598b92..0563a427d 100644 --- a/pipeline/samples/sample_7_redis/pipeline.yml +++ b/pipeline/samples/sample_7_redis/pipeline.yml @@ -2,7 +2,7 @@ workspace: base: /go path: src/github.com/drone/envsubst -pipeline: +steps: build: image: redis:3.0 commands: diff --git a/pipeline/samples/sample_8_network_mode/pipeline.yml b/pipeline/samples/sample_8_network_mode/pipeline.yml index 24b120734..2c53ce38d 100644 --- a/pipeline/samples/sample_8_network_mode/pipeline.yml +++ b/pipeline/samples/sample_8_network_mode/pipeline.yml @@ -7,7 +7,7 @@ clone: image: woodpeckerci/plugin-git depth: 50 -pipeline: +steps: build: image: tutum/curl # A container named "vpn" should exist on the same docker daemon diff --git a/pipeline/samples/sample_8_postgres/pipeline.yml b/pipeline/samples/sample_8_postgres/pipeline.yml index 65051cc0d..cd9d6a240 100644 --- a/pipeline/samples/sample_8_postgres/pipeline.yml +++ b/pipeline/samples/sample_8_postgres/pipeline.yml @@ -1,4 +1,4 @@ -pipeline: +steps: ping: image: postgres commands: diff --git a/pipeline/samples/sample_9_cache/pipeline.yml b/pipeline/samples/sample_9_cache/pipeline.yml index 38e922dc6..62833cf75 100644 --- a/pipeline/samples/sample_9_cache/pipeline.yml +++ b/pipeline/samples/sample_9_cache/pipeline.yml @@ -1,7 +1,7 @@ cache: - node_modules -pipeline: +steps: build: image: node commands: diff --git a/pipeline/schema/.woodpecker/test-branches-array.yml b/pipeline/schema/.woodpecker/test-branches-array.yml index 7cd7b9b5a..15b67f60a 100644 --- a/pipeline/schema/.woodpecker/test-branches-array.yml +++ b/pipeline/schema/.woodpecker/test-branches-array.yml @@ -1,6 +1,6 @@ branches: [master, pages] -pipeline: +steps: build: image: golang commands: diff --git a/pipeline/schema/.woodpecker/test-branches-exclude-include.yml b/pipeline/schema/.woodpecker/test-branches-exclude-include.yml index 9da75e0e5..40d58bee5 100644 --- a/pipeline/schema/.woodpecker/test-branches-exclude-include.yml +++ b/pipeline/schema/.woodpecker/test-branches-exclude-include.yml @@ -2,7 +2,7 @@ branches: include: master exclude: [ develop, feature/* ] -pipeline: +steps: build: image: golang commands: diff --git a/pipeline/schema/.woodpecker/test-branches.yml b/pipeline/schema/.woodpecker/test-branches.yml index d597ac6f9..3d45475c5 100644 --- a/pipeline/schema/.woodpecker/test-branches.yml +++ b/pipeline/schema/.woodpecker/test-branches.yml @@ -1,6 +1,6 @@ branches: master -pipeline: +steps: build: image: golang commands: diff --git a/pipeline/schema/.woodpecker/test-broken.yml b/pipeline/schema/.woodpecker/test-broken.yml index f38aae923..c0dda77d7 100644 --- a/pipeline/schema/.woodpecker/test-broken.yml +++ b/pipeline/schema/.woodpecker/test-broken.yml @@ -5,7 +5,7 @@ matri: - 1.14 - 1.13 -pipeline: +steps: test: image: golang:${GO_VERSION} commands: diff --git a/pipeline/schema/.woodpecker/test-clone-skip.yml b/pipeline/schema/.woodpecker/test-clone-skip.yml index 34809cf81..50c20409c 100644 --- a/pipeline/schema/.woodpecker/test-clone-skip.yml +++ b/pipeline/schema/.woodpecker/test-clone-skip.yml @@ -1,4 +1,4 @@ -pipeline: +steps: test: image: alpine commands: diff --git a/pipeline/schema/.woodpecker/test-clone.yml b/pipeline/schema/.woodpecker/test-clone.yml index 9ee744a71..81ef330c6 100644 --- a/pipeline/schema/.woodpecker/test-clone.yml +++ b/pipeline/schema/.woodpecker/test-clone.yml @@ -7,7 +7,7 @@ clone: submodule_override: my-module: https://github.com/octocat/my-module.git -pipeline: +steps: test: image: alpine commands: diff --git a/pipeline/schema/.woodpecker/test-labels.yml b/pipeline/schema/.woodpecker/test-labels.yml index 0230d299a..4de55db77 100644 --- a/pipeline/schema/.woodpecker/test-labels.yml +++ b/pipeline/schema/.woodpecker/test-labels.yml @@ -3,7 +3,7 @@ labels: weather: sun hostname: "" -pipeline: +steps: build: image: golang:latest commands: diff --git a/pipeline/schema/.woodpecker/test-matrix.yml b/pipeline/schema/.woodpecker/test-matrix.yml index 2e8ed66fd..449ab7a57 100644 --- a/pipeline/schema/.woodpecker/test-matrix.yml +++ b/pipeline/schema/.woodpecker/test-matrix.yml @@ -1,4 +1,4 @@ -pipeline: +steps: test: image: golang:${GO_VERSION} commands: diff --git a/pipeline/schema/.woodpecker/test-merge-map-and-sequence.yml b/pipeline/schema/.woodpecker/test-merge-map-and-sequence.yml index 94e0558ab..acd24e0f3 100644 --- a/pipeline/schema/.woodpecker/test-merge-map-and-sequence.yml +++ b/pipeline/schema/.woodpecker/test-merge-map-and-sequence.yml @@ -5,7 +5,7 @@ variables: - go version - whoami -pipeline: +steps: test-base-step: <<: *base-step test base step with latest image: diff --git a/pipeline/schema/.woodpecker/test-multi.yml b/pipeline/schema/.woodpecker/test-multi.yml index d4945a552..e5d4fda79 100644 --- a/pipeline/schema/.woodpecker/test-multi.yml +++ b/pipeline/schema/.woodpecker/test-multi.yml @@ -1,4 +1,4 @@ -pipeline: +steps: deploy: image: golang commands: diff --git a/pipeline/schema/.woodpecker/test-pipeline-when.yml b/pipeline/schema/.woodpecker/test-pipeline-when.yml index 168e88f53..b7dbc97e5 100644 --- a/pipeline/schema/.woodpecker/test-pipeline-when.yml +++ b/pipeline/schema/.woodpecker/test-pipeline-when.yml @@ -11,7 +11,7 @@ when: include: - hello -pipeline: +steps: echo: image: alpine commands: diff --git a/pipeline/schema/.woodpecker/test-platform.yml b/pipeline/schema/.woodpecker/test-platform.yml index dda1cc8eb..7b4abf027 100644 --- a/pipeline/schema/.woodpecker/test-platform.yml +++ b/pipeline/schema/.woodpecker/test-platform.yml @@ -1,6 +1,6 @@ platform: linux/amd64 -pipeline: +steps: build: image: golang:latest commands: diff --git a/pipeline/schema/.woodpecker/test-plugin.yml b/pipeline/schema/.woodpecker/test-plugin.yml index 7d82c5275..db85967b2 100644 --- a/pipeline/schema/.woodpecker/test-plugin.yml +++ b/pipeline/schema/.woodpecker/test-plugin.yml @@ -1,4 +1,4 @@ -pipeline: +steps: build: image: golang commands: diff --git a/pipeline/schema/.woodpecker/test-run-on.yml b/pipeline/schema/.woodpecker/test-run-on.yml index c2b1a2f6f..268ac23c7 100644 --- a/pipeline/schema/.woodpecker/test-run-on.yml +++ b/pipeline/schema/.woodpecker/test-run-on.yml @@ -1,4 +1,4 @@ -pipeline: +steps: build: image: golang commands: diff --git a/pipeline/schema/.woodpecker/test-service.yml b/pipeline/schema/.woodpecker/test-service.yml index 7517a6d28..03564e9fc 100644 --- a/pipeline/schema/.woodpecker/test-service.yml +++ b/pipeline/schema/.woodpecker/test-service.yml @@ -1,4 +1,4 @@ -pipeline: +steps: build: image: golang commands: diff --git a/pipeline/schema/.woodpecker/test-step.yml b/pipeline/schema/.woodpecker/test-step.yml index e3239bc19..3db52b95c 100644 --- a/pipeline/schema/.woodpecker/test-step.yml +++ b/pipeline/schema/.woodpecker/test-step.yml @@ -1,4 +1,4 @@ -pipeline: +steps: image: image: golang commands: diff --git a/pipeline/schema/.woodpecker/test-when.yml b/pipeline/schema/.woodpecker/test-when.yml index 3ad6ca7b5..6b9d80af4 100644 --- a/pipeline/schema/.woodpecker/test-when.yml +++ b/pipeline/schema/.woodpecker/test-when.yml @@ -1,4 +1,4 @@ -pipeline: +steps: when-branch: image: alpine commands: diff --git a/pipeline/schema/.woodpecker/test-workspace.yml b/pipeline/schema/.woodpecker/test-workspace.yml index 51607a3e9..5ee7ae988 100644 --- a/pipeline/schema/.woodpecker/test-workspace.yml +++ b/pipeline/schema/.woodpecker/test-workspace.yml @@ -2,7 +2,7 @@ workspace: base: /go path: src/github.com/octocat/hello-world -pipeline: +steps: build: image: golang:latest commands: diff --git a/pipeline/schema/schema.json b/pipeline/schema/schema.json index 1c0774e8c..289efc87d 100644 --- a/pipeline/schema/schema.json +++ b/pipeline/schema/schema.json @@ -4,7 +4,7 @@ "$id": "https://woodpecker-ci.org/schema/woodpecker.json", "description": "Schema of a Woodpecker pipeline file. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax", "type": "object", - "required": ["pipeline"], + "required": ["steps"], "additionalProperties": false, "properties": { "$schema": { @@ -18,7 +18,8 @@ "skip_clone": { "type": "boolean" }, "branches": { "$ref": "#/definitions/branches" }, "when": { "$ref": "#/definitions/pipeline_when" }, - "pipeline": { "$ref": "#/definitions/pipeline" }, + "steps": { "$ref": "#/definitions/step_list" }, + "pipeline": { "$ref": "#/definitions/step_list", "description": "depricated, use steps" }, "services": { "$ref": "#/definitions/services" }, "workspace": { "$ref": "#/definitions/workspace" }, "matrix": { "$ref": "#/definitions/matrix" }, @@ -92,8 +93,8 @@ } ] }, - "pipeline": { - "description": "The pipeline section defines a list of steps which will be executed serially, in the order in which they are defined. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax", + "step_list": { + "description": "The steps section defines a list of steps which will be executed serially, in the order in which they are defined. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax", "oneOf": [ { "type": "object", "additionalProperties": { "$ref": "#/definitions/step" }, "minProperties": 1 }, { "type": "array", "items": { "$ref": "#/definitions/step" }, "minLength": 1 } diff --git a/pipeline/stepBuilder_test.go b/pipeline/stepBuilder_test.go index dd9df6121..dc61e82c1 100644 --- a/pipeline/stepBuilder_test.go +++ b/pipeline/stepBuilder_test.go @@ -47,7 +47,7 @@ func TestGlobalEnvsubst(t *testing.T) { Link: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -pipeline: +steps: build: image: ${IMAGE} yyy: ${CI_COMMIT_MESSAGE} @@ -82,7 +82,7 @@ func TestMissingGlobalEnvsubst(t *testing.T) { Link: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -pipeline: +steps: build: image: ${IMAGE} yyy: ${CI_COMMIT_MESSAGE} @@ -114,13 +114,13 @@ bbb`, Link: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -pipeline: +steps: xxx: image: scratch yyy: ${CI_COMMIT_MESSAGE} `)}, {Data: []byte(` -pipeline: +steps: build: image: scratch yyy: ${CI_COMMIT_MESSAGE} @@ -149,12 +149,12 @@ func TestMultiPipeline(t *testing.T) { Link: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -pipeline: +steps: xxx: image: scratch `)}, {Data: []byte(` -pipeline: +steps: build: image: scratch `)}, @@ -184,17 +184,17 @@ func TestDependsOn(t *testing.T) { Link: "", Yamls: []*forge_types.FileMeta{ {Name: "lint", Data: []byte(` -pipeline: +steps: build: image: scratch `)}, {Name: "test", Data: []byte(` -pipeline: +steps: build: image: scratch `)}, {Data: []byte(` -pipeline: +steps: deploy: image: scratch @@ -231,7 +231,7 @@ func TestRunsOn(t *testing.T) { Link: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -pipeline: +steps: deploy: image: scratch @@ -268,12 +268,12 @@ func TestPipelineName(t *testing.T) { Link: "", Yamls: []*forge_types.FileMeta{ {Name: ".woodpecker/lint.yml", Data: []byte(` -pipeline: +steps: build: image: scratch `)}, {Name: ".woodpecker/.test.yml", Data: []byte(` -pipeline: +steps: build: image: scratch `)}, @@ -304,13 +304,13 @@ func TestBranchFilter(t *testing.T) { Link: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -pipeline: +steps: xxx: image: scratch branches: master `)}, {Data: []byte(` -pipeline: +steps: build: image: scratch `)}, @@ -346,7 +346,7 @@ func TestRootWhenFilter(t *testing.T) { when: event: - tester -pipeline: +steps: xxx: image: scratch `)}, @@ -354,12 +354,12 @@ pipeline: when: event: - push -pipeline: +steps: xxx: image: scratch `)}, {Data: []byte(` -pipeline: +steps: build: image: scratch `)}, @@ -393,7 +393,7 @@ func TestZeroSteps(t *testing.T) { Yamls: []*forge_types.FileMeta{ {Data: []byte(` skip_clone: true -pipeline: +steps: build: when: branch: notdev @@ -428,19 +428,19 @@ func TestZeroStepsAsMultiPipelineDeps(t *testing.T) { Yamls: []*forge_types.FileMeta{ {Name: "zerostep", Data: []byte(` skip_clone: true -pipeline: +steps: build: when: branch: notdev image: scratch `)}, {Name: "justastep", Data: []byte(` -pipeline: +steps: build: image: scratch `)}, {Name: "shouldbefiltered", Data: []byte(` -pipeline: +steps: build: image: scratch depends_on: [ zerostep ] @@ -477,25 +477,25 @@ func TestZeroStepsAsMultiPipelineTransitiveDeps(t *testing.T) { Yamls: []*forge_types.FileMeta{ {Name: "zerostep", Data: []byte(` skip_clone: true -pipeline: +steps: build: when: branch: notdev image: scratch `)}, {Name: "justastep", Data: []byte(` -pipeline: +steps: build: image: scratch `)}, {Name: "shouldbefiltered", Data: []byte(` -pipeline: +steps: build: image: scratch depends_on: [ zerostep ] `)}, {Name: "shouldbefilteredtoo", Data: []byte(` -pipeline: +steps: build: image: scratch depends_on: [ shouldbefiltered ] @@ -533,7 +533,7 @@ func TestTree(t *testing.T) { Link: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -pipeline: +steps: build: image: scratch `)},