mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 10:07:21 +02:00
Reconstructed the previously vendored and patched yaml.v2
This commit is contained in:
parent
cfbbaee1ed
commit
59d854e3d8
@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
|
||||
json "github.com/ghodss/yaml"
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
// paramsToEnv uses reflection to convert a map[string]interface to a list
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
|
||||
libcompose "github.com/docker/libcompose/yaml"
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@ -44,19 +44,20 @@ func TestParse(t *testing.T) {
|
||||
g.Assert(out.RunsOn[1]).Equal("failure")
|
||||
g.Assert(out.SkipClone).Equal(false)
|
||||
})
|
||||
|
||||
// Check to make sure variable expansion works in yaml.MapSlice
|
||||
// g.It("Should unmarshal variables", func() {
|
||||
// out, err := ParseString(sampleVarYaml)
|
||||
// if err != nil {
|
||||
// g.Fail(err)
|
||||
// }
|
||||
// g.Assert(out.Pipeline[0].Name).Equal("notify_fail")
|
||||
// g.Assert(out.Pipeline[0].Image).Equal("plugins/slack")
|
||||
// g.Assert(len(out.Pipeline[0].Constraints.Event.Include)).Equal(0)
|
||||
// g.Assert(out.Pipeline[1].Name).Equal("notify_success")
|
||||
// g.Assert(out.Pipeline[1].Image).Equal("plugins/slack")
|
||||
// g.Assert(out.Pipeline[1].Constraints.Event.Include).Equal([]string{"success"})
|
||||
// })
|
||||
g.It("Should unmarshal variables", func() {
|
||||
out, err := ParseString(sampleVarYaml)
|
||||
if err != nil {
|
||||
g.Fail(err)
|
||||
}
|
||||
g.Assert(out.Pipeline.Containers[0].Name).Equal("notify_fail")
|
||||
g.Assert(out.Pipeline.Containers[0].Image).Equal("plugins/slack")
|
||||
g.Assert(len(out.Pipeline.Containers[0].Constraints.Event.Include)).Equal(0)
|
||||
g.Assert(out.Pipeline.Containers[1].Name).Equal("notify_success")
|
||||
g.Assert(out.Pipeline.Containers[1].Image).Equal("plugins/slack")
|
||||
g.Assert(out.Pipeline.Containers[1].Constraints.Event.Include).Equal([]string{"success"})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/laszlocph/woodpecker/cncd/pipeline/pipeline/frontend"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
func TestConstraint(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
libcompose "github.com/docker/libcompose/yaml"
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
libcompose "github.com/docker/libcompose/yaml"
|
||||
"github.com/kr/pretty"
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
var containerYaml = []byte(`
|
||||
|
@ -3,7 +3,7 @@ package matrix
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -3,7 +3,7 @@ package yaml
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/kr/pretty"
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
func TestUnmarshalNetwork(t *testing.T) {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/kr/pretty"
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
func TestUnmarshalSecrets(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/franela/goblin"
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
func TestBoolTrue(t *testing.T) {
|
||||
|
@ -3,7 +3,7 @@ package yaml
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/kr/pretty"
|
||||
"gopkg.in/yaml.v2"
|
||||
"github.com/laszlocph/yaml"
|
||||
)
|
||||
|
||||
func TestUnmarshalVolume(t *testing.T) {
|
||||
|
2
go.mod
2
go.mod
@ -34,6 +34,7 @@ require (
|
||||
github.com/joho/godotenv v0.0.0-20150907010228-4ed13390c0ac
|
||||
github.com/kr/pretty v0.0.0-20160708215748-737b74a46c4b
|
||||
github.com/kr/text v0.0.0-20160504234017-7cafcd837844 // indirect
|
||||
github.com/laszlocph/yaml v0.0.0-20191114195230-2ec4ce7a1d34
|
||||
github.com/lib/pq v0.0.0-20151015211310-83c4f410d0ae
|
||||
github.com/manucorporat/sse v0.0.0-20160126180136-ee05b128a739 // indirect
|
||||
github.com/mattn/go-sqlite3 v0.0.0-20170901084005-05548ff55570
|
||||
@ -58,5 +59,4 @@ require (
|
||||
google.golang.org/grpc v0.0.0-20170626232044-9cb02b885b41
|
||||
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
|
||||
gopkg.in/go-playground/validator.v8 v8.17.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.1
|
||||
)
|
||||
|
4
go.sum
4
go.sum
@ -36,8 +36,6 @@ github.com/drone/signal v0.0.0-20170915013802-ac5d07ef1315 h1:pNSCIqkfTtVWwSHCOz
|
||||
github.com/drone/signal v0.0.0-20170915013802-ac5d07ef1315/go.mod h1:S8t92eFT0g4WUgEc/LxG+LCuiskpMNsG0ajAMGnyZpc=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/franela/goblin v0.0.0-20160123211154-889391d73023 h1:FwwGiDaXOnnZRvmccly64PWGmOvBmmzKkHquNOMRd4I=
|
||||
github.com/franela/goblin v0.0.0-20160123211154-889391d73023/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
|
||||
github.com/franela/goblin v0.0.0-20181003173013-ead4ad1d2727 h1:eouy4stZdUKn7n98c1+rdUTxWMg+jvhP+oHt0K8fiug=
|
||||
github.com/franela/goblin v0.0.0-20181003173013-ead4ad1d2727/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
|
||||
github.com/ghodss/yaml v0.0.0-20161207003320-04f313413ffd h1:U3yHrYB7NWH2o3UFzJ1J+TknZqM9QQtF8KVIE6Qzrfs=
|
||||
@ -79,6 +77,8 @@ github.com/kr/pretty v0.0.0-20160708215748-737b74a46c4b h1:LJ9zj3Zit+pLjAQtA1gxl
|
||||
github.com/kr/pretty v0.0.0-20160708215748-737b74a46c4b/go.mod h1:Bvhd+E3laJ0AVkG0c9rmtZcnhV0HQ3+c3YxxqTvc/gA=
|
||||
github.com/kr/text v0.0.0-20160504234017-7cafcd837844 h1:kpzneEBeC0dMewP3gr/fADv1OlblH9r1goWVwpOt3TU=
|
||||
github.com/kr/text v0.0.0-20160504234017-7cafcd837844/go.mod h1:sjUstKUATFIcff4qlB53Kml0wQPtJVc/3fWrmuUmcfA=
|
||||
github.com/laszlocph/yaml v0.0.0-20191114195230-2ec4ce7a1d34 h1:+4tKButWtRq7Xw8EUpabOmZYAk2gtinHF585AmWu2Qk=
|
||||
github.com/laszlocph/yaml v0.0.0-20191114195230-2ec4ce7a1d34/go.mod h1:E1nYupUAMCOPyW4ZX78x63SP3/nKFQ5aj8tlwzMdYuo=
|
||||
github.com/lib/pq v0.0.0-20151015211310-83c4f410d0ae h1:rBqRT7VqVLePKGtyV6xDFLXeqD56CvZKEqI0XWzVTxM=
|
||||
github.com/lib/pq v0.0.0-20151015211310-83c4f410d0ae/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/manucorporat/sse v0.0.0-20160126180136-ee05b128a739 h1:ykXz+pRRTibcSjG1yRhpdSHInF8yZY/mfn+Rz2Nd1rE=
|
||||
|
Loading…
Reference in New Issue
Block a user