From 689669dd8901057a81c4f3534ce3c70e905d304c Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 28 Dec 2023 11:33:25 +0100 Subject: [PATCH 1/2] Revert "Add workflow version (#2476)" This reverts commit 1bc4415075488d1bdfb496a5954505459b252032. --- .woodpecker/binaries.yml | 2 - .woodpecker/docker.yml | 2 - .woodpecker/docs.yml | 2 - .woodpecker/release-helper.yml | 2 - .woodpecker/securityscan.yml | 2 - .woodpecker/test.yml | 2 - .woodpecker/web.yml | 2 - .../woodpecker-test-repo/.woodpecker/demo.yml | 1 - .../woodpecker-test-repo/.woodpecker/test.yml | 1 - pipeline/frontend/yaml/linter/linter_test.go | 5 +- .../.woodpecker/test-branches-array.yml | 2 - .../test-branches-exclude-include.yml | 2 - .../schema/.woodpecker/test-branches.yml | 2 - .../linter/schema/.woodpecker/test-broken.yml | 2 - .../schema/.woodpecker/test-clone-skip.yml | 2 - .../linter/schema/.woodpecker/test-clone.yml | 2 - .../linter/schema/.woodpecker/test-labels.yml | 2 - .../linter/schema/.woodpecker/test-matrix.yml | 2 - .../test-merge-map-and-sequence.yml | 2 - .../linter/schema/.woodpecker/test-multi.yml | 2 - .../schema/.woodpecker/test-pipeline-when.yml | 2 - .../schema/.woodpecker/test-platform.yml | 2 - .../linter/schema/.woodpecker/test-plugin.yml | 2 - .../linter/schema/.woodpecker/test-run-on.yml | 2 - .../schema/.woodpecker/test-service.yml | 2 - .../linter/schema/.woodpecker/test-step.yml | 2 - .../linter/schema/.woodpecker/test-when.yml | 2 - .../schema/.woodpecker/test-workspace.yml | 2 - .../frontend/yaml/linter/schema/schema.json | 296 +++--------------- pipeline/frontend/yaml/parse.go | 30 +- pipeline/frontend/yaml/parse_test.go | 19 -- pipeline/frontend/yaml/types/workflow.go | 1 - pipeline/frontend/yaml/version.go | 18 -- pipeline/stepBuilder_test.go | 25 -- shared/constant/constant.go | 2 - 35 files changed, 51 insertions(+), 397 deletions(-) delete mode 100644 pipeline/frontend/yaml/version.go diff --git a/.woodpecker/binaries.yml b/.woodpecker/binaries.yml index f3213c263a..8d57840b87 100644 --- a/.woodpecker/binaries.yml +++ b/.woodpecker/binaries.yml @@ -1,5 +1,3 @@ -version: 1 - depends_on: - test - web diff --git a/.woodpecker/docker.yml b/.woodpecker/docker.yml index f494532e77..50b16cc83d 100644 --- a/.woodpecker/docker.yml +++ b/.woodpecker/docker.yml @@ -1,5 +1,3 @@ -version: 1 - when: - event: [pull_request, tag] - event: push diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml index 61d3bf8847..7e86aaf0a3 100644 --- a/.woodpecker/docs.yml +++ b/.woodpecker/docs.yml @@ -1,5 +1,3 @@ -version: 1 - when: - event: tag - event: pull_request diff --git a/.woodpecker/release-helper.yml b/.woodpecker/release-helper.yml index 8ab32a0802..0606325a73 100644 --- a/.woodpecker/release-helper.yml +++ b/.woodpecker/release-helper.yml @@ -1,5 +1,3 @@ -version: 1 - steps: release-helper: image: woodpeckerci/plugin-ready-release-go:1.0.3 diff --git a/.woodpecker/securityscan.yml b/.woodpecker/securityscan.yml index d857f6c800..dc8ac4a984 100644 --- a/.woodpecker/securityscan.yml +++ b/.woodpecker/securityscan.yml @@ -1,5 +1,3 @@ -version: 1 - when: - event: [pull_request, cron] - event: push diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index b321926aa3..7ba9bc7fec 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -1,5 +1,3 @@ -version: 1 - when: - event: [pull_request, tag] - event: push diff --git a/.woodpecker/web.yml b/.woodpecker/web.yml index a999fd4c04..e09a7dfc0e 100644 --- a/.woodpecker/web.yml +++ b/.woodpecker/web.yml @@ -1,5 +1,3 @@ -version: 1 - when: - event: [pull_request, tag] - event: push diff --git a/contrib/woodpecker-test-repo/.woodpecker/demo.yml b/contrib/woodpecker-test-repo/.woodpecker/demo.yml index cc6ae3bb9b..02824a8dee 100644 --- a/contrib/woodpecker-test-repo/.woodpecker/demo.yml +++ b/contrib/woodpecker-test-repo/.woodpecker/demo.yml @@ -1,4 +1,3 @@ -version: 1 steps: demo: image: 'alpine' diff --git a/contrib/woodpecker-test-repo/.woodpecker/test.yml b/contrib/woodpecker-test-repo/.woodpecker/test.yml index b8e568ecec..1f41cddc36 100644 --- a/contrib/woodpecker-test-repo/.woodpecker/test.yml +++ b/contrib/woodpecker-test-repo/.woodpecker/test.yml @@ -1,4 +1,3 @@ -version: 1 steps: test_1: image: 'alpine' diff --git a/pipeline/frontend/yaml/linter/linter_test.go b/pipeline/frontend/yaml/linter/linter_test.go index e658d937f7..580825c5a4 100644 --- a/pipeline/frontend/yaml/linter/linter_test.go +++ b/pipeline/frontend/yaml/linter/linter_test.go @@ -27,7 +27,6 @@ import ( func TestLint(t *testing.T) { testdatas := []struct{ Title, Data string }{{ Title: "map", Data: ` -version: 1 steps: build: image: docker @@ -47,7 +46,6 @@ services: `, }, { Title: "list", Data: ` -version: 1 steps: - name: build image: docker @@ -67,7 +65,6 @@ services: `, }, { Title: "merge maps", Data: ` -version: 1 variables: step_template: &base-step image: golang:1.19 @@ -162,7 +159,7 @@ func TestLintErrors(t *testing.T) { } for _, test := range testdata { - conf, err := yaml.ParseString("version: 1\n" + test.from) + conf, err := yaml.ParseString(test.from) if err != nil { t.Fatalf("Cannot unmarshal yaml %q. Error: %s", test.from, err) } diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches-array.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches-array.yml index 32db454dec..d530db0550 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches-array.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches-array.yml @@ -1,5 +1,3 @@ -version: 1 - branches: [main, pages] steps: diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches-exclude-include.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches-exclude-include.yml index 142788702a..03b534d235 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches-exclude-include.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches-exclude-include.yml @@ -1,5 +1,3 @@ -version: 1 - branches: include: main exclude: [develop, feature/*] diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches.yml index 38122b5132..75b72bbcf5 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-branches.yml @@ -1,5 +1,3 @@ -version: 1 - branches: main steps: diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-broken.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-broken.yml index f716f520a2..17d7218655 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-broken.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-broken.yml @@ -1,5 +1,3 @@ -version: 1 - branches: main matri: diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-clone-skip.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-clone-skip.yml index 2c0ce1dc28..50c20409c1 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-clone-skip.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-clone-skip.yml @@ -1,5 +1,3 @@ -version: 1 - steps: test: image: alpine diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-clone.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-clone.yml index 95c6d30503..81ef330c67 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-clone.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-clone.yml @@ -1,5 +1,3 @@ -version: 1 - clone: git: image: plugins/git:next diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-labels.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-labels.yml index ea441f5019..a8b7933677 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-labels.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-labels.yml @@ -1,5 +1,3 @@ -version: 1 - labels: location: europe weather: sun diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-matrix.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-matrix.yml index ff15e65a31..449ab7a57f 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-matrix.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-matrix.yml @@ -1,5 +1,3 @@ -version: 1 - steps: test: image: golang:${GO_VERSION} diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-merge-map-and-sequence.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-merge-map-and-sequence.yml index 673db526bf..acd24e0f34 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-merge-map-and-sequence.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-merge-map-and-sequence.yml @@ -1,5 +1,3 @@ -version: 1 - variables: step_template: &base-step image: golang:1.19 diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-multi.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-multi.yml index 5f1e491f35..e5d4fda797 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-multi.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-multi.yml @@ -1,5 +1,3 @@ -version: 1 - steps: deploy: image: golang diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-pipeline-when.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-pipeline-when.yml index ff0af601fc..84f02b403a 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-pipeline-when.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-pipeline-when.yml @@ -1,5 +1,3 @@ -version: 1 - when: - branch: [main, deploy] event: push diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-platform.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-platform.yml index b3da75a961..7b4abf027f 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-platform.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-platform.yml @@ -1,5 +1,3 @@ -version: 1 - platform: linux/amd64 steps: diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-plugin.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-plugin.yml index 6c0bfdbc1d..db85967b28 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-plugin.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-plugin.yml @@ -1,5 +1,3 @@ -version: 1 - steps: build: image: golang diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-run-on.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-run-on.yml index b6039bbe6b..fc6d53dc2e 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-run-on.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-run-on.yml @@ -1,5 +1,3 @@ -version: 1 - steps: build: image: golang diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-service.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-service.yml index 98dce9f534..03564e9fca 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-service.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-service.yml @@ -1,5 +1,3 @@ -version: 1 - steps: build: image: golang diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-step.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-step.yml index 2f0d0f6d88..1a8f33911a 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-step.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-step.yml @@ -1,5 +1,3 @@ -version: 1 - steps: image: image: golang diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-when.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-when.yml index fa40d04d23..721c92bf8c 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-when.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-when.yml @@ -1,5 +1,3 @@ -version: 1 - steps: when-branch: image: alpine diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-workspace.yml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-workspace.yml index 3ac5202e0f..5ee7ae988d 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-workspace.yml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-workspace.yml @@ -1,5 +1,3 @@ -version: 1 - workspace: base: /go path: src/github.com/octocat/hello-world diff --git a/pipeline/frontend/yaml/linter/schema/schema.json b/pipeline/frontend/yaml/linter/schema/schema.json index d1b9d97add..aa26dd69b7 100644 --- a/pipeline/frontend/yaml/linter/schema/schema.json +++ b/pipeline/frontend/yaml/linter/schema/schema.json @@ -14,118 +14,42 @@ "variables": { "description": "Use yaml aliases to define variables. Read more: https://woodpecker-ci.org/docs/usage/advanced-yaml-syntax" }, - "clone": { - "$ref": "#/definitions/clone" - }, - "skip_clone": { - "type": "boolean" - }, - "branches": { - "$ref": "#/definitions/branches" - }, - "when": { - "$ref": "#/definitions/pipeline_when" - }, - "steps": { - "$ref": "#/definitions/step_list" - }, - "pipeline": { - "$ref": "#/definitions/step_list", - "description": "deprecated, use steps" - }, - "services": { - "$ref": "#/definitions/services" - }, - "workspace": { - "$ref": "#/definitions/workspace" - }, - "matrix": { - "$ref": "#/definitions/matrix" - }, - "platform": { - "$ref": "#/definitions/platform" - }, - "labels": { - "$ref": "#/definitions/labels" - }, + "clone": { "$ref": "#/definitions/clone" }, + "skip_clone": { "type": "boolean" }, + "branches": { "$ref": "#/definitions/branches" }, + "when": { "$ref": "#/definitions/pipeline_when" }, + "steps": { "$ref": "#/definitions/step_list" }, + "pipeline": { "$ref": "#/definitions/step_list", "description": "deprecated, use steps" }, + "services": { "$ref": "#/definitions/services" }, + "workspace": { "$ref": "#/definitions/workspace" }, + "matrix": { "$ref": "#/definitions/matrix" }, + "platform": { "$ref": "#/definitions/platform" }, + "labels": { "$ref": "#/definitions/labels" }, "depends_on": { "type": "array", "minLength": 1, - "items": { - "type": "string" - } + "items": { "type": "string" } }, "runs_on": { "type": "array", "minLength": 1, - "items": { - "type": "string" - } - }, - "version": { - "type": "number", - "default": 1 + "items": { "type": "string" } } }, "definitions": { "clone": { "description": "Configures the clone step. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#clone", - "oneOf": [ - { + "type": "object", + "additionalProperties": false, + "properties": { + "git": { "type": "object", - "additionalProperties": false, "properties": { - "git": { - "type": "object", - "properties": { - "image": { - "$ref": "#/definitions/step_image" - }, - "settings": { - "$ref": "#/definitions/clone_settings" - } - } + "image": { + "type": "string" } } - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/step" - }, - "minLength": 1 } - ] - }, - "clone_settings": { - "description": "Change the settings of your clone plugin. Read more: https://woodpecker-ci.org/plugins/Git%20Clone", - "type": "object", - "properties": { - "depth": { - "type": "number", - "description": "If specified, uses git's --depth option to create a shallow clone with a limited number of commits, overwritten by partial" - }, - "recursive": { - "type": "boolean", - "default": false, - "description": "Clones submodules recursively" - }, - "partial": { - "type": "boolean", - "description": "Only fetch the one commit and it's blob objects to resolve all files, overwrite depth with 1" - }, - "lfs": { - "type": "boolean", - "default": true, - "description": "Set this to false to disable retrieval of LFS files" - }, - "tags": { - "type": "boolean", - "description": "Fetches tags when set to true, default is false if event is not tag else true" - } - }, - "additionalProperties": { - "type": ["boolean", "string", "number", "array", "object"] } }, "branches": { @@ -149,28 +73,20 @@ "oneOf": [ { "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "minLength": 1 }, - { - "type": "string" - } + { "type": "string" } ] }, "include": { "oneOf": [ { "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "minLength": 1 }, - { - "type": "string" - } + { "type": "string" } ] } } @@ -180,20 +96,8 @@ "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 - } + { "type": "object", "additionalProperties": { "$ref": "#/definitions/step" }, "minProperties": 1 }, + { "type": "array", "items": { "$ref": "#/definitions/step" }, "minLength": 1 } ] }, "pipeline_when": { @@ -202,9 +106,7 @@ { "type": "array", "minLength": 1, - "items": { - "$ref": "#/definitions/pipeline_when_condition" - } + "items": { "$ref": "#/definitions/pipeline_when_condition" } }, { "$ref": "#/definitions/pipeline_when_condition" @@ -230,9 +132,7 @@ { "type": "array", "minLength": 1, - "items": { - "$ref": "#/definitions/event_enum" - } + "items": { "$ref": "#/definitions/event_enum" } }, { "$ref": "#/definitions/event_enum" @@ -262,9 +162,7 @@ "path": { "description": "Execute a step only on commit with certain files added/removed/modified. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#path", "oneOf": [ - { - "type": "string" - }, + { "type": "string" }, { "type": "array", "items": { @@ -313,9 +211,6 @@ "image": { "$ref": "#/definitions/step_image" }, - "privileged": { - "$ref": "#/definitions/step_privileged" - }, "pull": { "$ref": "#/definitions/step_pull" }, @@ -344,12 +239,6 @@ "description": "Execute multiple steps with the same group key in parallel. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#step-group---parallel-execution", "type": "string" }, - "depends_on": { - "description": "Execute a step after another step has finished.", - "type": "array", - "items": { "type": "string" }, - "minLength": 1 - }, "detach": { "description": "Detach a step to run in background until pipeline finishes. Read more: https://woodpecker-ci.org/docs/usage/services#detachment", "type": "boolean" @@ -371,9 +260,7 @@ { "type": "array", "minLength": 1, - "items": { - "$ref": "#/definitions/step_when_condition" - } + "items": { "$ref": "#/definitions/step_when_condition" } }, { "$ref": "#/definitions/step_when_condition" @@ -394,13 +281,12 @@ }, "event": { "description": "Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#event", + "default": ["push", "pull_request", "tag", "deployment"], "oneOf": [ { "type": "array", "minLength": 1, - "items": { - "$ref": "#/definitions/event_enum" - } + "items": { "$ref": "#/definitions/event_enum" } }, { "$ref": "#/definitions/event_enum" @@ -421,10 +307,7 @@ { "type": "array", "minLength": 1, - "items": { - "type": "string", - "enum": ["success", "failure"] - } + "items": { "type": "string", "enum": ["success", "failure"] } }, { "type": "string", @@ -454,9 +337,7 @@ "path": { "description": "Execute a step only on commit with certain files added/removed/modified. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#path", "oneOf": [ - { - "type": "string" - }, + { "type": "string" }, { "type": "array", "items": { @@ -493,7 +374,7 @@ } }, "event_enum": { - "enum": ["push", "pull_request", "pull_request_closed", "tag", "deployment", "cron", "manual"] + "enum": ["push", "pull_request", "tag", "deployment", "cron", "manual"] }, "constraint_list": { "oneOf": [ @@ -503,9 +384,7 @@ { "type": "array", "minLength": 1, - "items": { - "type": "string" - } + "items": { "type": "string" } }, { "type": "object", @@ -519,9 +398,7 @@ { "type": "array", "minLength": 1, - "items": { - "type": "string" - } + "items": { "type": "string" } } ] }, @@ -533,9 +410,7 @@ { "type": "array", "minLength": 1, - "items": { - "type": "string" - } + "items": { "type": "string" } } ] } @@ -547,11 +422,6 @@ "description": "Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#image", "type": "string" }, - "step_privileged": { - "description": "Run the step in privileged mode. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#privileged", - "type": "boolean", - "default": false - }, "step_pull": { "description": "Always pull the latest image on pipeline execution Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#image", "type": "boolean" @@ -561,14 +431,10 @@ "oneOf": [ { "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "minLength": 1 }, - { - "type": "string" - } + { "type": "string" } ] }, "step_environment": { @@ -576,9 +442,7 @@ "oneOf": [ { "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "minLength": 1 }, { @@ -594,19 +458,13 @@ "type": "array", "items": { "oneOf": [ - { - "type": "string" - }, + { "type": "string" }, { "type": "object", "required": ["source", "target"], "properties": { - "source": { - "type": "string" - }, - "target": { - "type": "string" - } + "source": { "type": "string" }, + "target": { "type": "string" } } } ] @@ -623,9 +481,7 @@ "step_volumes": { "description": "Mount files or folders from the host machine into your step container. Read more: https://woodpecker-ci.org/docs/usage/volumes", "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "minLength": 1 }, "step_directory": { @@ -637,7 +493,7 @@ "type": "object", "properties": { "kubernetes": { - "$ref": "#/definitions/step_backend_kubernetes" + "$ref": "#/definitions/step_backend_kubernetes_resources" } } }, @@ -647,9 +503,6 @@ "properties": { "resources": { "$ref": "#/definitions/step_backend_kubernetes_resources" - }, - "securityContext": { - "$ref": "#/definitions/step_backend_kubernetes_security_context" } } }, @@ -665,27 +518,6 @@ } } }, - "step_backend_kubernetes_security_context": { - "description": "Pods / containers security context. Read more: https://woodpecker-ci.org/docs/administration/backends/kubernetes", - "type": "object", - "properties": { - "privileged": { - "type": "boolean" - }, - "runAsNonRoot": { - "type": "boolean" - }, - "runAsUser": { - "type": "number" - }, - "runAsGroup": { - "type": "number" - }, - "fsGroup": { - "type": "number" - } - } - }, "step_kubernetes_resources_object": { "description": "A list of kubernetes resource mappings", "type": "object", @@ -714,22 +546,9 @@ }, "services": { "description": "Read more: https://woodpecker-ci.org/docs/usage/services", - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/service" - }, - "minProperties": 1 - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/service" - }, - "minLength": 1 - } - ] + "type": "object", + "additionalProperties": { "$ref": "#/definitions/service" }, + "minProperties": 1 }, "service": { "description": "Read more: https://woodpecker-ci.org/docs/usage/services", @@ -738,16 +557,9 @@ "minProperties": 1, "required": ["image"], "properties": { - "name": { - "description": "The name of the service. Can be used if using the array style services list", - "type": "string" - }, "image": { "$ref": "#/definitions/step_image" }, - "privileged": { - "$ref": "#/definitions/step_privileged" - }, "pull": { "$ref": "#/definitions/step_pull" }, @@ -769,21 +581,11 @@ "volumes": { "$ref": "#/definitions/step_volumes" }, - "backend_options": { - "$ref": "#/definitions/step_backend_options" - }, "ports": { "description": "expose ports to which other steps can connect to", "type": "array", "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "oneOf": [{ "type": "number" }, { "type": "string" }] }, "minLength": 1 } diff --git a/pipeline/frontend/yaml/parse.go b/pipeline/frontend/yaml/parse.go index f919b58141..e14b1bd1a6 100644 --- a/pipeline/frontend/yaml/parse.go +++ b/pipeline/frontend/yaml/parse.go @@ -15,7 +15,6 @@ package yaml import ( - "errors" "fmt" "codeberg.org/6543/xyaml" @@ -23,27 +22,16 @@ import ( "go.woodpecker-ci.org/woodpecker/v2/pipeline/frontend/yaml/constraint" "go.woodpecker-ci.org/woodpecker/v2/pipeline/frontend/yaml/types" "go.woodpecker-ci.org/woodpecker/v2/pipeline/frontend/yaml/types/base" - "go.woodpecker-ci.org/woodpecker/v2/shared/constant" ) -var ErrUnsuportedVersion = errors.New("unsuported pipeline config version detected") - // ParseBytes parses the configuration from bytes b. func ParseBytes(b []byte) (*types.Workflow, error) { - yamlVersion, err := checkVersion(b) - if err != nil { - return nil, err - } - out := new(types.Workflow) - err = xyaml.Unmarshal(b, out) + err := xyaml.Unmarshal(b, out) if err != nil { return nil, err } - // make sure detected version is set - out.Version = yamlVersion - // support deprecated branch filter if out.BranchesDontUseIt != nil { if out.When.Constraints == nil { @@ -82,19 +70,3 @@ func ParseString(s string) (*types.Workflow, error) { []byte(s), ) } - -func checkVersion(b []byte) (int, error) { - ver := struct { - Version int `yaml:"version"` - }{} - _ = xyaml.Unmarshal(b, &ver) - if ver.Version == 0 { - // default: version 1 - return constant.DefaultPipelineVersion, nil - } - - if ver.Version != Version { - return 0, ErrUnsuportedVersion - } - return ver.Version, nil -} diff --git a/pipeline/frontend/yaml/parse_test.go b/pipeline/frontend/yaml/parse_test.go index 904d599553..bfecc9e165 100644 --- a/pipeline/frontend/yaml/parse_test.go +++ b/pipeline/frontend/yaml/parse_test.go @@ -88,16 +88,6 @@ func TestParse(t *testing.T) { g.Assert(out.Steps.ContainerList[1].When.Constraints[0].Event.Include).Equal([]string{"success"}) }) - g.It("Should unmarshal with default version", func() { - out, err := ParseString(sampleYamlDefaultVersion) - if err != nil { - g.Fail(err) - } - g.Assert(len(out.Steps.ContainerList)).Equal(1) - g.Assert(out.Steps.ContainerList[0].Name).Equal("notify_success") - g.Assert(out.Steps.ContainerList[0].Image).Equal("xyz") - }) - matchConfig, err := ParseString(sampleYaml) if err != nil { g.Fail(err) @@ -190,7 +180,6 @@ pipeline: } var sampleYaml = ` -version: 1 image: hello-world when: - event: @@ -242,14 +231,7 @@ runs_on: - failure ` -var sampleYamlDefaultVersion = ` -steps: - - name: notify_success - image: xyz -` - var simpleYamlAnchors = ` -version: 1 vars: image: &image plugins/slack steps: @@ -258,7 +240,6 @@ steps: ` var sampleVarYaml = ` -version: 1 _slack: &SLACK image: plugins/slack steps: diff --git a/pipeline/frontend/yaml/types/workflow.go b/pipeline/frontend/yaml/types/workflow.go index f482fba377..1d7621d0da 100644 --- a/pipeline/frontend/yaml/types/workflow.go +++ b/pipeline/frontend/yaml/types/workflow.go @@ -31,7 +31,6 @@ type ( DependsOn []string `yaml:"depends_on,omitempty"` RunsOn []string `yaml:"runs_on,omitempty"` SkipClone bool `yaml:"skip_clone"` - Version int `yaml:"version"` // Undocumented Cache base.StringOrSlice `yaml:"cache,omitempty"` diff --git a/pipeline/frontend/yaml/version.go b/pipeline/frontend/yaml/version.go deleted file mode 100644 index e48311388a..0000000000 --- a/pipeline/frontend/yaml/version.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2023 Woodpecker Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package yaml - -// Version of this package and it's subpackages -const Version = 1 diff --git a/pipeline/stepBuilder_test.go b/pipeline/stepBuilder_test.go index f9d04681d3..f1d0ea2ffc 100644 --- a/pipeline/stepBuilder_test.go +++ b/pipeline/stepBuilder_test.go @@ -47,7 +47,6 @@ func TestGlobalEnvsubst(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -version: 1 steps: build: image: ${IMAGE} @@ -84,7 +83,6 @@ func TestMissingGlobalEnvsubst(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -version: 1 steps: build: image: ${IMAGE} @@ -118,7 +116,6 @@ bbb`, Host: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -version: 1 steps: xxx: image: scratch @@ -126,7 +123,6 @@ steps: yyy: ${CI_COMMIT_MESSAGE} `)}, {Data: []byte(` -version: 1 steps: build: image: scratch @@ -157,13 +153,11 @@ func TestMultiPipeline(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -version: 1 steps: xxx: image: scratch `)}, {Data: []byte(` -version: 1 steps: build: image: scratch @@ -194,19 +188,16 @@ func TestDependsOn(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Name: "lint", Data: []byte(` -version: 1 steps: build: image: scratch `)}, {Name: "test", Data: []byte(` -version: 1 steps: build: image: scratch `)}, {Data: []byte(` -version: 1 steps: deploy: image: scratch @@ -244,7 +235,6 @@ func TestRunsOn(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -version: 1 steps: deploy: image: scratch @@ -282,13 +272,11 @@ func TestPipelineName(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Name: ".woodpecker/lint.yml", Data: []byte(` -version: 1 steps: build: image: scratch `)}, {Name: ".woodpecker/.test.yml", Data: []byte(` -version: 1 steps: build: image: scratch @@ -320,14 +308,12 @@ func TestBranchFilter(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -version: 1 steps: xxx: image: scratch branches: main `)}, {Data: []byte(` -version: 1 steps: build: image: scratch @@ -361,7 +347,6 @@ func TestRootWhenFilter(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -version: 1 when: event: - tag @@ -370,7 +355,6 @@ steps: image: scratch `)}, {Data: []byte(` -version: 1 when: event: - push @@ -379,7 +363,6 @@ steps: image: scratch `)}, {Data: []byte(` -version: 1 steps: build: image: scratch @@ -413,7 +396,6 @@ func TestZeroSteps(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Data: []byte(` -version: 1 skip_clone: true steps: build: @@ -449,7 +431,6 @@ func TestZeroStepsAsMultiPipelineDeps(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Name: "zerostep", Data: []byte(` -version: 1 skip_clone: true steps: build: @@ -458,13 +439,11 @@ steps: image: scratch `)}, {Name: "justastep", Data: []byte(` -version: 1 steps: build: image: scratch `)}, {Name: "shouldbefiltered", Data: []byte(` -version: 1 steps: build: image: scratch @@ -501,7 +480,6 @@ func TestZeroStepsAsMultiPipelineTransitiveDeps(t *testing.T) { Host: "", Yamls: []*forge_types.FileMeta{ {Name: "zerostep", Data: []byte(` -version: 1 skip_clone: true steps: build: @@ -510,20 +488,17 @@ steps: image: scratch `)}, {Name: "justastep", Data: []byte(` -version: 1 steps: build: image: scratch `)}, {Name: "shouldbefiltered", Data: []byte(` -version: 1 steps: build: image: scratch depends_on: [ zerostep ] `)}, {Name: "shouldbefilteredtoo", Data: []byte(` -version: 1 steps: build: image: scratch diff --git a/shared/constant/constant.go b/shared/constant/constant.go index 78459d9339..723443df24 100644 --- a/shared/constant/constant.go +++ b/shared/constant/constant.go @@ -40,5 +40,3 @@ var TrustedCloneImages = []string{ DefaultCloneImage, "quay.io/woodpeckerci/plugin-git", } - -const DefaultPipelineVersion = 1 From 8d007fe43c8181d62c2201f31e46e7d3bd6c0f62 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Thu, 28 Dec 2023 12:34:25 +0100 Subject: [PATCH 2/2] Update schema.json --- .../frontend/yaml/linter/schema/schema.json | 296 +++++++++++++++--- 1 file changed, 247 insertions(+), 49 deletions(-) diff --git a/pipeline/frontend/yaml/linter/schema/schema.json b/pipeline/frontend/yaml/linter/schema/schema.json index aa26dd69b7..d1b9d97add 100644 --- a/pipeline/frontend/yaml/linter/schema/schema.json +++ b/pipeline/frontend/yaml/linter/schema/schema.json @@ -14,42 +14,118 @@ "variables": { "description": "Use yaml aliases to define variables. Read more: https://woodpecker-ci.org/docs/usage/advanced-yaml-syntax" }, - "clone": { "$ref": "#/definitions/clone" }, - "skip_clone": { "type": "boolean" }, - "branches": { "$ref": "#/definitions/branches" }, - "when": { "$ref": "#/definitions/pipeline_when" }, - "steps": { "$ref": "#/definitions/step_list" }, - "pipeline": { "$ref": "#/definitions/step_list", "description": "deprecated, use steps" }, - "services": { "$ref": "#/definitions/services" }, - "workspace": { "$ref": "#/definitions/workspace" }, - "matrix": { "$ref": "#/definitions/matrix" }, - "platform": { "$ref": "#/definitions/platform" }, - "labels": { "$ref": "#/definitions/labels" }, + "clone": { + "$ref": "#/definitions/clone" + }, + "skip_clone": { + "type": "boolean" + }, + "branches": { + "$ref": "#/definitions/branches" + }, + "when": { + "$ref": "#/definitions/pipeline_when" + }, + "steps": { + "$ref": "#/definitions/step_list" + }, + "pipeline": { + "$ref": "#/definitions/step_list", + "description": "deprecated, use steps" + }, + "services": { + "$ref": "#/definitions/services" + }, + "workspace": { + "$ref": "#/definitions/workspace" + }, + "matrix": { + "$ref": "#/definitions/matrix" + }, + "platform": { + "$ref": "#/definitions/platform" + }, + "labels": { + "$ref": "#/definitions/labels" + }, "depends_on": { "type": "array", "minLength": 1, - "items": { "type": "string" } + "items": { + "type": "string" + } }, "runs_on": { "type": "array", "minLength": 1, - "items": { "type": "string" } + "items": { + "type": "string" + } + }, + "version": { + "type": "number", + "default": 1 } }, "definitions": { "clone": { "description": "Configures the clone step. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#clone", - "type": "object", - "additionalProperties": false, - "properties": { - "git": { + "oneOf": [ + { "type": "object", + "additionalProperties": false, "properties": { - "image": { - "type": "string" + "git": { + "type": "object", + "properties": { + "image": { + "$ref": "#/definitions/step_image" + }, + "settings": { + "$ref": "#/definitions/clone_settings" + } + } } } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + }, + "minLength": 1 } + ] + }, + "clone_settings": { + "description": "Change the settings of your clone plugin. Read more: https://woodpecker-ci.org/plugins/Git%20Clone", + "type": "object", + "properties": { + "depth": { + "type": "number", + "description": "If specified, uses git's --depth option to create a shallow clone with a limited number of commits, overwritten by partial" + }, + "recursive": { + "type": "boolean", + "default": false, + "description": "Clones submodules recursively" + }, + "partial": { + "type": "boolean", + "description": "Only fetch the one commit and it's blob objects to resolve all files, overwrite depth with 1" + }, + "lfs": { + "type": "boolean", + "default": true, + "description": "Set this to false to disable retrieval of LFS files" + }, + "tags": { + "type": "boolean", + "description": "Fetches tags when set to true, default is false if event is not tag else true" + } + }, + "additionalProperties": { + "type": ["boolean", "string", "number", "array", "object"] } }, "branches": { @@ -73,20 +149,28 @@ "oneOf": [ { "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "minLength": 1 }, - { "type": "string" } + { + "type": "string" + } ] }, "include": { "oneOf": [ { "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "minLength": 1 }, - { "type": "string" } + { + "type": "string" + } ] } } @@ -96,8 +180,20 @@ "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 } + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/step" + }, + "minProperties": 1 + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + }, + "minLength": 1 + } ] }, "pipeline_when": { @@ -106,7 +202,9 @@ { "type": "array", "minLength": 1, - "items": { "$ref": "#/definitions/pipeline_when_condition" } + "items": { + "$ref": "#/definitions/pipeline_when_condition" + } }, { "$ref": "#/definitions/pipeline_when_condition" @@ -132,7 +230,9 @@ { "type": "array", "minLength": 1, - "items": { "$ref": "#/definitions/event_enum" } + "items": { + "$ref": "#/definitions/event_enum" + } }, { "$ref": "#/definitions/event_enum" @@ -162,7 +262,9 @@ "path": { "description": "Execute a step only on commit with certain files added/removed/modified. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#path", "oneOf": [ - { "type": "string" }, + { + "type": "string" + }, { "type": "array", "items": { @@ -211,6 +313,9 @@ "image": { "$ref": "#/definitions/step_image" }, + "privileged": { + "$ref": "#/definitions/step_privileged" + }, "pull": { "$ref": "#/definitions/step_pull" }, @@ -239,6 +344,12 @@ "description": "Execute multiple steps with the same group key in parallel. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#step-group---parallel-execution", "type": "string" }, + "depends_on": { + "description": "Execute a step after another step has finished.", + "type": "array", + "items": { "type": "string" }, + "minLength": 1 + }, "detach": { "description": "Detach a step to run in background until pipeline finishes. Read more: https://woodpecker-ci.org/docs/usage/services#detachment", "type": "boolean" @@ -260,7 +371,9 @@ { "type": "array", "minLength": 1, - "items": { "$ref": "#/definitions/step_when_condition" } + "items": { + "$ref": "#/definitions/step_when_condition" + } }, { "$ref": "#/definitions/step_when_condition" @@ -281,12 +394,13 @@ }, "event": { "description": "Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#event", - "default": ["push", "pull_request", "tag", "deployment"], "oneOf": [ { "type": "array", "minLength": 1, - "items": { "$ref": "#/definitions/event_enum" } + "items": { + "$ref": "#/definitions/event_enum" + } }, { "$ref": "#/definitions/event_enum" @@ -307,7 +421,10 @@ { "type": "array", "minLength": 1, - "items": { "type": "string", "enum": ["success", "failure"] } + "items": { + "type": "string", + "enum": ["success", "failure"] + } }, { "type": "string", @@ -337,7 +454,9 @@ "path": { "description": "Execute a step only on commit with certain files added/removed/modified. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#path", "oneOf": [ - { "type": "string" }, + { + "type": "string" + }, { "type": "array", "items": { @@ -374,7 +493,7 @@ } }, "event_enum": { - "enum": ["push", "pull_request", "tag", "deployment", "cron", "manual"] + "enum": ["push", "pull_request", "pull_request_closed", "tag", "deployment", "cron", "manual"] }, "constraint_list": { "oneOf": [ @@ -384,7 +503,9 @@ { "type": "array", "minLength": 1, - "items": { "type": "string" } + "items": { + "type": "string" + } }, { "type": "object", @@ -398,7 +519,9 @@ { "type": "array", "minLength": 1, - "items": { "type": "string" } + "items": { + "type": "string" + } } ] }, @@ -410,7 +533,9 @@ { "type": "array", "minLength": 1, - "items": { "type": "string" } + "items": { + "type": "string" + } } ] } @@ -422,6 +547,11 @@ "description": "Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#image", "type": "string" }, + "step_privileged": { + "description": "Run the step in privileged mode. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#privileged", + "type": "boolean", + "default": false + }, "step_pull": { "description": "Always pull the latest image on pipeline execution Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#image", "type": "boolean" @@ -431,10 +561,14 @@ "oneOf": [ { "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "minLength": 1 }, - { "type": "string" } + { + "type": "string" + } ] }, "step_environment": { @@ -442,7 +576,9 @@ "oneOf": [ { "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "minLength": 1 }, { @@ -458,13 +594,19 @@ "type": "array", "items": { "oneOf": [ - { "type": "string" }, + { + "type": "string" + }, { "type": "object", "required": ["source", "target"], "properties": { - "source": { "type": "string" }, - "target": { "type": "string" } + "source": { + "type": "string" + }, + "target": { + "type": "string" + } } } ] @@ -481,7 +623,9 @@ "step_volumes": { "description": "Mount files or folders from the host machine into your step container. Read more: https://woodpecker-ci.org/docs/usage/volumes", "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "minLength": 1 }, "step_directory": { @@ -493,7 +637,7 @@ "type": "object", "properties": { "kubernetes": { - "$ref": "#/definitions/step_backend_kubernetes_resources" + "$ref": "#/definitions/step_backend_kubernetes" } } }, @@ -503,6 +647,9 @@ "properties": { "resources": { "$ref": "#/definitions/step_backend_kubernetes_resources" + }, + "securityContext": { + "$ref": "#/definitions/step_backend_kubernetes_security_context" } } }, @@ -518,6 +665,27 @@ } } }, + "step_backend_kubernetes_security_context": { + "description": "Pods / containers security context. Read more: https://woodpecker-ci.org/docs/administration/backends/kubernetes", + "type": "object", + "properties": { + "privileged": { + "type": "boolean" + }, + "runAsNonRoot": { + "type": "boolean" + }, + "runAsUser": { + "type": "number" + }, + "runAsGroup": { + "type": "number" + }, + "fsGroup": { + "type": "number" + } + } + }, "step_kubernetes_resources_object": { "description": "A list of kubernetes resource mappings", "type": "object", @@ -546,9 +714,22 @@ }, "services": { "description": "Read more: https://woodpecker-ci.org/docs/usage/services", - "type": "object", - "additionalProperties": { "$ref": "#/definitions/service" }, - "minProperties": 1 + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/service" + }, + "minProperties": 1 + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/service" + }, + "minLength": 1 + } + ] }, "service": { "description": "Read more: https://woodpecker-ci.org/docs/usage/services", @@ -557,9 +738,16 @@ "minProperties": 1, "required": ["image"], "properties": { + "name": { + "description": "The name of the service. Can be used if using the array style services list", + "type": "string" + }, "image": { "$ref": "#/definitions/step_image" }, + "privileged": { + "$ref": "#/definitions/step_privileged" + }, "pull": { "$ref": "#/definitions/step_pull" }, @@ -581,11 +769,21 @@ "volumes": { "$ref": "#/definitions/step_volumes" }, + "backend_options": { + "$ref": "#/definitions/step_backend_options" + }, "ports": { "description": "expose ports to which other steps can connect to", "type": "array", "items": { - "oneOf": [{ "type": "number" }, { "type": "string" }] + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "minLength": 1 }