mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-25 11:21:02 +00:00
Remove workflow version again (#3052)
This commit is contained in:
parent
4bc2fed550
commit
7e2ea306c4
34 changed files with 2 additions and 150 deletions
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- test
|
- test
|
||||||
- web
|
- web
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: [pull_request, tag]
|
- event: [pull_request, tag]
|
||||||
- event: push
|
- event: push
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: tag
|
- event: tag
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
release-helper:
|
release-helper:
|
||||||
image: woodpeckerci/plugin-ready-release-go:1.0.3
|
image: woodpeckerci/plugin-ready-release-go:1.0.3
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: [pull_request, cron]
|
- event: [pull_request, cron]
|
||||||
- event: push
|
- event: push
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: [pull_request, tag]
|
- event: [pull_request, tag]
|
||||||
- event: push
|
- event: push
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: [pull_request, tag]
|
- event: [pull_request, tag]
|
||||||
- event: push
|
- event: push
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
demo:
|
demo:
|
||||||
image: 'alpine'
|
image: 'alpine'
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
test_1:
|
test_1:
|
||||||
image: 'alpine'
|
image: 'alpine'
|
||||||
|
|
|
@ -27,7 +27,6 @@ import (
|
||||||
func TestLint(t *testing.T) {
|
func TestLint(t *testing.T) {
|
||||||
testdatas := []struct{ Title, Data string }{{
|
testdatas := []struct{ Title, Data string }{{
|
||||||
Title: "map", Data: `
|
Title: "map", Data: `
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: docker
|
image: docker
|
||||||
|
@ -47,7 +46,6 @@ services:
|
||||||
`,
|
`,
|
||||||
}, {
|
}, {
|
||||||
Title: "list", Data: `
|
Title: "list", Data: `
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: docker
|
image: docker
|
||||||
|
@ -67,7 +65,6 @@ services:
|
||||||
`,
|
`,
|
||||||
}, {
|
}, {
|
||||||
Title: "merge maps", Data: `
|
Title: "merge maps", Data: `
|
||||||
version: 1
|
|
||||||
variables:
|
variables:
|
||||||
step_template: &base-step
|
step_template: &base-step
|
||||||
image: golang:1.19
|
image: golang:1.19
|
||||||
|
@ -162,7 +159,7 @@ func TestLintErrors(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range testdata {
|
for _, test := range testdata {
|
||||||
conf, err := yaml.ParseString("version: 1\n" + test.from)
|
conf, err := yaml.ParseString(test.from)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Cannot unmarshal yaml %q. Error: %s", test.from, err)
|
t.Fatalf("Cannot unmarshal yaml %q. Error: %s", test.from, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
branches: [main, pages]
|
branches: [main, pages]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
include: main
|
include: main
|
||||||
exclude: [develop, feature/*]
|
exclude: [develop, feature/*]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
branches: main
|
branches: main
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
branches: main
|
branches: main
|
||||||
|
|
||||||
matri:
|
matri:
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
test:
|
test:
|
||||||
image: alpine
|
image: alpine
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
git:
|
git:
|
||||||
image: plugins/git:next
|
image: plugins/git:next
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
location: europe
|
location: europe
|
||||||
weather: sun
|
weather: sun
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
test:
|
test:
|
||||||
image: golang:${GO_VERSION}
|
image: golang:${GO_VERSION}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
step_template: &base-step
|
step_template: &base-step
|
||||||
image: golang:1.19
|
image: golang:1.19
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
deploy:
|
deploy:
|
||||||
image: golang
|
image: golang
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- branch: [main, deploy]
|
- branch: [main, deploy]
|
||||||
event: push
|
event: push
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: golang
|
image: golang
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: golang
|
image: golang
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: golang
|
image: golang
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
image:
|
image:
|
||||||
image: golang
|
image: golang
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
when-branch:
|
when-branch:
|
||||||
image: alpine
|
image: alpine
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: 1
|
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
base: /go
|
base: /go
|
||||||
path: src/github.com/octocat/hello-world
|
path: src/github.com/octocat/hello-world
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package yaml
|
package yaml
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"codeberg.org/6543/xyaml"
|
"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/constraint"
|
||||||
"go.woodpecker-ci.org/woodpecker/v2/pipeline/frontend/yaml/types"
|
"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/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.
|
// ParseBytes parses the configuration from bytes b.
|
||||||
func ParseBytes(b []byte) (*types.Workflow, error) {
|
func ParseBytes(b []byte) (*types.Workflow, error) {
|
||||||
yamlVersion, err := checkVersion(b)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
out := new(types.Workflow)
|
out := new(types.Workflow)
|
||||||
err = xyaml.Unmarshal(b, out)
|
err := xyaml.Unmarshal(b, out)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// make sure detected version is set
|
|
||||||
out.Version = yamlVersion
|
|
||||||
|
|
||||||
// support deprecated branch filter
|
// support deprecated branch filter
|
||||||
if out.BranchesDontUseIt != nil {
|
if out.BranchesDontUseIt != nil {
|
||||||
if out.When.Constraints == nil {
|
if out.When.Constraints == nil {
|
||||||
|
@ -82,19 +70,3 @@ func ParseString(s string) (*types.Workflow, error) {
|
||||||
[]byte(s),
|
[]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
|
|
||||||
}
|
|
||||||
|
|
|
@ -88,16 +88,6 @@ func TestParse(t *testing.T) {
|
||||||
g.Assert(out.Steps.ContainerList[1].When.Constraints[0].Event.Include).Equal([]string{"success"})
|
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)
|
matchConfig, err := ParseString(sampleYaml)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
g.Fail(err)
|
g.Fail(err)
|
||||||
|
@ -190,7 +180,6 @@ pipeline:
|
||||||
}
|
}
|
||||||
|
|
||||||
var sampleYaml = `
|
var sampleYaml = `
|
||||||
version: 1
|
|
||||||
image: hello-world
|
image: hello-world
|
||||||
when:
|
when:
|
||||||
- event:
|
- event:
|
||||||
|
@ -242,14 +231,7 @@ runs_on:
|
||||||
- failure
|
- failure
|
||||||
`
|
`
|
||||||
|
|
||||||
var sampleYamlDefaultVersion = `
|
|
||||||
steps:
|
|
||||||
- name: notify_success
|
|
||||||
image: xyz
|
|
||||||
`
|
|
||||||
|
|
||||||
var simpleYamlAnchors = `
|
var simpleYamlAnchors = `
|
||||||
version: 1
|
|
||||||
vars:
|
vars:
|
||||||
image: &image plugins/slack
|
image: &image plugins/slack
|
||||||
steps:
|
steps:
|
||||||
|
@ -258,7 +240,6 @@ steps:
|
||||||
`
|
`
|
||||||
|
|
||||||
var sampleVarYaml = `
|
var sampleVarYaml = `
|
||||||
version: 1
|
|
||||||
_slack: &SLACK
|
_slack: &SLACK
|
||||||
image: plugins/slack
|
image: plugins/slack
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -31,7 +31,6 @@ type (
|
||||||
DependsOn []string `yaml:"depends_on,omitempty"`
|
DependsOn []string `yaml:"depends_on,omitempty"`
|
||||||
RunsOn []string `yaml:"runs_on,omitempty"`
|
RunsOn []string `yaml:"runs_on,omitempty"`
|
||||||
SkipClone bool `yaml:"skip_clone"`
|
SkipClone bool `yaml:"skip_clone"`
|
||||||
Version int `yaml:"version"`
|
|
||||||
|
|
||||||
// Undocumented
|
// Undocumented
|
||||||
Cache base.StringOrSlice `yaml:"cache,omitempty"`
|
Cache base.StringOrSlice `yaml:"cache,omitempty"`
|
||||||
|
|
|
@ -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
|
|
|
@ -47,7 +47,6 @@ func TestGlobalEnvsubst(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: ${IMAGE}
|
image: ${IMAGE}
|
||||||
|
@ -84,7 +83,6 @@ func TestMissingGlobalEnvsubst(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: ${IMAGE}
|
image: ${IMAGE}
|
||||||
|
@ -118,7 +116,6 @@ bbb`,
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
xxx:
|
xxx:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
@ -126,7 +123,6 @@ steps:
|
||||||
yyy: ${CI_COMMIT_MESSAGE}
|
yyy: ${CI_COMMIT_MESSAGE}
|
||||||
`)},
|
`)},
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
@ -157,13 +153,11 @@ func TestMultiPipeline(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
xxx:
|
xxx:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
@ -194,19 +188,16 @@ func TestDependsOn(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Name: "lint", Data: []byte(`
|
{Name: "lint", Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Name: "test", Data: []byte(`
|
{Name: "test", Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
deploy:
|
deploy:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
@ -244,7 +235,6 @@ func TestRunsOn(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
deploy:
|
deploy:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
@ -282,13 +272,11 @@ func TestPipelineName(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Name: ".woodpecker/lint.yml", Data: []byte(`
|
{Name: ".woodpecker/lint.yml", Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Name: ".woodpecker/.test.yml", Data: []byte(`
|
{Name: ".woodpecker/.test.yml", Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
@ -320,14 +308,12 @@ func TestBranchFilter(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
xxx:
|
xxx:
|
||||||
image: scratch
|
image: scratch
|
||||||
branches: main
|
branches: main
|
||||||
`)},
|
`)},
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
@ -361,7 +347,6 @@ func TestRootWhenFilter(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
@ -370,7 +355,6 @@ steps:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
@ -379,7 +363,6 @@ steps:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
@ -413,7 +396,6 @@ func TestZeroSteps(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Data: []byte(`
|
{Data: []byte(`
|
||||||
version: 1
|
|
||||||
skip_clone: true
|
skip_clone: true
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
|
@ -449,7 +431,6 @@ func TestZeroStepsAsMultiPipelineDeps(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Name: "zerostep", Data: []byte(`
|
{Name: "zerostep", Data: []byte(`
|
||||||
version: 1
|
|
||||||
skip_clone: true
|
skip_clone: true
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
|
@ -458,13 +439,11 @@ steps:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Name: "justastep", Data: []byte(`
|
{Name: "justastep", Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Name: "shouldbefiltered", Data: []byte(`
|
{Name: "shouldbefiltered", Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
@ -501,7 +480,6 @@ func TestZeroStepsAsMultiPipelineTransitiveDeps(t *testing.T) {
|
||||||
Host: "",
|
Host: "",
|
||||||
Yamls: []*forge_types.FileMeta{
|
Yamls: []*forge_types.FileMeta{
|
||||||
{Name: "zerostep", Data: []byte(`
|
{Name: "zerostep", Data: []byte(`
|
||||||
version: 1
|
|
||||||
skip_clone: true
|
skip_clone: true
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
|
@ -510,20 +488,17 @@ steps:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Name: "justastep", Data: []byte(`
|
{Name: "justastep", Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
`)},
|
`)},
|
||||||
{Name: "shouldbefiltered", Data: []byte(`
|
{Name: "shouldbefiltered", Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
depends_on: [ zerostep ]
|
depends_on: [ zerostep ]
|
||||||
`)},
|
`)},
|
||||||
{Name: "shouldbefilteredtoo", Data: []byte(`
|
{Name: "shouldbefilteredtoo", Data: []byte(`
|
||||||
version: 1
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: scratch
|
image: scratch
|
||||||
|
|
|
@ -40,5 +40,3 @@ var TrustedCloneImages = []string{
|
||||||
DefaultCloneImage,
|
DefaultCloneImage,
|
||||||
"quay.io/woodpeckerci/plugin-git",
|
"quay.io/woodpeckerci/plugin-git",
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultPipelineVersion = 1
|
|
||||||
|
|
Loading…
Reference in a new issue