From a36d33e74cb5e2166acab1dc1f97ee3ac50e9529 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Thu, 1 Dec 2022 10:12:29 -0800 Subject: [PATCH 01/17] added factsUI and problemsUI to projectByName --- internal/lagoon/client/_lgraphql/projectByName.graphql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/lagoon/client/_lgraphql/projectByName.graphql b/internal/lagoon/client/_lgraphql/projectByName.graphql index ef4ba8da..37d317d3 100644 --- a/internal/lagoon/client/_lgraphql/projectByName.graphql +++ b/internal/lagoon/client/_lgraphql/projectByName.graphql @@ -14,6 +14,8 @@ query ( developmentEnvironmentsLimit gitUrl autoIdle + factsUi + problemsUi groups{ ... on Group { __typename From 129d6496861b86f86a8324a5619245c6dd940388 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Thu, 1 Dec 2022 13:00:10 -0800 Subject: [PATCH 02/17] added FactsUI and ProblemsUI to get project output --- pkg/api/types.go | 1 + pkg/graphql/main.go | 2 ++ pkg/lagoon/projects/main.go | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/api/types.go b/pkg/api/types.go index 12d5cb22..29070bfe 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -248,6 +248,7 @@ type Project struct { Deployments []Deployment `json:"deployments,omitempty"` Notifications []interface{} `json:"notifications,omitempty"` FactsUI *int `json:"factsUi,omitempty"` + ProblemsUI *int `json:"problemsUi,omitempty"` } // ProjectPatch struct. diff --git a/pkg/graphql/main.go b/pkg/graphql/main.go index 9f15cf9d..908d954b 100644 --- a/pkg/graphql/main.go +++ b/pkg/graphql/main.go @@ -50,6 +50,8 @@ var ProjectByNameFragment = `fragment Project on Project { routerPattern branches pullrequests + problemsUi + factsUi productionEnvironment environments { id diff --git a/pkg/lagoon/projects/main.go b/pkg/lagoon/projects/main.go index 16d7d2a0..d59f724d 100644 --- a/pkg/lagoon/projects/main.go +++ b/pkg/lagoon/projects/main.go @@ -138,7 +138,7 @@ func processProjectInfo(projectByName []byte) ([]byte, error) { var data []output.Data data = append(data, projectData) dataMain := output.Table{ - Header: []string{"ID", "ProjectName", "GitURL", "Branches", "PullRequests", "ProductionRoute", "DevEnvironments", "DevEnvLimit", "ProductionEnv", "RouterPattern", "AutoIdle"}, + Header: []string{"ID", "ProjectName", "GitURL", "Branches", "PullRequests", "ProductionRoute", "DevEnvironments", "DevEnvLimit", "ProductionEnv", "RouterPattern", "AutoIdle", "FactsUI", "ProblemsUI"}, Data: data, } return json.Marshal(dataMain) @@ -168,6 +168,8 @@ func processProjectExtra(project api.Project) []string { fmt.Sprintf("%v", project.ProductionEnvironment), fmt.Sprintf("%s", project.RouterPattern), fmt.Sprintf("%v", *project.AutoIdle), + fmt.Sprintf("%v", *project.FactsUI), + fmt.Sprintf("%v", *project.ProblemsUI), } return data } From c2ebc920b31e4ec2345ed60529939e0be7c01128 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Thu, 1 Dec 2022 13:27:50 -0800 Subject: [PATCH 03/17] run make gen --- go.mod | 5 +- go.sum | 23 ++ internal/lagoon/client/lgraphql/lgraphql.go | 338 +++++++++++--------- 3 files changed, 210 insertions(+), 156 deletions(-) diff --git a/go.mod b/go.mod index ac8d34ce..2727c9b7 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/Masterminds/semver v1.4.2 github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/golang/mock v1.4.0 + github.com/golang/mock v1.6.0 github.com/google/go-github v0.0.0-20180716180158-c0b63e2f9bb1 github.com/google/uuid v1.1.1 github.com/hashicorp/go-version v1.2.0 @@ -18,7 +18,7 @@ require ( github.com/spf13/cobra v0.0.5 github.com/spf13/pflag v1.0.3 github.com/stretchr/testify v1.2.2 - golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 + golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 gopkg.in/yaml.v2 v2.2.8 sigs.k8s.io/yaml v1.2.0 ) @@ -34,6 +34,7 @@ require ( golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 // indirect golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780 // indirect + rsc.io/quote/v3 v3.1.0 // indirect ) // use this version for fixes to formatting of end header diff --git a/go.sum b/go.sum index 8dde0886..7d385ae5 100644 --- a/go.sum +++ b/go.sum @@ -29,6 +29,8 @@ github.com/golang/lint v0.0.0-20181026193005-c67002cb31c3 h1:I4BOK3PBMjhWfQM2zPJ github.com/golang/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.4.0 h1:Rd1kQnQu0Hq3qvJppYSG0HtP+f5LPPUiDswTLiEegLg= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/google/go-github v0.0.0-20180716180158-c0b63e2f9bb1 h1:tV3a8xSFYfQgA9b54eOE0A6Db//aeD+SQWawHfhaoLs= github.com/google/go-github v0.0.0-20180716180158-c0b63e2f9bb1/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= @@ -102,28 +104,49 @@ github.com/tsenart/deadcode v0.0.0-20160724212837-210d2dc333e9 h1:vY5WqiEon0ZSTG github.com/tsenart/deadcode v0.0.0-20160724212837-210d2dc333e9/go.mod h1:q+QjxYvZ+fpjMXqs+XEriussHjSYqeXVnAdSV1tkMYk= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181122213734-04b5d21e00f1/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262 h1:qsl9y/CJx34tuA7QCPNp86JNJe4spst6Ff8MjvPUdPg= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.1 h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780 h1:CEBpW6C191eozfEuWdUmIAHn7lwlLxJ7HVdr2e2Tsrw= gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780/go.mod h1:3HH7i1SgMqlzxCcBmUHW657sD4Kvv9sC3HpL3YukzwA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/lagoon/client/lgraphql/lgraphql.go b/internal/lagoon/client/lgraphql/lgraphql.go index 228402fa..ced6f90f 100644 --- a/internal/lagoon/client/lgraphql/lgraphql.go +++ b/internal/lagoon/client/lgraphql/lgraphql.go @@ -1,49 +1,51 @@ -// Code generated for package lgraphql by go-bindata DO NOT EDIT. (@generated) +// Code generated by go-bindata. DO NOT EDIT. // sources: -// _lgraphql/addDeployTarget.graphql -// _lgraphql/addDeployTargetConfig.graphql -// _lgraphql/addEnvVariable.graphql -// _lgraphql/addGroup.graphql -// _lgraphql/addGroupsToProject.graphql -// _lgraphql/addNotificationEmail.graphql -// _lgraphql/addNotificationMicrosoftTeams.graphql -// _lgraphql/addNotificationRocketChat.graphql -// _lgraphql/addNotificationSlack.graphql -// _lgraphql/addNotificationToProject.graphql -// _lgraphql/addOrUpdateEnvironment.graphql -// _lgraphql/addProject.graphql -// _lgraphql/addRestore.graphql -// _lgraphql/addSshKey.graphql -// _lgraphql/addUser.graphql -// _lgraphql/addUserToGroup.graphql -// _lgraphql/backupsForEnvironmentByName.graphql -// _lgraphql/deleteDeployTarget.graphql -// _lgraphql/deleteDeployTargetConfig.graphql -// _lgraphql/deployEnvironmentBranch.graphql -// _lgraphql/deployEnvironmentLatest.graphql -// _lgraphql/deployEnvironmentPromote.graphql -// _lgraphql/deployEnvironmentPullrequest.graphql -// _lgraphql/deployTargetConfigsByProjectId.graphql -// _lgraphql/environmentByName.graphql -// _lgraphql/lagoonSchema.graphql -// _lgraphql/lagoonVersion.graphql -// _lgraphql/listDeployTargets.graphql -// _lgraphql/me.graphql -// _lgraphql/minimalProjectByName.graphql -// _lgraphql/projectByName.graphql -// _lgraphql/projectByNameMetadata.graphql -// _lgraphql/projectsByMetadata.graphql -// _lgraphql/removeProjectMetadataByKey.graphql -// _lgraphql/switchActiveStandby.graphql -// _lgraphql/taskByID.graphql -// _lgraphql/updateDeployTarget.graphql -// _lgraphql/updateDeployTargetConfig.graphql -// _lgraphql/updateProjectMetadata.graphql +// _lgraphql/addDeployTarget.graphql (869B) +// _lgraphql/addDeployTargetConfig.graphql (1.325kB) +// _lgraphql/addEnvVariable.graphql (292B) +// _lgraphql/addGroup.graphql (110B) +// _lgraphql/addGroupsToProject.graphql (184B) +// _lgraphql/addNotificationEmail.graphql (183B) +// _lgraphql/addNotificationMicrosoftTeams.graphql (177B) +// _lgraphql/addNotificationRocketChat.graphql (219B) +// _lgraphql/addNotificationSlack.graphql (214B) +// _lgraphql/addNotificationToProject.graphql (289B) +// _lgraphql/addOrUpdateEnvironment.graphql (566B) +// _lgraphql/addProject.graphql (802B) +// _lgraphql/addRestore.graphql (101B) +// _lgraphql/addSshKey.graphql (279B) +// _lgraphql/addUser.graphql (254B) +// _lgraphql/addUserToGroup.graphql (243B) +// _lgraphql/backupsForEnvironmentByName.graphql (403B) +// _lgraphql/deleteDeployTarget.graphql (102B) +// _lgraphql/deleteDeployTargetConfig.graphql (134B) +// _lgraphql/deployEnvironmentBranch.graphql (282B) +// _lgraphql/deployEnvironmentLatest.graphql (181B) +// _lgraphql/deployEnvironmentPromote.graphql (427B) +// _lgraphql/deployEnvironmentPullrequest.graphql (509B) +// _lgraphql/deployTargetConfigsByProjectId.graphql (253B) +// _lgraphql/environmentByName.graphql (306B) +// _lgraphql/lagoonSchema.graphql (126B) +// _lgraphql/lagoonVersion.graphql (25B) +// _lgraphql/listDeployTargets.graphql (231B) +// _lgraphql/me.graphql (232B) +// _lgraphql/minimalProjectByName.graphql (332B) +// _lgraphql/projectByName.graphql (1.779kB) +// _lgraphql/projectByNameMetadata.graphql (121B) +// _lgraphql/projectsByMetadata.graphql (486B) +// _lgraphql/removeProjectMetadataByKey.graphql (254B) +// _lgraphql/switchActiveStandby.graphql (198B) +// _lgraphql/taskByID.graphql (216B) +// _lgraphql/updateDeployTarget.graphql (944B) +// _lgraphql/updateDeployTargetConfig.graphql (661B) +// _lgraphql/updateProjectMetadata.graphql (337B) + package lgraphql import ( "bytes" "compress/gzip" + "crypto/sha256" "fmt" "io" "io/ioutil" @@ -56,7 +58,7 @@ import ( func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %w", name, err) } var buf bytes.Buffer @@ -64,7 +66,7 @@ func bindataRead(data []byte, name string) ([]byte, error) { clErr := gz.Close() if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %w", name, err) } if clErr != nil { return nil, err @@ -74,8 +76,9 @@ func bindataRead(data []byte, name string) ([]byte, error) { } type asset struct { - bytes []byte - info os.FileInfo + bytes []byte + info os.FileInfo + digest [sha256.Size]byte } type bindataFileInfo struct { @@ -85,32 +88,21 @@ type bindataFileInfo struct { modTime time.Time } -// Name return file name func (fi bindataFileInfo) Name() string { return fi.name } - -// Size return file size func (fi bindataFileInfo) Size() int64 { return fi.size } - -// Mode return file mode func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } - -// Mode return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } - -// IsDir return file whether a directory func (fi bindataFileInfo) IsDir() bool { - return fi.mode&os.ModeDir != 0 + return false } - -// Sys return file is sys mode func (fi bindataFileInfo) Sys() interface{} { return nil } @@ -131,7 +123,7 @@ func _lgraphqlAdddeploytargetGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addDeployTarget.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc3, 0x39, 0x6d, 0xa8, 0xbd, 0x8c, 0xfa, 0xea, 0x46, 0x56, 0xa4, 0x60, 0x6a, 0x30, 0x79, 0xc7, 0xb, 0x1, 0x74, 0xbf, 0xe1, 0x1a, 0x3b, 0x6f, 0xd9, 0x2b, 0xb0, 0x19, 0xfd, 0x19, 0xb1, 0x1c}} return a, nil } @@ -151,7 +143,7 @@ func _lgraphqlAdddeploytargetconfigGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addDeployTargetConfig.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9, 0x71, 0x8c, 0x5f, 0x57, 0x90, 0x44, 0xc6, 0xd, 0xe, 0xd5, 0x8f, 0x6f, 0x52, 0xdb, 0x34, 0x4, 0xb5, 0x8b, 0x4, 0x49, 0x23, 0x29, 0x7b, 0xbe, 0x48, 0x25, 0xf3, 0x8d, 0xe0, 0xfc, 0x3d}} return a, nil } @@ -171,7 +163,7 @@ func _lgraphqlAddenvvariableGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addEnvVariable.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa4, 0xdf, 0xcc, 0xed, 0x24, 0x54, 0xb9, 0xf9, 0xe9, 0x47, 0xac, 0x18, 0xd2, 0xd4, 0x34, 0x44, 0x55, 0x2b, 0x61, 0x38, 0xb4, 0xbb, 0x34, 0x48, 0x3d, 0xa8, 0xaf, 0xfa, 0x11, 0x11, 0x22, 0xf3}} return a, nil } @@ -191,7 +183,7 @@ func _lgraphqlAddgroupGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addGroup.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x77, 0x26, 0xa3, 0x90, 0xe9, 0x6a, 0x92, 0x6f, 0x20, 0x1a, 0x31, 0x4b, 0x59, 0xd1, 0xd, 0x8a, 0x7a, 0x48, 0xa0, 0xa3, 0x83, 0x94, 0xf9, 0xc2, 0xae, 0x2e, 0x70, 0x6d, 0xad, 0x63, 0xf6, 0x97}} return a, nil } @@ -211,7 +203,7 @@ func _lgraphqlAddgroupstoprojectGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addGroupsToProject.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbd, 0x87, 0xa7, 0x9e, 0x69, 0x59, 0xa2, 0x82, 0x97, 0xff, 0x4b, 0x84, 0xf, 0x3e, 0x87, 0x6c, 0xb5, 0xa4, 0x4e, 0x2, 0x7f, 0x58, 0x6b, 0x69, 0x45, 0x9, 0xe2, 0x53, 0x6, 0xc9, 0xa1, 0xac}} return a, nil } @@ -231,7 +223,7 @@ func _lgraphqlAddnotificationemailGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationEmail.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6, 0x8d, 0xcc, 0x2d, 0x55, 0xe4, 0xe2, 0x6d, 0x59, 0x6b, 0x9a, 0xe9, 0x33, 0xad, 0x32, 0x3d, 0x2a, 0x8b, 0xe6, 0x36, 0x6d, 0x82, 0x6d, 0x57, 0x1d, 0x38, 0x7a, 0x61, 0xdd, 0x7, 0xae, 0xb5}} return a, nil } @@ -251,7 +243,7 @@ func _lgraphqlAddnotificationmicrosoftteamsGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationMicrosoftTeams.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x38, 0x57, 0x95, 0x3f, 0x2d, 0xec, 0x3d, 0x39, 0x8b, 0xf0, 0x86, 0x71, 0x13, 0xe9, 0x11, 0x57, 0x16, 0x27, 0x9c, 0x57, 0x8d, 0x96, 0xfc, 0xf0, 0x6, 0xce, 0xe1, 0x63, 0x5d, 0x40, 0x13, 0xfe}} return a, nil } @@ -271,7 +263,7 @@ func _lgraphqlAddnotificationrocketchatGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationRocketChat.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x78, 0x1, 0x8, 0x7d, 0xb2, 0x2c, 0x6d, 0xf8, 0xa7, 0xa4, 0xec, 0xe0, 0x6d, 0x4c, 0x2a, 0x43, 0x69, 0xbf, 0xe1, 0x6a, 0xa6, 0x3a, 0x51, 0x58, 0x2e, 0xb0, 0xf9, 0x24, 0x50, 0xc, 0xef, 0xba}} return a, nil } @@ -291,7 +283,7 @@ func _lgraphqlAddnotificationslackGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationSlack.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf2, 0xd4, 0x90, 0x44, 0x41, 0x48, 0x21, 0xe7, 0x30, 0x6b, 0x0, 0xed, 0x73, 0x6c, 0x1, 0xd, 0xdb, 0xb, 0x83, 0x2, 0x31, 0x7d, 0x79, 0xea, 0xce, 0x87, 0x37, 0x10, 0x4d, 0x1e, 0xfe, 0x3a}} return a, nil } @@ -311,7 +303,7 @@ func _lgraphqlAddnotificationtoprojectGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationToProject.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x44, 0x34, 0x3f, 0x65, 0x51, 0xda, 0x1b, 0xe9, 0xd3, 0x3c, 0xbe, 0x8b, 0x47, 0x7, 0x43, 0xfa, 0x61, 0xba, 0x8d, 0x95, 0x2d, 0xdc, 0xda, 0x47, 0x7a, 0x1f, 0xa7, 0xa3, 0xd4, 0x27, 0xaa, 0x75}} return a, nil } @@ -331,7 +323,7 @@ func _lgraphqlAddorupdateenvironmentGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addOrUpdateEnvironment.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9b, 0xa1, 0xe4, 0x5f, 0x61, 0x1e, 0xc1, 0xe, 0x16, 0xa5, 0xbd, 0x25, 0x26, 0x8a, 0x99, 0x77, 0x62, 0x77, 0xb1, 0x9b, 0xa, 0xe8, 0xe4, 0xd1, 0xa7, 0xb9, 0x28, 0xde, 0x9a, 0x88, 0x30, 0xec}} return a, nil } @@ -351,7 +343,7 @@ func _lgraphqlAddprojectGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addProject.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x80, 0x2a, 0x37, 0xa1, 0x42, 0xa6, 0xc4, 0x11, 0x18, 0x79, 0x1e, 0xfb, 0x4f, 0x47, 0x37, 0x1b, 0xf9, 0x12, 0xce, 0xfe, 0x2f, 0x4f, 0xa2, 0xbe, 0x97, 0x59, 0x59, 0xf4, 0x1, 0x2a, 0xc1, 0xa7}} return a, nil } @@ -371,7 +363,7 @@ func _lgraphqlAddrestoreGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addRestore.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9a, 0xc1, 0xb5, 0xb5, 0xff, 0xbf, 0x11, 0xc3, 0xe, 0xe1, 0x1e, 0x7f, 0xc6, 0xb6, 0x3b, 0xc5, 0xfb, 0x8b, 0x1a, 0x71, 0xdc, 0xf, 0xe0, 0x3b, 0x80, 0xf8, 0xd7, 0x2c, 0x34, 0x18, 0x91, 0x35}} return a, nil } @@ -391,7 +383,7 @@ func _lgraphqlAddsshkeyGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addSshKey.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x82, 0xea, 0xa0, 0xea, 0xaf, 0x19, 0xca, 0xeb, 0x1c, 0x4d, 0x51, 0x9f, 0x9a, 0xb7, 0x86, 0xc8, 0x29, 0x48, 0xa9, 0x6c, 0x3, 0x4a, 0x70, 0x77, 0xa, 0x79, 0x3, 0x16, 0x56, 0x99, 0xba, 0x29}} return a, nil } @@ -411,7 +403,7 @@ func _lgraphqlAdduserGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addUser.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x33, 0x99, 0xcc, 0x6c, 0xa, 0x18, 0x88, 0x14, 0x92, 0xc5, 0x0, 0xbc, 0xc2, 0xb4, 0xc1, 0xa7, 0x3f, 0x87, 0xc0, 0x67, 0x13, 0xcc, 0xb7, 0xca, 0xec, 0xde, 0xdf, 0x93, 0x61, 0x6a, 0x4d, 0xe0}} return a, nil } @@ -431,7 +423,7 @@ func _lgraphqlAddusertogroupGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addUserToGroup.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x51, 0xb1, 0xe3, 0xcf, 0x2, 0xfa, 0x37, 0x3c, 0xfb, 0x73, 0x93, 0xf9, 0x16, 0xd4, 0x56, 0x41, 0x23, 0x54, 0x4e, 0x12, 0xc9, 0xda, 0xab, 0x6d, 0x85, 0x14, 0x75, 0xb9, 0xba, 0xc5, 0xd4, 0x46}} return a, nil } @@ -451,7 +443,7 @@ func _lgraphqlBackupsforenvironmentbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/backupsForEnvironmentByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x71, 0x3d, 0xa0, 0xdb, 0xe0, 0x75, 0x3f, 0x29, 0x6, 0x43, 0xf6, 0x56, 0xf2, 0xf4, 0x54, 0x62, 0xe8, 0x76, 0x63, 0x7, 0xff, 0xb8, 0xab, 0x16, 0xc8, 0xf4, 0x4a, 0x75, 0x5d, 0x3b, 0x44, 0xf5}} return a, nil } @@ -471,7 +463,7 @@ func _lgraphqlDeletedeploytargetGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deleteDeployTarget.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf8, 0x2a, 0x26, 0x25, 0xa0, 0xd0, 0xb0, 0x69, 0xff, 0xac, 0xb1, 0x57, 0xda, 0x80, 0x21, 0x8c, 0x14, 0x58, 0xac, 0x62, 0xac, 0x35, 0x80, 0x42, 0xca, 0x44, 0xb0, 0xee, 0x51, 0x30, 0x79, 0x67}} return a, nil } @@ -491,7 +483,7 @@ func _lgraphqlDeletedeploytargetconfigGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deleteDeployTargetConfig.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xca, 0xa2, 0x13, 0x6e, 0x82, 0xf5, 0xb, 0xf5, 0xac, 0xa3, 0xd0, 0x4b, 0x45, 0xa4, 0x40, 0xfa, 0xd8, 0x35, 0xcf, 0x4e, 0xc4, 0xe4, 0x30, 0x81, 0x31, 0x26, 0xe4, 0x66, 0xa5, 0xa2, 0x56, 0x6a}} return a, nil } @@ -511,7 +503,7 @@ func _lgraphqlDeployenvironmentbranchGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentBranch.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc8, 0xa8, 0x5e, 0x79, 0x81, 0x2d, 0x60, 0xf3, 0x0, 0xed, 0xf0, 0x55, 0xca, 0xd0, 0xec, 0xf, 0x6c, 0x2d, 0x5a, 0x4d, 0x5f, 0xf6, 0xb2, 0x51, 0xd3, 0x23, 0x63, 0xba, 0x7c, 0x61, 0xfc, 0x37}} return a, nil } @@ -531,7 +523,7 @@ func _lgraphqlDeployenvironmentlatestGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentLatest.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x19, 0x8f, 0xd2, 0xeb, 0x73, 0x78, 0xc7, 0xea, 0xb3, 0x5e, 0x1f, 0xbb, 0x52, 0x5d, 0x35, 0xf4, 0xf, 0xf1, 0x52, 0x47, 0xe6, 0x11, 0x1a, 0xf4, 0x15, 0xc6, 0xcb, 0xc2, 0x18, 0xc9, 0xbb, 0xe1}} return a, nil } @@ -551,7 +543,7 @@ func _lgraphqlDeployenvironmentpromoteGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentPromote.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc7, 0x3b, 0x67, 0xc6, 0xa1, 0xb2, 0xa1, 0xb8, 0xe0, 0xbe, 0xbe, 0xe6, 0xbc, 0x44, 0xe0, 0xb2, 0x91, 0xe1, 0xd5, 0x11, 0x92, 0x2a, 0x36, 0x12, 0x8, 0xbf, 0x2c, 0x12, 0xa2, 0xc, 0xd5, 0xec}} return a, nil } @@ -571,7 +563,7 @@ func _lgraphqlDeployenvironmentpullrequestGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentPullrequest.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa3, 0x63, 0x4a, 0x5f, 0xc4, 0x3e, 0x27, 0x74, 0x38, 0xa1, 0x44, 0x98, 0x53, 0x8c, 0x1f, 0x80, 0x9c, 0x47, 0xf9, 0x2d, 0x72, 0x25, 0x8f, 0xbd, 0xbe, 0xd1, 0x54, 0xb5, 0xda, 0xac, 0x8b, 0xdd}} return a, nil } @@ -591,7 +583,7 @@ func _lgraphqlDeploytargetconfigsbyprojectidGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployTargetConfigsByProjectId.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x58, 0xad, 0x98, 0xe1, 0xb7, 0x12, 0x27, 0x3e, 0xe9, 0xf4, 0xac, 0xa5, 0xbb, 0xf7, 0x64, 0xd1, 0xce, 0x4a, 0x8a, 0x3f, 0xb2, 0xf9, 0x27, 0xb0, 0xd6, 0xd2, 0xca, 0x47, 0x22, 0x1d, 0xd7, 0xb5}} return a, nil } @@ -611,7 +603,7 @@ func _lgraphqlEnvironmentbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/environmentByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x74, 0x15, 0x91, 0x1a, 0x1e, 0xf5, 0x4, 0x2c, 0x41, 0x27, 0xd3, 0x65, 0x58, 0x69, 0xff, 0x82, 0x37, 0xe4, 0x77, 0x89, 0xf0, 0x8d, 0xfd, 0xb3, 0x9c, 0x22, 0x4, 0xa2, 0xe8, 0x90, 0xc6, 0xe3}} return a, nil } @@ -631,7 +623,7 @@ func _lgraphqlLagoonschemaGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/lagoonSchema.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9e, 0xe, 0xea, 0x54, 0xa2, 0xc2, 0x50, 0x45, 0x52, 0xa3, 0x2d, 0xb7, 0x51, 0xef, 0xb, 0x16, 0x78, 0xb0, 0xc8, 0xab, 0xf6, 0x57, 0x59, 0x73, 0xb7, 0x32, 0x67, 0x9a, 0x14, 0x52, 0x5b, 0xd5}} return a, nil } @@ -651,7 +643,7 @@ func _lgraphqlLagoonversionGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/lagoonVersion.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xdd, 0x6d, 0x26, 0x13, 0xe1, 0x87, 0x3, 0xf2, 0x97, 0xc1, 0x80, 0x76, 0xf3, 0xf, 0xa8, 0xea, 0x82, 0xb6, 0x64, 0x5c, 0xcc, 0x41, 0x3f, 0x40, 0x95, 0x3c, 0x46, 0xa5, 0x22, 0x1f, 0x8f, 0xb0}} return a, nil } @@ -671,7 +663,7 @@ func _lgraphqlListdeploytargetsGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/listDeployTargets.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xfb, 0x1d, 0xee, 0x66, 0xa6, 0x75, 0xc6, 0x3b, 0x70, 0xd5, 0xbc, 0xee, 0x68, 0xe4, 0x17, 0xab, 0x9, 0xd, 0x85, 0x58, 0x5f, 0xdb, 0x57, 0x1b, 0xdb, 0xf1, 0xf8, 0x96, 0x14, 0xf, 0x88, 0x19}} return a, nil } @@ -691,7 +683,7 @@ func _lgraphqlMeGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/me.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x41, 0x6a, 0x4a, 0x7d, 0x6e, 0xb1, 0xa2, 0xea, 0x22, 0xdd, 0xff, 0x81, 0x6e, 0x8d, 0x2a, 0x8a, 0x33, 0x61, 0x21, 0xdc, 0xfe, 0xcf, 0xab, 0x1, 0x5e, 0x31, 0xc8, 0x83, 0xb2, 0x8a, 0xbe, 0x9a}} return a, nil } @@ -711,11 +703,11 @@ func _lgraphqlMinimalprojectbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/minimalProjectByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf0, 0x9d, 0x3e, 0x8d, 0xa6, 0x4b, 0xb2, 0xed, 0x30, 0xce, 0x1a, 0x58, 0xa2, 0xbe, 0x3d, 0xd, 0x72, 0xd2, 0x56, 0xd7, 0x39, 0xce, 0xe6, 0xc9, 0xa0, 0xc3, 0xbf, 0xd9, 0x70, 0xe3, 0xd5, 0xa8}} return a, nil } -var __lgraphqlProjectbynameGraphql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x6e\xdb\x30\x0c\xbd\xe7\x2b\xb8\x62\x87\xee\x62\x6c\x3b\xee\xb6\x16\x41\x37\x74\xcb\x8a\x36\xcb\xb5\x60\x64\x3a\xd6\x22\x4b\x0e\x45\x7b\x30\x82\xfc\xfb\xe0\x04\xb3\x65\xd9\x4d\x73\x18\xa6\x4b\x94\x47\xfa\xf1\xe9\x49\xe4\xae\x22\x6e\xe0\x7a\x06\xf0\xd6\x62\x41\x9f\xe0\x49\x58\xdb\xcd\x9b\x77\xb0\x9f\x01\x00\x94\xec\x7e\x91\x92\x9b\x66\x81\x05\x5d\x1f\x21\x80\x53\xe6\xf1\x83\xbf\x79\xed\xd2\x69\xb7\x6d\x43\xdd\x1f\xac\xc4\x7d\x4d\x4d\x0f\xac\x19\xad\xca\xc9\x77\x40\x59\x19\xc3\xb4\xab\xc8\x4b\x00\xb2\xae\x51\xe8\x9e\x9a\x00\x72\x69\xa5\x44\x3b\x3b\xb7\xb5\x66\x67\x0b\xb2\xd2\x45\xbd\x38\xc6\x0d\xdd\xa2\x51\x1d\xe6\x4a\xb2\x3e\xd7\x99\x3c\x9c\x0e\xf2\x80\x22\xc4\xb6\x8b\xa7\x54\x93\x71\x65\xcb\x13\x50\xfa\x6f\xba\xd0\x3d\xf1\x46\xcb\x4f\x36\x2f\x9f\x67\xc3\xae\x2a\x7d\x6f\x04\x40\x92\x24\xe0\x2c\xdc\xb5\x01\x08\x03\x00\xcf\xcf\xd2\x94\x34\x30\x68\xe4\x58\xbb\x0a\x2a\xd6\xc4\x7e\xf8\x31\x40\xe5\x89\x63\x0c\x80\x0a\xd4\x66\x84\x7a\x9f\xdf\x53\x33\xa2\x98\x2c\x77\x5a\x5b\x6a\x96\x4d\xf9\x42\x64\x85\xa6\x1a\x87\x0e\x23\x24\xd3\xec\x65\x31\x55\xc0\xe0\x64\x20\xa6\x60\x67\x86\x29\x61\x42\xbf\xef\x77\xd6\x89\xce\xb4\xc2\xf6\x65\x78\x98\xb8\x88\x45\x90\xf0\x64\x50\x6d\x2f\xbb\x94\xdf\xb4\xce\x9d\xdb\x9e\xbf\x28\x95\xa3\xb5\x64\x26\x25\x4e\x0a\x78\x74\x6a\x4b\x72\x9b\xa3\xfc\x37\x15\xfb\x3d\xe8\x0c\xb0\xd4\x2b\xe2\x3b\x26\x14\xe2\x65\x8e\xf6\x07\xcf\x77\x15\x1a\x48\xe0\xea\x43\xf2\x31\x79\x7f\x05\x87\x57\xb4\xcf\xdb\x87\x76\x99\xec\xe3\x9b\xfc\x9c\xa6\x4c\xde\x9f\xd3\xfe\x4a\xc5\xef\x5a\xb1\xf3\x2e\x93\x25\x61\xe1\xff\x99\x63\x91\x3b\x64\xd3\xf0\xec\x87\xf1\x00\x09\x0b\x07\x93\xae\xcf\x24\x5b\xaf\x90\x35\xae\x0d\x0d\x65\x46\x95\xbd\x72\x83\x0e\xab\x07\x6d\x35\xe0\xeb\xe6\xd1\x39\xbe\x94\x4a\xe3\xe2\xb6\x3d\x81\x37\xe8\xe9\x91\xb2\x11\xfe\x85\x30\x9d\xc2\x97\x5a\x06\x9d\x17\x48\x88\xf8\xe3\xb9\x1a\x75\xf5\x68\x44\x9e\xb1\x67\xe2\x31\xc7\x16\xc5\x26\x4d\x4d\x81\xf6\xf7\x30\xfb\x13\x00\x00\xff\xff\x9c\x62\xa4\x1d\xd0\x06\x00\x00") +var __lgraphqlProjectbynameGraphql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x6e\xdb\x30\x0c\xbd\xe7\x2b\xb8\x62\x87\xee\x62\x6c\x3b\xee\xb6\x16\x41\x37\x74\xcb\x8a\x36\xcd\xb5\x60\x64\x3a\xd6\x22\x4b\x0e\x45\x7b\x30\x82\xfc\xfb\xe0\x04\xb3\x65\xd9\x4d\x7b\x18\xaa\x4b\x94\x47\xfa\xf1\xe9\x49\xe4\xae\x22\x6e\xe0\x72\x06\xf0\xde\x62\x41\x5f\xe0\x41\x58\xdb\xcd\xbb\x0f\xb0\x9f\x01\x00\x94\xec\x7e\x93\x92\xab\x66\x81\x05\x5d\x1e\x21\x80\x53\xe6\xf1\x83\x7f\x79\xed\xd2\x69\xb7\x6d\x43\xdd\x1f\xac\xc4\x7d\x4f\x4d\x0f\xac\x19\xad\xca\xc9\x77\x40\x59\x19\xc3\xb4\xab\xc8\x4b\x00\xb2\xae\x51\xe8\x96\x9a\x00\x72\x69\xa5\x44\x3b\x3b\xb7\xb5\x66\x67\x0b\xb2\xd2\x45\xbd\x38\xc6\x0d\x5d\xa3\x51\x1d\xe6\x4a\xb2\x3e\xd7\x99\xdc\x9d\x0e\x72\x87\x22\xc4\xb6\x8b\xa7\x54\x93\x71\x65\xcb\x13\x50\xfa\x1f\xba\xd0\x3d\xf1\x46\xcb\x23\x9b\xe7\xcf\x93\xa1\x12\xff\xa8\x43\x99\x6b\x43\x45\x08\x6d\xd8\x55\xa5\xef\xbd\x02\x48\x92\x04\x9c\x85\x9b\x36\x00\x61\x00\xe0\xe9\x49\x9a\x92\x06\x1e\x8e\x4c\x6d\x57\x41\xc5\x9a\xd8\x0f\x3f\x06\xa8\x3c\x71\x8c\x01\x50\x81\xda\x8c\x50\xef\xf3\x5b\x6a\x46\x14\x93\xe5\x4e\x6b\x4b\xcd\xb2\x29\x9f\x89\xac\xd0\x54\xe3\xd0\x61\x84\x64\x9a\xbd\x2c\xa6\x0a\x18\x9c\x0c\xc4\x14\xec\xcc\x30\x25\x4c\xe8\xf7\xfd\xce\x3a\xd1\x99\x56\xd8\x3e\x1e\x0f\x13\x17\xb1\x08\x12\x1e\x0c\xaa\xed\xeb\x2e\xe5\x0f\xad\x73\xe7\xb6\xe7\x2f\x4a\xe5\x68\x2d\x99\x49\x89\x93\x02\xee\x9d\xda\x92\x5c\xe7\x28\x6f\xa6\x62\xbf\x07\x9d\x01\x96\x7a\x45\x7c\xc3\x84\x42\xbc\xcc\xd1\xfe\xe2\xf9\xae\x42\x03\x09\x5c\x7c\x4a\x3e\x27\x1f\x2f\xe0\xf0\x82\xf6\x79\xfb\xd0\x5e\x27\xfb\xf8\x26\xbf\xa6\x29\x93\xf7\xe7\xb4\xbf\x50\xf1\xa7\x56\xec\xbc\xcb\x64\x49\x58\xf8\xff\xe6\x58\xe4\x0e\xd9\x34\x3c\xfb\x61\x3c\x63\xc2\xc2\xc1\x30\xec\x33\xc9\xd6\x2b\x64\x8d\x6b\x43\x43\x99\x51\x65\xaf\xdc\xa0\xc3\xea\x41\x5b\x0d\xf8\xba\x91\x75\x8e\x2f\xa5\xd2\xb8\xb8\x6d\x4f\xe0\x15\x7a\xba\xa7\x6c\x84\x7f\x23\x4c\xa7\xf0\xa5\x96\x41\xe7\x05\x12\x22\xfe\x78\xf4\x46\x5d\x3d\x9a\xa2\x67\xec\x99\x78\xcc\xb1\x45\xb1\x49\x53\x53\xa0\xfd\x3d\xcc\xfe\x06\x00\x00\xff\xff\x6c\x32\x0c\xee\xf3\x06\x00\x00") func _lgraphqlProjectbynameGraphqlBytes() ([]byte, error) { return bindataRead( @@ -731,7 +723,7 @@ func _lgraphqlProjectbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa8, 0xec, 0x7e, 0xd4, 0xa, 0x7e, 0xb7, 0xf7, 0x1c, 0xd9, 0x41, 0xe8, 0xa7, 0xe5, 0x6e, 0x93, 0xe2, 0x4b, 0xaf, 0x2f, 0xdb, 0x7, 0x84, 0x68, 0x5d, 0x29, 0x11, 0x1b, 0xed, 0x3, 0x5a, 0x73}} return a, nil } @@ -751,7 +743,7 @@ func _lgraphqlProjectbynamemetadataGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectByNameMetadata.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x11, 0xcb, 0xca, 0xaf, 0x5d, 0xe3, 0x4, 0x41, 0x92, 0xee, 0xbf, 0x3f, 0xeb, 0x91, 0x7, 0xdb, 0xca, 0x4, 0x3e, 0x42, 0x4a, 0xbf, 0xf2, 0x1a, 0x2b, 0xb, 0x7, 0xa6, 0xff, 0x43, 0x58, 0x51}} return a, nil } @@ -771,7 +763,7 @@ func _lgraphqlProjectsbymetadataGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectsByMetadata.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbb, 0x7a, 0xc9, 0x5e, 0x44, 0x76, 0xfe, 0xb3, 0x69, 0x39, 0x98, 0xd6, 0x69, 0xb1, 0x33, 0x61, 0xc8, 0x89, 0x1c, 0xe0, 0x35, 0xdd, 0xcd, 0x72, 0xb0, 0x98, 0xcc, 0x47, 0x6f, 0x9d, 0x96, 0x8b}} return a, nil } @@ -791,7 +783,7 @@ func _lgraphqlRemoveprojectmetadatabykeyGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/removeProjectMetadataByKey.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x51, 0x5f, 0x3b, 0x9d, 0xd7, 0xe2, 0xc3, 0x44, 0x77, 0xc5, 0xee, 0xd3, 0xf3, 0x0, 0x12, 0x85, 0xf3, 0xc2, 0x63, 0x4e, 0xb3, 0xd3, 0xe3, 0x3, 0xfe, 0x4d, 0x53, 0x0, 0x39, 0xfc, 0x63, 0x76}} return a, nil } @@ -811,7 +803,7 @@ func _lgraphqlSwitchactivestandbyGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/switchActiveStandby.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb3, 0xeb, 0xd9, 0x14, 0xd, 0xb4, 0xf0, 0x79, 0xd5, 0x30, 0x22, 0x3, 0xa9, 0x7b, 0x73, 0xc8, 0xc6, 0xe0, 0x9e, 0xe2, 0xdb, 0x58, 0x38, 0x94, 0xe2, 0x22, 0xde, 0x93, 0x3a, 0x8c, 0xc7, 0x56}} return a, nil } @@ -831,7 +823,7 @@ func _lgraphqlTaskbyidGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/taskByID.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7, 0x21, 0xe7, 0x4b, 0x30, 0x2a, 0x2e, 0x7, 0xac, 0x75, 0xd, 0xdc, 0x51, 0x75, 0x53, 0xa, 0x48, 0x5, 0xbe, 0x8e, 0x29, 0x2, 0x90, 0xe, 0xd3, 0xa6, 0xc7, 0xba, 0x1c, 0x46, 0xa4, 0x82}} return a, nil } @@ -851,7 +843,7 @@ func _lgraphqlUpdatedeploytargetGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/updateDeployTarget.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9, 0x62, 0x2f, 0x4f, 0xad, 0xa9, 0x52, 0x1f, 0x88, 0xf0, 0xdf, 0x1f, 0xb6, 0x14, 0xd9, 0x12, 0xa0, 0x81, 0xad, 0xf, 0x1f, 0x7, 0x40, 0x6c, 0x90, 0x1e, 0x3c, 0xe7, 0x21, 0x5c, 0xf2, 0xc3}} return a, nil } @@ -871,7 +863,7 @@ func _lgraphqlUpdatedeploytargetconfigGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/updateDeployTargetConfig.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x52, 0xc1, 0xcf, 0x85, 0xc0, 0x74, 0x58, 0x4d, 0xc2, 0xc8, 0x90, 0x77, 0xc0, 0x42, 0xca, 0x9f, 0xfa, 0xf9, 0x26, 0x36, 0x3, 0x3, 0x66, 0x85, 0x83, 0xe3, 0xc1, 0xf6, 0x52, 0xfc, 0x68, 0xc1}} return a, nil } @@ -891,7 +883,7 @@ func _lgraphqlUpdateprojectmetadataGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/updateProjectMetadata.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1e, 0x5c, 0x79, 0x65, 0xb3, 0x80, 0xef, 0xe5, 0x67, 0x82, 0x41, 0xba, 0x50, 0x62, 0x30, 0x52, 0xcb, 0x80, 0x62, 0xf1, 0xf6, 0xbb, 0xb7, 0x8c, 0xd9, 0xc5, 0xd7, 0xff, 0xca, 0x96, 0xcc, 0x66}} return a, nil } @@ -899,8 +891,8 @@ func _lgraphqlUpdateprojectmetadataGraphql() (*asset, error) { // It returns an error if the asset could not be found or // could not be loaded. func Asset(name string) ([]byte, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) @@ -910,6 +902,12 @@ func Asset(name string) ([]byte, error) { return nil, fmt.Errorf("Asset %s not found", name) } +// AssetString returns the asset contents as a string (instead of a []byte). +func AssetString(name string) (string, error) { + data, err := Asset(name) + return string(data), err +} + // MustAsset is like Asset but panics when Asset would return an error. // It simplifies safe initialization of global variables. func MustAsset(name string) []byte { @@ -921,12 +919,18 @@ func MustAsset(name string) []byte { return a } +// MustAssetString is like AssetString but panics when Asset would return an +// error. It simplifies safe initialization of global variables. +func MustAssetString(name string) string { + return string(MustAsset(name)) +} + // AssetInfo loads and returns the asset info for the given name. // It returns an error if the asset could not be found or // could not be loaded. func AssetInfo(name string) (os.FileInfo, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) @@ -936,6 +940,33 @@ func AssetInfo(name string) (os.FileInfo, error) { return nil, fmt.Errorf("AssetInfo %s not found", name) } +// AssetDigest returns the digest of the file with the given name. It returns an +// error if the asset could not be found or the digest could not be loaded. +func AssetDigest(name string) ([sha256.Size]byte, error) { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { + a, err := f() + if err != nil { + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err) + } + return a.digest, nil + } + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name) +} + +// Digests returns a map of all known files and their checksums. +func Digests() (map[string][sha256.Size]byte, error) { + mp := make(map[string][sha256.Size]byte, len(_bindata)) + for name := range _bindata { + a, err := _bindata[name]() + if err != nil { + return nil, err + } + mp[name] = a.digest + } + return mp, nil +} + // AssetNames returns the names of the assets. func AssetNames() []string { names := make([]string, 0, len(_bindata)) @@ -988,6 +1019,9 @@ var _bindata = map[string]func() (*asset, error){ "_lgraphql/updateProjectMetadata.graphql": _lgraphqlUpdateprojectmetadataGraphql, } +// AssetDebug is true if the assets were built with the debug flag enabled. +const AssetDebug = false + // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the @@ -997,15 +1031,15 @@ var _bindata = map[string]func() (*asset, error){ // img/ // a.png // b.png -// then AssetDir("data") would return []string{"foo.txt", "img"} -// AssetDir("data/img") would return []string{"a.png", "b.png"} -// AssetDir("foo.txt") and AssetDir("notexist") would return an error +// then AssetDir("data") would return []string{"foo.txt", "img"}, +// AssetDir("data/img") would return []string{"a.png", "b.png"}, +// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and // AssetDir("") will return []string{"data"}. func AssetDir(name string) ([]string, error) { node := _bintree if len(name) != 0 { - cannonicalName := strings.Replace(name, "\\", "/", -1) - pathList := strings.Split(cannonicalName, "/") + canonicalName := strings.Replace(name, "\\", "/", -1) + pathList := strings.Split(canonicalName, "/") for _, p := range pathList { node = node.Children[p] if node == nil { @@ -1029,50 +1063,50 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "_lgraphql": &bintree{nil, map[string]*bintree{ - "addDeployTarget.graphql": &bintree{_lgraphqlAdddeploytargetGraphql, map[string]*bintree{}}, - "addDeployTargetConfig.graphql": &bintree{_lgraphqlAdddeploytargetconfigGraphql, map[string]*bintree{}}, - "addEnvVariable.graphql": &bintree{_lgraphqlAddenvvariableGraphql, map[string]*bintree{}}, - "addGroup.graphql": &bintree{_lgraphqlAddgroupGraphql, map[string]*bintree{}}, - "addGroupsToProject.graphql": &bintree{_lgraphqlAddgroupstoprojectGraphql, map[string]*bintree{}}, - "addNotificationEmail.graphql": &bintree{_lgraphqlAddnotificationemailGraphql, map[string]*bintree{}}, - "addNotificationMicrosoftTeams.graphql": &bintree{_lgraphqlAddnotificationmicrosoftteamsGraphql, map[string]*bintree{}}, - "addNotificationRocketChat.graphql": &bintree{_lgraphqlAddnotificationrocketchatGraphql, map[string]*bintree{}}, - "addNotificationSlack.graphql": &bintree{_lgraphqlAddnotificationslackGraphql, map[string]*bintree{}}, - "addNotificationToProject.graphql": &bintree{_lgraphqlAddnotificationtoprojectGraphql, map[string]*bintree{}}, - "addOrUpdateEnvironment.graphql": &bintree{_lgraphqlAddorupdateenvironmentGraphql, map[string]*bintree{}}, - "addProject.graphql": &bintree{_lgraphqlAddprojectGraphql, map[string]*bintree{}}, - "addRestore.graphql": &bintree{_lgraphqlAddrestoreGraphql, map[string]*bintree{}}, - "addSshKey.graphql": &bintree{_lgraphqlAddsshkeyGraphql, map[string]*bintree{}}, - "addUser.graphql": &bintree{_lgraphqlAdduserGraphql, map[string]*bintree{}}, - "addUserToGroup.graphql": &bintree{_lgraphqlAddusertogroupGraphql, map[string]*bintree{}}, - "backupsForEnvironmentByName.graphql": &bintree{_lgraphqlBackupsforenvironmentbynameGraphql, map[string]*bintree{}}, - "deleteDeployTarget.graphql": &bintree{_lgraphqlDeletedeploytargetGraphql, map[string]*bintree{}}, - "deleteDeployTargetConfig.graphql": &bintree{_lgraphqlDeletedeploytargetconfigGraphql, map[string]*bintree{}}, - "deployEnvironmentBranch.graphql": &bintree{_lgraphqlDeployenvironmentbranchGraphql, map[string]*bintree{}}, - "deployEnvironmentLatest.graphql": &bintree{_lgraphqlDeployenvironmentlatestGraphql, map[string]*bintree{}}, - "deployEnvironmentPromote.graphql": &bintree{_lgraphqlDeployenvironmentpromoteGraphql, map[string]*bintree{}}, - "deployEnvironmentPullrequest.graphql": &bintree{_lgraphqlDeployenvironmentpullrequestGraphql, map[string]*bintree{}}, - "deployTargetConfigsByProjectId.graphql": &bintree{_lgraphqlDeploytargetconfigsbyprojectidGraphql, map[string]*bintree{}}, - "environmentByName.graphql": &bintree{_lgraphqlEnvironmentbynameGraphql, map[string]*bintree{}}, - "lagoonSchema.graphql": &bintree{_lgraphqlLagoonschemaGraphql, map[string]*bintree{}}, - "lagoonVersion.graphql": &bintree{_lgraphqlLagoonversionGraphql, map[string]*bintree{}}, - "listDeployTargets.graphql": &bintree{_lgraphqlListdeploytargetsGraphql, map[string]*bintree{}}, - "me.graphql": &bintree{_lgraphqlMeGraphql, map[string]*bintree{}}, - "minimalProjectByName.graphql": &bintree{_lgraphqlMinimalprojectbynameGraphql, map[string]*bintree{}}, - "projectByName.graphql": &bintree{_lgraphqlProjectbynameGraphql, map[string]*bintree{}}, - "projectByNameMetadata.graphql": &bintree{_lgraphqlProjectbynamemetadataGraphql, map[string]*bintree{}}, - "projectsByMetadata.graphql": &bintree{_lgraphqlProjectsbymetadataGraphql, map[string]*bintree{}}, - "removeProjectMetadataByKey.graphql": &bintree{_lgraphqlRemoveprojectmetadatabykeyGraphql, map[string]*bintree{}}, - "switchActiveStandby.graphql": &bintree{_lgraphqlSwitchactivestandbyGraphql, map[string]*bintree{}}, - "taskByID.graphql": &bintree{_lgraphqlTaskbyidGraphql, map[string]*bintree{}}, - "updateDeployTarget.graphql": &bintree{_lgraphqlUpdatedeploytargetGraphql, map[string]*bintree{}}, - "updateDeployTargetConfig.graphql": &bintree{_lgraphqlUpdatedeploytargetconfigGraphql, map[string]*bintree{}}, - "updateProjectMetadata.graphql": &bintree{_lgraphqlUpdateprojectmetadataGraphql, map[string]*bintree{}}, + "_lgraphql": {nil, map[string]*bintree{ + "addDeployTarget.graphql": {_lgraphqlAdddeploytargetGraphql, map[string]*bintree{}}, + "addDeployTargetConfig.graphql": {_lgraphqlAdddeploytargetconfigGraphql, map[string]*bintree{}}, + "addEnvVariable.graphql": {_lgraphqlAddenvvariableGraphql, map[string]*bintree{}}, + "addGroup.graphql": {_lgraphqlAddgroupGraphql, map[string]*bintree{}}, + "addGroupsToProject.graphql": {_lgraphqlAddgroupstoprojectGraphql, map[string]*bintree{}}, + "addNotificationEmail.graphql": {_lgraphqlAddnotificationemailGraphql, map[string]*bintree{}}, + "addNotificationMicrosoftTeams.graphql": {_lgraphqlAddnotificationmicrosoftteamsGraphql, map[string]*bintree{}}, + "addNotificationRocketChat.graphql": {_lgraphqlAddnotificationrocketchatGraphql, map[string]*bintree{}}, + "addNotificationSlack.graphql": {_lgraphqlAddnotificationslackGraphql, map[string]*bintree{}}, + "addNotificationToProject.graphql": {_lgraphqlAddnotificationtoprojectGraphql, map[string]*bintree{}}, + "addOrUpdateEnvironment.graphql": {_lgraphqlAddorupdateenvironmentGraphql, map[string]*bintree{}}, + "addProject.graphql": {_lgraphqlAddprojectGraphql, map[string]*bintree{}}, + "addRestore.graphql": {_lgraphqlAddrestoreGraphql, map[string]*bintree{}}, + "addSshKey.graphql": {_lgraphqlAddsshkeyGraphql, map[string]*bintree{}}, + "addUser.graphql": {_lgraphqlAdduserGraphql, map[string]*bintree{}}, + "addUserToGroup.graphql": {_lgraphqlAddusertogroupGraphql, map[string]*bintree{}}, + "backupsForEnvironmentByName.graphql": {_lgraphqlBackupsforenvironmentbynameGraphql, map[string]*bintree{}}, + "deleteDeployTarget.graphql": {_lgraphqlDeletedeploytargetGraphql, map[string]*bintree{}}, + "deleteDeployTargetConfig.graphql": {_lgraphqlDeletedeploytargetconfigGraphql, map[string]*bintree{}}, + "deployEnvironmentBranch.graphql": {_lgraphqlDeployenvironmentbranchGraphql, map[string]*bintree{}}, + "deployEnvironmentLatest.graphql": {_lgraphqlDeployenvironmentlatestGraphql, map[string]*bintree{}}, + "deployEnvironmentPromote.graphql": {_lgraphqlDeployenvironmentpromoteGraphql, map[string]*bintree{}}, + "deployEnvironmentPullrequest.graphql": {_lgraphqlDeployenvironmentpullrequestGraphql, map[string]*bintree{}}, + "deployTargetConfigsByProjectId.graphql": {_lgraphqlDeploytargetconfigsbyprojectidGraphql, map[string]*bintree{}}, + "environmentByName.graphql": {_lgraphqlEnvironmentbynameGraphql, map[string]*bintree{}}, + "lagoonSchema.graphql": {_lgraphqlLagoonschemaGraphql, map[string]*bintree{}}, + "lagoonVersion.graphql": {_lgraphqlLagoonversionGraphql, map[string]*bintree{}}, + "listDeployTargets.graphql": {_lgraphqlListdeploytargetsGraphql, map[string]*bintree{}}, + "me.graphql": {_lgraphqlMeGraphql, map[string]*bintree{}}, + "minimalProjectByName.graphql": {_lgraphqlMinimalprojectbynameGraphql, map[string]*bintree{}}, + "projectByName.graphql": {_lgraphqlProjectbynameGraphql, map[string]*bintree{}}, + "projectByNameMetadata.graphql": {_lgraphqlProjectbynamemetadataGraphql, map[string]*bintree{}}, + "projectsByMetadata.graphql": {_lgraphqlProjectsbymetadataGraphql, map[string]*bintree{}}, + "removeProjectMetadataByKey.graphql": {_lgraphqlRemoveprojectmetadatabykeyGraphql, map[string]*bintree{}}, + "switchActiveStandby.graphql": {_lgraphqlSwitchactivestandbyGraphql, map[string]*bintree{}}, + "taskByID.graphql": {_lgraphqlTaskbyidGraphql, map[string]*bintree{}}, + "updateDeployTarget.graphql": {_lgraphqlUpdatedeploytargetGraphql, map[string]*bintree{}}, + "updateDeployTargetConfig.graphql": {_lgraphqlUpdatedeploytargetconfigGraphql, map[string]*bintree{}}, + "updateProjectMetadata.graphql": {_lgraphqlUpdateprojectmetadataGraphql, map[string]*bintree{}}, }}, }} -// RestoreAsset restores an asset under the given directory +// RestoreAsset restores an asset under the given directory. func RestoreAsset(dir, name string) error { data, err := Asset(name) if err != nil { @@ -1090,14 +1124,10 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) - if err != nil { - return err - } - return nil + return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) } -// RestoreAssets restores an asset under the given directory recursively +// RestoreAssets restores an asset under the given directory recursively. func RestoreAssets(dir, name string) error { children, err := AssetDir(name) // File @@ -1115,6 +1145,6 @@ func RestoreAssets(dir, name string) error { } func _filePath(dir, name string) string { - cannonicalName := strings.Replace(name, "\\", "/", -1) - return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) + canonicalName := strings.Replace(name, "\\", "/", -1) + return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...) } From e1721e9337df4d20f6bd7e8d7e5197ae0aa20da2 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Thu, 1 Dec 2022 14:07:52 -0800 Subject: [PATCH 04/17] updated test cases --- internal/lagoon/client/lgraphql/lgraphql.go | 338 +++++++++++--------- pkg/lagoon/projects/main_test.go | 4 +- 2 files changed, 186 insertions(+), 156 deletions(-) diff --git a/internal/lagoon/client/lgraphql/lgraphql.go b/internal/lagoon/client/lgraphql/lgraphql.go index 228402fa..ced6f90f 100644 --- a/internal/lagoon/client/lgraphql/lgraphql.go +++ b/internal/lagoon/client/lgraphql/lgraphql.go @@ -1,49 +1,51 @@ -// Code generated for package lgraphql by go-bindata DO NOT EDIT. (@generated) +// Code generated by go-bindata. DO NOT EDIT. // sources: -// _lgraphql/addDeployTarget.graphql -// _lgraphql/addDeployTargetConfig.graphql -// _lgraphql/addEnvVariable.graphql -// _lgraphql/addGroup.graphql -// _lgraphql/addGroupsToProject.graphql -// _lgraphql/addNotificationEmail.graphql -// _lgraphql/addNotificationMicrosoftTeams.graphql -// _lgraphql/addNotificationRocketChat.graphql -// _lgraphql/addNotificationSlack.graphql -// _lgraphql/addNotificationToProject.graphql -// _lgraphql/addOrUpdateEnvironment.graphql -// _lgraphql/addProject.graphql -// _lgraphql/addRestore.graphql -// _lgraphql/addSshKey.graphql -// _lgraphql/addUser.graphql -// _lgraphql/addUserToGroup.graphql -// _lgraphql/backupsForEnvironmentByName.graphql -// _lgraphql/deleteDeployTarget.graphql -// _lgraphql/deleteDeployTargetConfig.graphql -// _lgraphql/deployEnvironmentBranch.graphql -// _lgraphql/deployEnvironmentLatest.graphql -// _lgraphql/deployEnvironmentPromote.graphql -// _lgraphql/deployEnvironmentPullrequest.graphql -// _lgraphql/deployTargetConfigsByProjectId.graphql -// _lgraphql/environmentByName.graphql -// _lgraphql/lagoonSchema.graphql -// _lgraphql/lagoonVersion.graphql -// _lgraphql/listDeployTargets.graphql -// _lgraphql/me.graphql -// _lgraphql/minimalProjectByName.graphql -// _lgraphql/projectByName.graphql -// _lgraphql/projectByNameMetadata.graphql -// _lgraphql/projectsByMetadata.graphql -// _lgraphql/removeProjectMetadataByKey.graphql -// _lgraphql/switchActiveStandby.graphql -// _lgraphql/taskByID.graphql -// _lgraphql/updateDeployTarget.graphql -// _lgraphql/updateDeployTargetConfig.graphql -// _lgraphql/updateProjectMetadata.graphql +// _lgraphql/addDeployTarget.graphql (869B) +// _lgraphql/addDeployTargetConfig.graphql (1.325kB) +// _lgraphql/addEnvVariable.graphql (292B) +// _lgraphql/addGroup.graphql (110B) +// _lgraphql/addGroupsToProject.graphql (184B) +// _lgraphql/addNotificationEmail.graphql (183B) +// _lgraphql/addNotificationMicrosoftTeams.graphql (177B) +// _lgraphql/addNotificationRocketChat.graphql (219B) +// _lgraphql/addNotificationSlack.graphql (214B) +// _lgraphql/addNotificationToProject.graphql (289B) +// _lgraphql/addOrUpdateEnvironment.graphql (566B) +// _lgraphql/addProject.graphql (802B) +// _lgraphql/addRestore.graphql (101B) +// _lgraphql/addSshKey.graphql (279B) +// _lgraphql/addUser.graphql (254B) +// _lgraphql/addUserToGroup.graphql (243B) +// _lgraphql/backupsForEnvironmentByName.graphql (403B) +// _lgraphql/deleteDeployTarget.graphql (102B) +// _lgraphql/deleteDeployTargetConfig.graphql (134B) +// _lgraphql/deployEnvironmentBranch.graphql (282B) +// _lgraphql/deployEnvironmentLatest.graphql (181B) +// _lgraphql/deployEnvironmentPromote.graphql (427B) +// _lgraphql/deployEnvironmentPullrequest.graphql (509B) +// _lgraphql/deployTargetConfigsByProjectId.graphql (253B) +// _lgraphql/environmentByName.graphql (306B) +// _lgraphql/lagoonSchema.graphql (126B) +// _lgraphql/lagoonVersion.graphql (25B) +// _lgraphql/listDeployTargets.graphql (231B) +// _lgraphql/me.graphql (232B) +// _lgraphql/minimalProjectByName.graphql (332B) +// _lgraphql/projectByName.graphql (1.779kB) +// _lgraphql/projectByNameMetadata.graphql (121B) +// _lgraphql/projectsByMetadata.graphql (486B) +// _lgraphql/removeProjectMetadataByKey.graphql (254B) +// _lgraphql/switchActiveStandby.graphql (198B) +// _lgraphql/taskByID.graphql (216B) +// _lgraphql/updateDeployTarget.graphql (944B) +// _lgraphql/updateDeployTargetConfig.graphql (661B) +// _lgraphql/updateProjectMetadata.graphql (337B) + package lgraphql import ( "bytes" "compress/gzip" + "crypto/sha256" "fmt" "io" "io/ioutil" @@ -56,7 +58,7 @@ import ( func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %w", name, err) } var buf bytes.Buffer @@ -64,7 +66,7 @@ func bindataRead(data []byte, name string) ([]byte, error) { clErr := gz.Close() if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %w", name, err) } if clErr != nil { return nil, err @@ -74,8 +76,9 @@ func bindataRead(data []byte, name string) ([]byte, error) { } type asset struct { - bytes []byte - info os.FileInfo + bytes []byte + info os.FileInfo + digest [sha256.Size]byte } type bindataFileInfo struct { @@ -85,32 +88,21 @@ type bindataFileInfo struct { modTime time.Time } -// Name return file name func (fi bindataFileInfo) Name() string { return fi.name } - -// Size return file size func (fi bindataFileInfo) Size() int64 { return fi.size } - -// Mode return file mode func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } - -// Mode return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } - -// IsDir return file whether a directory func (fi bindataFileInfo) IsDir() bool { - return fi.mode&os.ModeDir != 0 + return false } - -// Sys return file is sys mode func (fi bindataFileInfo) Sys() interface{} { return nil } @@ -131,7 +123,7 @@ func _lgraphqlAdddeploytargetGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addDeployTarget.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc3, 0x39, 0x6d, 0xa8, 0xbd, 0x8c, 0xfa, 0xea, 0x46, 0x56, 0xa4, 0x60, 0x6a, 0x30, 0x79, 0xc7, 0xb, 0x1, 0x74, 0xbf, 0xe1, 0x1a, 0x3b, 0x6f, 0xd9, 0x2b, 0xb0, 0x19, 0xfd, 0x19, 0xb1, 0x1c}} return a, nil } @@ -151,7 +143,7 @@ func _lgraphqlAdddeploytargetconfigGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addDeployTargetConfig.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9, 0x71, 0x8c, 0x5f, 0x57, 0x90, 0x44, 0xc6, 0xd, 0xe, 0xd5, 0x8f, 0x6f, 0x52, 0xdb, 0x34, 0x4, 0xb5, 0x8b, 0x4, 0x49, 0x23, 0x29, 0x7b, 0xbe, 0x48, 0x25, 0xf3, 0x8d, 0xe0, 0xfc, 0x3d}} return a, nil } @@ -171,7 +163,7 @@ func _lgraphqlAddenvvariableGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addEnvVariable.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa4, 0xdf, 0xcc, 0xed, 0x24, 0x54, 0xb9, 0xf9, 0xe9, 0x47, 0xac, 0x18, 0xd2, 0xd4, 0x34, 0x44, 0x55, 0x2b, 0x61, 0x38, 0xb4, 0xbb, 0x34, 0x48, 0x3d, 0xa8, 0xaf, 0xfa, 0x11, 0x11, 0x22, 0xf3}} return a, nil } @@ -191,7 +183,7 @@ func _lgraphqlAddgroupGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addGroup.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x77, 0x26, 0xa3, 0x90, 0xe9, 0x6a, 0x92, 0x6f, 0x20, 0x1a, 0x31, 0x4b, 0x59, 0xd1, 0xd, 0x8a, 0x7a, 0x48, 0xa0, 0xa3, 0x83, 0x94, 0xf9, 0xc2, 0xae, 0x2e, 0x70, 0x6d, 0xad, 0x63, 0xf6, 0x97}} return a, nil } @@ -211,7 +203,7 @@ func _lgraphqlAddgroupstoprojectGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addGroupsToProject.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbd, 0x87, 0xa7, 0x9e, 0x69, 0x59, 0xa2, 0x82, 0x97, 0xff, 0x4b, 0x84, 0xf, 0x3e, 0x87, 0x6c, 0xb5, 0xa4, 0x4e, 0x2, 0x7f, 0x58, 0x6b, 0x69, 0x45, 0x9, 0xe2, 0x53, 0x6, 0xc9, 0xa1, 0xac}} return a, nil } @@ -231,7 +223,7 @@ func _lgraphqlAddnotificationemailGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationEmail.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6, 0x8d, 0xcc, 0x2d, 0x55, 0xe4, 0xe2, 0x6d, 0x59, 0x6b, 0x9a, 0xe9, 0x33, 0xad, 0x32, 0x3d, 0x2a, 0x8b, 0xe6, 0x36, 0x6d, 0x82, 0x6d, 0x57, 0x1d, 0x38, 0x7a, 0x61, 0xdd, 0x7, 0xae, 0xb5}} return a, nil } @@ -251,7 +243,7 @@ func _lgraphqlAddnotificationmicrosoftteamsGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationMicrosoftTeams.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x38, 0x57, 0x95, 0x3f, 0x2d, 0xec, 0x3d, 0x39, 0x8b, 0xf0, 0x86, 0x71, 0x13, 0xe9, 0x11, 0x57, 0x16, 0x27, 0x9c, 0x57, 0x8d, 0x96, 0xfc, 0xf0, 0x6, 0xce, 0xe1, 0x63, 0x5d, 0x40, 0x13, 0xfe}} return a, nil } @@ -271,7 +263,7 @@ func _lgraphqlAddnotificationrocketchatGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationRocketChat.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x78, 0x1, 0x8, 0x7d, 0xb2, 0x2c, 0x6d, 0xf8, 0xa7, 0xa4, 0xec, 0xe0, 0x6d, 0x4c, 0x2a, 0x43, 0x69, 0xbf, 0xe1, 0x6a, 0xa6, 0x3a, 0x51, 0x58, 0x2e, 0xb0, 0xf9, 0x24, 0x50, 0xc, 0xef, 0xba}} return a, nil } @@ -291,7 +283,7 @@ func _lgraphqlAddnotificationslackGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationSlack.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf2, 0xd4, 0x90, 0x44, 0x41, 0x48, 0x21, 0xe7, 0x30, 0x6b, 0x0, 0xed, 0x73, 0x6c, 0x1, 0xd, 0xdb, 0xb, 0x83, 0x2, 0x31, 0x7d, 0x79, 0xea, 0xce, 0x87, 0x37, 0x10, 0x4d, 0x1e, 0xfe, 0x3a}} return a, nil } @@ -311,7 +303,7 @@ func _lgraphqlAddnotificationtoprojectGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationToProject.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x44, 0x34, 0x3f, 0x65, 0x51, 0xda, 0x1b, 0xe9, 0xd3, 0x3c, 0xbe, 0x8b, 0x47, 0x7, 0x43, 0xfa, 0x61, 0xba, 0x8d, 0x95, 0x2d, 0xdc, 0xda, 0x47, 0x7a, 0x1f, 0xa7, 0xa3, 0xd4, 0x27, 0xaa, 0x75}} return a, nil } @@ -331,7 +323,7 @@ func _lgraphqlAddorupdateenvironmentGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addOrUpdateEnvironment.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9b, 0xa1, 0xe4, 0x5f, 0x61, 0x1e, 0xc1, 0xe, 0x16, 0xa5, 0xbd, 0x25, 0x26, 0x8a, 0x99, 0x77, 0x62, 0x77, 0xb1, 0x9b, 0xa, 0xe8, 0xe4, 0xd1, 0xa7, 0xb9, 0x28, 0xde, 0x9a, 0x88, 0x30, 0xec}} return a, nil } @@ -351,7 +343,7 @@ func _lgraphqlAddprojectGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addProject.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x80, 0x2a, 0x37, 0xa1, 0x42, 0xa6, 0xc4, 0x11, 0x18, 0x79, 0x1e, 0xfb, 0x4f, 0x47, 0x37, 0x1b, 0xf9, 0x12, 0xce, 0xfe, 0x2f, 0x4f, 0xa2, 0xbe, 0x97, 0x59, 0x59, 0xf4, 0x1, 0x2a, 0xc1, 0xa7}} return a, nil } @@ -371,7 +363,7 @@ func _lgraphqlAddrestoreGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addRestore.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9a, 0xc1, 0xb5, 0xb5, 0xff, 0xbf, 0x11, 0xc3, 0xe, 0xe1, 0x1e, 0x7f, 0xc6, 0xb6, 0x3b, 0xc5, 0xfb, 0x8b, 0x1a, 0x71, 0xdc, 0xf, 0xe0, 0x3b, 0x80, 0xf8, 0xd7, 0x2c, 0x34, 0x18, 0x91, 0x35}} return a, nil } @@ -391,7 +383,7 @@ func _lgraphqlAddsshkeyGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addSshKey.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x82, 0xea, 0xa0, 0xea, 0xaf, 0x19, 0xca, 0xeb, 0x1c, 0x4d, 0x51, 0x9f, 0x9a, 0xb7, 0x86, 0xc8, 0x29, 0x48, 0xa9, 0x6c, 0x3, 0x4a, 0x70, 0x77, 0xa, 0x79, 0x3, 0x16, 0x56, 0x99, 0xba, 0x29}} return a, nil } @@ -411,7 +403,7 @@ func _lgraphqlAdduserGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addUser.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x33, 0x99, 0xcc, 0x6c, 0xa, 0x18, 0x88, 0x14, 0x92, 0xc5, 0x0, 0xbc, 0xc2, 0xb4, 0xc1, 0xa7, 0x3f, 0x87, 0xc0, 0x67, 0x13, 0xcc, 0xb7, 0xca, 0xec, 0xde, 0xdf, 0x93, 0x61, 0x6a, 0x4d, 0xe0}} return a, nil } @@ -431,7 +423,7 @@ func _lgraphqlAddusertogroupGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addUserToGroup.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x51, 0xb1, 0xe3, 0xcf, 0x2, 0xfa, 0x37, 0x3c, 0xfb, 0x73, 0x93, 0xf9, 0x16, 0xd4, 0x56, 0x41, 0x23, 0x54, 0x4e, 0x12, 0xc9, 0xda, 0xab, 0x6d, 0x85, 0x14, 0x75, 0xb9, 0xba, 0xc5, 0xd4, 0x46}} return a, nil } @@ -451,7 +443,7 @@ func _lgraphqlBackupsforenvironmentbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/backupsForEnvironmentByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x71, 0x3d, 0xa0, 0xdb, 0xe0, 0x75, 0x3f, 0x29, 0x6, 0x43, 0xf6, 0x56, 0xf2, 0xf4, 0x54, 0x62, 0xe8, 0x76, 0x63, 0x7, 0xff, 0xb8, 0xab, 0x16, 0xc8, 0xf4, 0x4a, 0x75, 0x5d, 0x3b, 0x44, 0xf5}} return a, nil } @@ -471,7 +463,7 @@ func _lgraphqlDeletedeploytargetGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deleteDeployTarget.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf8, 0x2a, 0x26, 0x25, 0xa0, 0xd0, 0xb0, 0x69, 0xff, 0xac, 0xb1, 0x57, 0xda, 0x80, 0x21, 0x8c, 0x14, 0x58, 0xac, 0x62, 0xac, 0x35, 0x80, 0x42, 0xca, 0x44, 0xb0, 0xee, 0x51, 0x30, 0x79, 0x67}} return a, nil } @@ -491,7 +483,7 @@ func _lgraphqlDeletedeploytargetconfigGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deleteDeployTargetConfig.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xca, 0xa2, 0x13, 0x6e, 0x82, 0xf5, 0xb, 0xf5, 0xac, 0xa3, 0xd0, 0x4b, 0x45, 0xa4, 0x40, 0xfa, 0xd8, 0x35, 0xcf, 0x4e, 0xc4, 0xe4, 0x30, 0x81, 0x31, 0x26, 0xe4, 0x66, 0xa5, 0xa2, 0x56, 0x6a}} return a, nil } @@ -511,7 +503,7 @@ func _lgraphqlDeployenvironmentbranchGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentBranch.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc8, 0xa8, 0x5e, 0x79, 0x81, 0x2d, 0x60, 0xf3, 0x0, 0xed, 0xf0, 0x55, 0xca, 0xd0, 0xec, 0xf, 0x6c, 0x2d, 0x5a, 0x4d, 0x5f, 0xf6, 0xb2, 0x51, 0xd3, 0x23, 0x63, 0xba, 0x7c, 0x61, 0xfc, 0x37}} return a, nil } @@ -531,7 +523,7 @@ func _lgraphqlDeployenvironmentlatestGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentLatest.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x19, 0x8f, 0xd2, 0xeb, 0x73, 0x78, 0xc7, 0xea, 0xb3, 0x5e, 0x1f, 0xbb, 0x52, 0x5d, 0x35, 0xf4, 0xf, 0xf1, 0x52, 0x47, 0xe6, 0x11, 0x1a, 0xf4, 0x15, 0xc6, 0xcb, 0xc2, 0x18, 0xc9, 0xbb, 0xe1}} return a, nil } @@ -551,7 +543,7 @@ func _lgraphqlDeployenvironmentpromoteGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentPromote.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc7, 0x3b, 0x67, 0xc6, 0xa1, 0xb2, 0xa1, 0xb8, 0xe0, 0xbe, 0xbe, 0xe6, 0xbc, 0x44, 0xe0, 0xb2, 0x91, 0xe1, 0xd5, 0x11, 0x92, 0x2a, 0x36, 0x12, 0x8, 0xbf, 0x2c, 0x12, 0xa2, 0xc, 0xd5, 0xec}} return a, nil } @@ -571,7 +563,7 @@ func _lgraphqlDeployenvironmentpullrequestGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentPullrequest.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa3, 0x63, 0x4a, 0x5f, 0xc4, 0x3e, 0x27, 0x74, 0x38, 0xa1, 0x44, 0x98, 0x53, 0x8c, 0x1f, 0x80, 0x9c, 0x47, 0xf9, 0x2d, 0x72, 0x25, 0x8f, 0xbd, 0xbe, 0xd1, 0x54, 0xb5, 0xda, 0xac, 0x8b, 0xdd}} return a, nil } @@ -591,7 +583,7 @@ func _lgraphqlDeploytargetconfigsbyprojectidGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployTargetConfigsByProjectId.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x58, 0xad, 0x98, 0xe1, 0xb7, 0x12, 0x27, 0x3e, 0xe9, 0xf4, 0xac, 0xa5, 0xbb, 0xf7, 0x64, 0xd1, 0xce, 0x4a, 0x8a, 0x3f, 0xb2, 0xf9, 0x27, 0xb0, 0xd6, 0xd2, 0xca, 0x47, 0x22, 0x1d, 0xd7, 0xb5}} return a, nil } @@ -611,7 +603,7 @@ func _lgraphqlEnvironmentbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/environmentByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x74, 0x15, 0x91, 0x1a, 0x1e, 0xf5, 0x4, 0x2c, 0x41, 0x27, 0xd3, 0x65, 0x58, 0x69, 0xff, 0x82, 0x37, 0xe4, 0x77, 0x89, 0xf0, 0x8d, 0xfd, 0xb3, 0x9c, 0x22, 0x4, 0xa2, 0xe8, 0x90, 0xc6, 0xe3}} return a, nil } @@ -631,7 +623,7 @@ func _lgraphqlLagoonschemaGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/lagoonSchema.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9e, 0xe, 0xea, 0x54, 0xa2, 0xc2, 0x50, 0x45, 0x52, 0xa3, 0x2d, 0xb7, 0x51, 0xef, 0xb, 0x16, 0x78, 0xb0, 0xc8, 0xab, 0xf6, 0x57, 0x59, 0x73, 0xb7, 0x32, 0x67, 0x9a, 0x14, 0x52, 0x5b, 0xd5}} return a, nil } @@ -651,7 +643,7 @@ func _lgraphqlLagoonversionGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/lagoonVersion.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xdd, 0x6d, 0x26, 0x13, 0xe1, 0x87, 0x3, 0xf2, 0x97, 0xc1, 0x80, 0x76, 0xf3, 0xf, 0xa8, 0xea, 0x82, 0xb6, 0x64, 0x5c, 0xcc, 0x41, 0x3f, 0x40, 0x95, 0x3c, 0x46, 0xa5, 0x22, 0x1f, 0x8f, 0xb0}} return a, nil } @@ -671,7 +663,7 @@ func _lgraphqlListdeploytargetsGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/listDeployTargets.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xfb, 0x1d, 0xee, 0x66, 0xa6, 0x75, 0xc6, 0x3b, 0x70, 0xd5, 0xbc, 0xee, 0x68, 0xe4, 0x17, 0xab, 0x9, 0xd, 0x85, 0x58, 0x5f, 0xdb, 0x57, 0x1b, 0xdb, 0xf1, 0xf8, 0x96, 0x14, 0xf, 0x88, 0x19}} return a, nil } @@ -691,7 +683,7 @@ func _lgraphqlMeGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/me.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x41, 0x6a, 0x4a, 0x7d, 0x6e, 0xb1, 0xa2, 0xea, 0x22, 0xdd, 0xff, 0x81, 0x6e, 0x8d, 0x2a, 0x8a, 0x33, 0x61, 0x21, 0xdc, 0xfe, 0xcf, 0xab, 0x1, 0x5e, 0x31, 0xc8, 0x83, 0xb2, 0x8a, 0xbe, 0x9a}} return a, nil } @@ -711,11 +703,11 @@ func _lgraphqlMinimalprojectbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/minimalProjectByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf0, 0x9d, 0x3e, 0x8d, 0xa6, 0x4b, 0xb2, 0xed, 0x30, 0xce, 0x1a, 0x58, 0xa2, 0xbe, 0x3d, 0xd, 0x72, 0xd2, 0x56, 0xd7, 0x39, 0xce, 0xe6, 0xc9, 0xa0, 0xc3, 0xbf, 0xd9, 0x70, 0xe3, 0xd5, 0xa8}} return a, nil } -var __lgraphqlProjectbynameGraphql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x6e\xdb\x30\x0c\xbd\xe7\x2b\xb8\x62\x87\xee\x62\x6c\x3b\xee\xb6\x16\x41\x37\x74\xcb\x8a\x36\xcb\xb5\x60\x64\x3a\xd6\x22\x4b\x0e\x45\x7b\x30\x82\xfc\xfb\xe0\x04\xb3\x65\xd9\x4d\x73\x18\xa6\x4b\x94\x47\xfa\xf1\xe9\x49\xe4\xae\x22\x6e\xe0\x7a\x06\xf0\xd6\x62\x41\x9f\xe0\x49\x58\xdb\xcd\x9b\x77\xb0\x9f\x01\x00\x94\xec\x7e\x91\x92\x9b\x66\x81\x05\x5d\x1f\x21\x80\x53\xe6\xf1\x83\xbf\x79\xed\xd2\x69\xb7\x6d\x43\xdd\x1f\xac\xc4\x7d\x4d\x4d\x0f\xac\x19\xad\xca\xc9\x77\x40\x59\x19\xc3\xb4\xab\xc8\x4b\x00\xb2\xae\x51\xe8\x9e\x9a\x00\x72\x69\xa5\x44\x3b\x3b\xb7\xb5\x66\x67\x0b\xb2\xd2\x45\xbd\x38\xc6\x0d\xdd\xa2\x51\x1d\xe6\x4a\xb2\x3e\xd7\x99\x3c\x9c\x0e\xf2\x80\x22\xc4\xb6\x8b\xa7\x54\x93\x71\x65\xcb\x13\x50\xfa\x6f\xba\xd0\x3d\xf1\x46\xcb\x4f\x36\x2f\x9f\x67\xc3\xae\x2a\x7d\x6f\x04\x40\x92\x24\xe0\x2c\xdc\xb5\x01\x08\x03\x00\xcf\xcf\xd2\x94\x34\x30\x68\xe4\x58\xbb\x0a\x2a\xd6\xc4\x7e\xf8\x31\x40\xe5\x89\x63\x0c\x80\x0a\xd4\x66\x84\x7a\x9f\xdf\x53\x33\xa2\x98\x2c\x77\x5a\x5b\x6a\x96\x4d\xf9\x42\x64\x85\xa6\x1a\x87\x0e\x23\x24\xd3\xec\x65\x31\x55\xc0\xe0\x64\x20\xa6\x60\x67\x86\x29\x61\x42\xbf\xef\x77\xd6\x89\xce\xb4\xc2\xf6\x65\x78\x98\xb8\x88\x45\x90\xf0\x64\x50\x6d\x2f\xbb\x94\xdf\xb4\xce\x9d\xdb\x9e\xbf\x28\x95\xa3\xb5\x64\x26\x25\x4e\x0a\x78\x74\x6a\x4b\x72\x9b\xa3\xfc\x37\x15\xfb\x3d\xe8\x0c\xb0\xd4\x2b\xe2\x3b\x26\x14\xe2\x65\x8e\xf6\x07\xcf\x77\x15\x1a\x48\xe0\xea\x43\xf2\x31\x79\x7f\x05\x87\x57\xb4\xcf\xdb\x87\x76\x99\xec\xe3\x9b\xfc\x9c\xa6\x4c\xde\x9f\xd3\xfe\x4a\xc5\xef\x5a\xb1\xf3\x2e\x93\x25\x61\xe1\xff\x99\x63\x91\x3b\x64\xd3\xf0\xec\x87\xf1\x00\x09\x0b\x07\x93\xae\xcf\x24\x5b\xaf\x90\x35\xae\x0d\x0d\x65\x46\x95\xbd\x72\x83\x0e\xab\x07\x6d\x35\xe0\xeb\xe6\xd1\x39\xbe\x94\x4a\xe3\xe2\xb6\x3d\x81\x37\xe8\xe9\x91\xb2\x11\xfe\x85\x30\x9d\xc2\x97\x5a\x06\x9d\x17\x48\x88\xf8\xe3\xb9\x1a\x75\xf5\x68\x44\x9e\xb1\x67\xe2\x31\xc7\x16\xc5\x26\x4d\x4d\x81\xf6\xf7\x30\xfb\x13\x00\x00\xff\xff\x9c\x62\xa4\x1d\xd0\x06\x00\x00") +var __lgraphqlProjectbynameGraphql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x6e\xdb\x30\x0c\xbd\xe7\x2b\xb8\x62\x87\xee\x62\x6c\x3b\xee\xb6\x16\x41\x37\x74\xcb\x8a\x36\xcd\xb5\x60\x64\x3a\xd6\x22\x4b\x0e\x45\x7b\x30\x82\xfc\xfb\xe0\x04\xb3\x65\xd9\x4d\x7b\x18\xaa\x4b\x94\x47\xfa\xf1\xe9\x49\xe4\xae\x22\x6e\xe0\x72\x06\xf0\xde\x62\x41\x5f\xe0\x41\x58\xdb\xcd\xbb\x0f\xb0\x9f\x01\x00\x94\xec\x7e\x93\x92\xab\x66\x81\x05\x5d\x1e\x21\x80\x53\xe6\xf1\x83\x7f\x79\xed\xd2\x69\xb7\x6d\x43\xdd\x1f\xac\xc4\x7d\x4f\x4d\x0f\xac\x19\xad\xca\xc9\x77\x40\x59\x19\xc3\xb4\xab\xc8\x4b\x00\xb2\xae\x51\xe8\x96\x9a\x00\x72\x69\xa5\x44\x3b\x3b\xb7\xb5\x66\x67\x0b\xb2\xd2\x45\xbd\x38\xc6\x0d\x5d\xa3\x51\x1d\xe6\x4a\xb2\x3e\xd7\x99\xdc\x9d\x0e\x72\x87\x22\xc4\xb6\x8b\xa7\x54\x93\x71\x65\xcb\x13\x50\xfa\x1f\xba\xd0\x3d\xf1\x46\xcb\x23\x9b\xe7\xcf\x93\xa1\x12\xff\xa8\x43\x99\x6b\x43\x45\x08\x6d\xd8\x55\xa5\xef\xbd\x02\x48\x92\x04\x9c\x85\x9b\x36\x00\x61\x00\xe0\xe9\x49\x9a\x92\x06\x1e\x8e\x4c\x6d\x57\x41\xc5\x9a\xd8\x0f\x3f\x06\xa8\x3c\x71\x8c\x01\x50\x81\xda\x8c\x50\xef\xf3\x5b\x6a\x46\x14\x93\xe5\x4e\x6b\x4b\xcd\xb2\x29\x9f\x89\xac\xd0\x54\xe3\xd0\x61\x84\x64\x9a\xbd\x2c\xa6\x0a\x18\x9c\x0c\xc4\x14\xec\xcc\x30\x25\x4c\xe8\xf7\xfd\xce\x3a\xd1\x99\x56\xd8\x3e\x1e\x0f\x13\x17\xb1\x08\x12\x1e\x0c\xaa\xed\xeb\x2e\xe5\x0f\xad\x73\xe7\xb6\xe7\x2f\x4a\xe5\x68\x2d\x99\x49\x89\x93\x02\xee\x9d\xda\x92\x5c\xe7\x28\x6f\xa6\x62\xbf\x07\x9d\x01\x96\x7a\x45\x7c\xc3\x84\x42\xbc\xcc\xd1\xfe\xe2\xf9\xae\x42\x03\x09\x5c\x7c\x4a\x3e\x27\x1f\x2f\xe0\xf0\x82\xf6\x79\xfb\xd0\x5e\x27\xfb\xf8\x26\xbf\xa6\x29\x93\xf7\xe7\xb4\xbf\x50\xf1\xa7\x56\xec\xbc\xcb\x64\x49\x58\xf8\xff\xe6\x58\xe4\x0e\xd9\x34\x3c\xfb\x61\x3c\x63\xc2\xc2\xc1\x30\xec\x33\xc9\xd6\x2b\x64\x8d\x6b\x43\x43\x99\x51\x65\xaf\xdc\xa0\xc3\xea\x41\x5b\x0d\xf8\xba\x91\x75\x8e\x2f\xa5\xd2\xb8\xb8\x6d\x4f\xe0\x15\x7a\xba\xa7\x6c\x84\x7f\x23\x4c\xa7\xf0\xa5\x96\x41\xe7\x05\x12\x22\xfe\x78\xf4\x46\x5d\x3d\x9a\xa2\x67\xec\x99\x78\xcc\xb1\x45\xb1\x49\x53\x53\xa0\xfd\x3d\xcc\xfe\x06\x00\x00\xff\xff\x6c\x32\x0c\xee\xf3\x06\x00\x00") func _lgraphqlProjectbynameGraphqlBytes() ([]byte, error) { return bindataRead( @@ -731,7 +723,7 @@ func _lgraphqlProjectbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa8, 0xec, 0x7e, 0xd4, 0xa, 0x7e, 0xb7, 0xf7, 0x1c, 0xd9, 0x41, 0xe8, 0xa7, 0xe5, 0x6e, 0x93, 0xe2, 0x4b, 0xaf, 0x2f, 0xdb, 0x7, 0x84, 0x68, 0x5d, 0x29, 0x11, 0x1b, 0xed, 0x3, 0x5a, 0x73}} return a, nil } @@ -751,7 +743,7 @@ func _lgraphqlProjectbynamemetadataGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectByNameMetadata.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x11, 0xcb, 0xca, 0xaf, 0x5d, 0xe3, 0x4, 0x41, 0x92, 0xee, 0xbf, 0x3f, 0xeb, 0x91, 0x7, 0xdb, 0xca, 0x4, 0x3e, 0x42, 0x4a, 0xbf, 0xf2, 0x1a, 0x2b, 0xb, 0x7, 0xa6, 0xff, 0x43, 0x58, 0x51}} return a, nil } @@ -771,7 +763,7 @@ func _lgraphqlProjectsbymetadataGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectsByMetadata.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbb, 0x7a, 0xc9, 0x5e, 0x44, 0x76, 0xfe, 0xb3, 0x69, 0x39, 0x98, 0xd6, 0x69, 0xb1, 0x33, 0x61, 0xc8, 0x89, 0x1c, 0xe0, 0x35, 0xdd, 0xcd, 0x72, 0xb0, 0x98, 0xcc, 0x47, 0x6f, 0x9d, 0x96, 0x8b}} return a, nil } @@ -791,7 +783,7 @@ func _lgraphqlRemoveprojectmetadatabykeyGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/removeProjectMetadataByKey.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x51, 0x5f, 0x3b, 0x9d, 0xd7, 0xe2, 0xc3, 0x44, 0x77, 0xc5, 0xee, 0xd3, 0xf3, 0x0, 0x12, 0x85, 0xf3, 0xc2, 0x63, 0x4e, 0xb3, 0xd3, 0xe3, 0x3, 0xfe, 0x4d, 0x53, 0x0, 0x39, 0xfc, 0x63, 0x76}} return a, nil } @@ -811,7 +803,7 @@ func _lgraphqlSwitchactivestandbyGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/switchActiveStandby.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb3, 0xeb, 0xd9, 0x14, 0xd, 0xb4, 0xf0, 0x79, 0xd5, 0x30, 0x22, 0x3, 0xa9, 0x7b, 0x73, 0xc8, 0xc6, 0xe0, 0x9e, 0xe2, 0xdb, 0x58, 0x38, 0x94, 0xe2, 0x22, 0xde, 0x93, 0x3a, 0x8c, 0xc7, 0x56}} return a, nil } @@ -831,7 +823,7 @@ func _lgraphqlTaskbyidGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/taskByID.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7, 0x21, 0xe7, 0x4b, 0x30, 0x2a, 0x2e, 0x7, 0xac, 0x75, 0xd, 0xdc, 0x51, 0x75, 0x53, 0xa, 0x48, 0x5, 0xbe, 0x8e, 0x29, 0x2, 0x90, 0xe, 0xd3, 0xa6, 0xc7, 0xba, 0x1c, 0x46, 0xa4, 0x82}} return a, nil } @@ -851,7 +843,7 @@ func _lgraphqlUpdatedeploytargetGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/updateDeployTarget.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9, 0x62, 0x2f, 0x4f, 0xad, 0xa9, 0x52, 0x1f, 0x88, 0xf0, 0xdf, 0x1f, 0xb6, 0x14, 0xd9, 0x12, 0xa0, 0x81, 0xad, 0xf, 0x1f, 0x7, 0x40, 0x6c, 0x90, 0x1e, 0x3c, 0xe7, 0x21, 0x5c, 0xf2, 0xc3}} return a, nil } @@ -871,7 +863,7 @@ func _lgraphqlUpdatedeploytargetconfigGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/updateDeployTargetConfig.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x52, 0xc1, 0xcf, 0x85, 0xc0, 0x74, 0x58, 0x4d, 0xc2, 0xc8, 0x90, 0x77, 0xc0, 0x42, 0xca, 0x9f, 0xfa, 0xf9, 0x26, 0x36, 0x3, 0x3, 0x66, 0x85, 0x83, 0xe3, 0xc1, 0xf6, 0x52, 0xfc, 0x68, 0xc1}} return a, nil } @@ -891,7 +883,7 @@ func _lgraphqlUpdateprojectmetadataGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/updateProjectMetadata.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1e, 0x5c, 0x79, 0x65, 0xb3, 0x80, 0xef, 0xe5, 0x67, 0x82, 0x41, 0xba, 0x50, 0x62, 0x30, 0x52, 0xcb, 0x80, 0x62, 0xf1, 0xf6, 0xbb, 0xb7, 0x8c, 0xd9, 0xc5, 0xd7, 0xff, 0xca, 0x96, 0xcc, 0x66}} return a, nil } @@ -899,8 +891,8 @@ func _lgraphqlUpdateprojectmetadataGraphql() (*asset, error) { // It returns an error if the asset could not be found or // could not be loaded. func Asset(name string) ([]byte, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) @@ -910,6 +902,12 @@ func Asset(name string) ([]byte, error) { return nil, fmt.Errorf("Asset %s not found", name) } +// AssetString returns the asset contents as a string (instead of a []byte). +func AssetString(name string) (string, error) { + data, err := Asset(name) + return string(data), err +} + // MustAsset is like Asset but panics when Asset would return an error. // It simplifies safe initialization of global variables. func MustAsset(name string) []byte { @@ -921,12 +919,18 @@ func MustAsset(name string) []byte { return a } +// MustAssetString is like AssetString but panics when Asset would return an +// error. It simplifies safe initialization of global variables. +func MustAssetString(name string) string { + return string(MustAsset(name)) +} + // AssetInfo loads and returns the asset info for the given name. // It returns an error if the asset could not be found or // could not be loaded. func AssetInfo(name string) (os.FileInfo, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) @@ -936,6 +940,33 @@ func AssetInfo(name string) (os.FileInfo, error) { return nil, fmt.Errorf("AssetInfo %s not found", name) } +// AssetDigest returns the digest of the file with the given name. It returns an +// error if the asset could not be found or the digest could not be loaded. +func AssetDigest(name string) ([sha256.Size]byte, error) { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { + a, err := f() + if err != nil { + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err) + } + return a.digest, nil + } + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name) +} + +// Digests returns a map of all known files and their checksums. +func Digests() (map[string][sha256.Size]byte, error) { + mp := make(map[string][sha256.Size]byte, len(_bindata)) + for name := range _bindata { + a, err := _bindata[name]() + if err != nil { + return nil, err + } + mp[name] = a.digest + } + return mp, nil +} + // AssetNames returns the names of the assets. func AssetNames() []string { names := make([]string, 0, len(_bindata)) @@ -988,6 +1019,9 @@ var _bindata = map[string]func() (*asset, error){ "_lgraphql/updateProjectMetadata.graphql": _lgraphqlUpdateprojectmetadataGraphql, } +// AssetDebug is true if the assets were built with the debug flag enabled. +const AssetDebug = false + // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the @@ -997,15 +1031,15 @@ var _bindata = map[string]func() (*asset, error){ // img/ // a.png // b.png -// then AssetDir("data") would return []string{"foo.txt", "img"} -// AssetDir("data/img") would return []string{"a.png", "b.png"} -// AssetDir("foo.txt") and AssetDir("notexist") would return an error +// then AssetDir("data") would return []string{"foo.txt", "img"}, +// AssetDir("data/img") would return []string{"a.png", "b.png"}, +// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and // AssetDir("") will return []string{"data"}. func AssetDir(name string) ([]string, error) { node := _bintree if len(name) != 0 { - cannonicalName := strings.Replace(name, "\\", "/", -1) - pathList := strings.Split(cannonicalName, "/") + canonicalName := strings.Replace(name, "\\", "/", -1) + pathList := strings.Split(canonicalName, "/") for _, p := range pathList { node = node.Children[p] if node == nil { @@ -1029,50 +1063,50 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "_lgraphql": &bintree{nil, map[string]*bintree{ - "addDeployTarget.graphql": &bintree{_lgraphqlAdddeploytargetGraphql, map[string]*bintree{}}, - "addDeployTargetConfig.graphql": &bintree{_lgraphqlAdddeploytargetconfigGraphql, map[string]*bintree{}}, - "addEnvVariable.graphql": &bintree{_lgraphqlAddenvvariableGraphql, map[string]*bintree{}}, - "addGroup.graphql": &bintree{_lgraphqlAddgroupGraphql, map[string]*bintree{}}, - "addGroupsToProject.graphql": &bintree{_lgraphqlAddgroupstoprojectGraphql, map[string]*bintree{}}, - "addNotificationEmail.graphql": &bintree{_lgraphqlAddnotificationemailGraphql, map[string]*bintree{}}, - "addNotificationMicrosoftTeams.graphql": &bintree{_lgraphqlAddnotificationmicrosoftteamsGraphql, map[string]*bintree{}}, - "addNotificationRocketChat.graphql": &bintree{_lgraphqlAddnotificationrocketchatGraphql, map[string]*bintree{}}, - "addNotificationSlack.graphql": &bintree{_lgraphqlAddnotificationslackGraphql, map[string]*bintree{}}, - "addNotificationToProject.graphql": &bintree{_lgraphqlAddnotificationtoprojectGraphql, map[string]*bintree{}}, - "addOrUpdateEnvironment.graphql": &bintree{_lgraphqlAddorupdateenvironmentGraphql, map[string]*bintree{}}, - "addProject.graphql": &bintree{_lgraphqlAddprojectGraphql, map[string]*bintree{}}, - "addRestore.graphql": &bintree{_lgraphqlAddrestoreGraphql, map[string]*bintree{}}, - "addSshKey.graphql": &bintree{_lgraphqlAddsshkeyGraphql, map[string]*bintree{}}, - "addUser.graphql": &bintree{_lgraphqlAdduserGraphql, map[string]*bintree{}}, - "addUserToGroup.graphql": &bintree{_lgraphqlAddusertogroupGraphql, map[string]*bintree{}}, - "backupsForEnvironmentByName.graphql": &bintree{_lgraphqlBackupsforenvironmentbynameGraphql, map[string]*bintree{}}, - "deleteDeployTarget.graphql": &bintree{_lgraphqlDeletedeploytargetGraphql, map[string]*bintree{}}, - "deleteDeployTargetConfig.graphql": &bintree{_lgraphqlDeletedeploytargetconfigGraphql, map[string]*bintree{}}, - "deployEnvironmentBranch.graphql": &bintree{_lgraphqlDeployenvironmentbranchGraphql, map[string]*bintree{}}, - "deployEnvironmentLatest.graphql": &bintree{_lgraphqlDeployenvironmentlatestGraphql, map[string]*bintree{}}, - "deployEnvironmentPromote.graphql": &bintree{_lgraphqlDeployenvironmentpromoteGraphql, map[string]*bintree{}}, - "deployEnvironmentPullrequest.graphql": &bintree{_lgraphqlDeployenvironmentpullrequestGraphql, map[string]*bintree{}}, - "deployTargetConfigsByProjectId.graphql": &bintree{_lgraphqlDeploytargetconfigsbyprojectidGraphql, map[string]*bintree{}}, - "environmentByName.graphql": &bintree{_lgraphqlEnvironmentbynameGraphql, map[string]*bintree{}}, - "lagoonSchema.graphql": &bintree{_lgraphqlLagoonschemaGraphql, map[string]*bintree{}}, - "lagoonVersion.graphql": &bintree{_lgraphqlLagoonversionGraphql, map[string]*bintree{}}, - "listDeployTargets.graphql": &bintree{_lgraphqlListdeploytargetsGraphql, map[string]*bintree{}}, - "me.graphql": &bintree{_lgraphqlMeGraphql, map[string]*bintree{}}, - "minimalProjectByName.graphql": &bintree{_lgraphqlMinimalprojectbynameGraphql, map[string]*bintree{}}, - "projectByName.graphql": &bintree{_lgraphqlProjectbynameGraphql, map[string]*bintree{}}, - "projectByNameMetadata.graphql": &bintree{_lgraphqlProjectbynamemetadataGraphql, map[string]*bintree{}}, - "projectsByMetadata.graphql": &bintree{_lgraphqlProjectsbymetadataGraphql, map[string]*bintree{}}, - "removeProjectMetadataByKey.graphql": &bintree{_lgraphqlRemoveprojectmetadatabykeyGraphql, map[string]*bintree{}}, - "switchActiveStandby.graphql": &bintree{_lgraphqlSwitchactivestandbyGraphql, map[string]*bintree{}}, - "taskByID.graphql": &bintree{_lgraphqlTaskbyidGraphql, map[string]*bintree{}}, - "updateDeployTarget.graphql": &bintree{_lgraphqlUpdatedeploytargetGraphql, map[string]*bintree{}}, - "updateDeployTargetConfig.graphql": &bintree{_lgraphqlUpdatedeploytargetconfigGraphql, map[string]*bintree{}}, - "updateProjectMetadata.graphql": &bintree{_lgraphqlUpdateprojectmetadataGraphql, map[string]*bintree{}}, + "_lgraphql": {nil, map[string]*bintree{ + "addDeployTarget.graphql": {_lgraphqlAdddeploytargetGraphql, map[string]*bintree{}}, + "addDeployTargetConfig.graphql": {_lgraphqlAdddeploytargetconfigGraphql, map[string]*bintree{}}, + "addEnvVariable.graphql": {_lgraphqlAddenvvariableGraphql, map[string]*bintree{}}, + "addGroup.graphql": {_lgraphqlAddgroupGraphql, map[string]*bintree{}}, + "addGroupsToProject.graphql": {_lgraphqlAddgroupstoprojectGraphql, map[string]*bintree{}}, + "addNotificationEmail.graphql": {_lgraphqlAddnotificationemailGraphql, map[string]*bintree{}}, + "addNotificationMicrosoftTeams.graphql": {_lgraphqlAddnotificationmicrosoftteamsGraphql, map[string]*bintree{}}, + "addNotificationRocketChat.graphql": {_lgraphqlAddnotificationrocketchatGraphql, map[string]*bintree{}}, + "addNotificationSlack.graphql": {_lgraphqlAddnotificationslackGraphql, map[string]*bintree{}}, + "addNotificationToProject.graphql": {_lgraphqlAddnotificationtoprojectGraphql, map[string]*bintree{}}, + "addOrUpdateEnvironment.graphql": {_lgraphqlAddorupdateenvironmentGraphql, map[string]*bintree{}}, + "addProject.graphql": {_lgraphqlAddprojectGraphql, map[string]*bintree{}}, + "addRestore.graphql": {_lgraphqlAddrestoreGraphql, map[string]*bintree{}}, + "addSshKey.graphql": {_lgraphqlAddsshkeyGraphql, map[string]*bintree{}}, + "addUser.graphql": {_lgraphqlAdduserGraphql, map[string]*bintree{}}, + "addUserToGroup.graphql": {_lgraphqlAddusertogroupGraphql, map[string]*bintree{}}, + "backupsForEnvironmentByName.graphql": {_lgraphqlBackupsforenvironmentbynameGraphql, map[string]*bintree{}}, + "deleteDeployTarget.graphql": {_lgraphqlDeletedeploytargetGraphql, map[string]*bintree{}}, + "deleteDeployTargetConfig.graphql": {_lgraphqlDeletedeploytargetconfigGraphql, map[string]*bintree{}}, + "deployEnvironmentBranch.graphql": {_lgraphqlDeployenvironmentbranchGraphql, map[string]*bintree{}}, + "deployEnvironmentLatest.graphql": {_lgraphqlDeployenvironmentlatestGraphql, map[string]*bintree{}}, + "deployEnvironmentPromote.graphql": {_lgraphqlDeployenvironmentpromoteGraphql, map[string]*bintree{}}, + "deployEnvironmentPullrequest.graphql": {_lgraphqlDeployenvironmentpullrequestGraphql, map[string]*bintree{}}, + "deployTargetConfigsByProjectId.graphql": {_lgraphqlDeploytargetconfigsbyprojectidGraphql, map[string]*bintree{}}, + "environmentByName.graphql": {_lgraphqlEnvironmentbynameGraphql, map[string]*bintree{}}, + "lagoonSchema.graphql": {_lgraphqlLagoonschemaGraphql, map[string]*bintree{}}, + "lagoonVersion.graphql": {_lgraphqlLagoonversionGraphql, map[string]*bintree{}}, + "listDeployTargets.graphql": {_lgraphqlListdeploytargetsGraphql, map[string]*bintree{}}, + "me.graphql": {_lgraphqlMeGraphql, map[string]*bintree{}}, + "minimalProjectByName.graphql": {_lgraphqlMinimalprojectbynameGraphql, map[string]*bintree{}}, + "projectByName.graphql": {_lgraphqlProjectbynameGraphql, map[string]*bintree{}}, + "projectByNameMetadata.graphql": {_lgraphqlProjectbynamemetadataGraphql, map[string]*bintree{}}, + "projectsByMetadata.graphql": {_lgraphqlProjectsbymetadataGraphql, map[string]*bintree{}}, + "removeProjectMetadataByKey.graphql": {_lgraphqlRemoveprojectmetadatabykeyGraphql, map[string]*bintree{}}, + "switchActiveStandby.graphql": {_lgraphqlSwitchactivestandbyGraphql, map[string]*bintree{}}, + "taskByID.graphql": {_lgraphqlTaskbyidGraphql, map[string]*bintree{}}, + "updateDeployTarget.graphql": {_lgraphqlUpdatedeploytargetGraphql, map[string]*bintree{}}, + "updateDeployTargetConfig.graphql": {_lgraphqlUpdatedeploytargetconfigGraphql, map[string]*bintree{}}, + "updateProjectMetadata.graphql": {_lgraphqlUpdateprojectmetadataGraphql, map[string]*bintree{}}, }}, }} -// RestoreAsset restores an asset under the given directory +// RestoreAsset restores an asset under the given directory. func RestoreAsset(dir, name string) error { data, err := Asset(name) if err != nil { @@ -1090,14 +1124,10 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) - if err != nil { - return err - } - return nil + return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) } -// RestoreAssets restores an asset under the given directory recursively +// RestoreAssets restores an asset under the given directory recursively. func RestoreAssets(dir, name string) error { children, err := AssetDir(name) // File @@ -1115,6 +1145,6 @@ func RestoreAssets(dir, name string) error { } func _filePath(dir, name string) string { - cannonicalName := strings.Replace(name, "\\", "/", -1) - return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) + canonicalName := strings.Replace(name, "\\", "/", -1) + return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...) } diff --git a/pkg/lagoon/projects/main_test.go b/pkg/lagoon/projects/main_test.go index 4cd3c83d..16bc93d9 100644 --- a/pkg/lagoon/projects/main_test.go +++ b/pkg/lagoon/projects/main_test.go @@ -74,14 +74,14 @@ func TestProjectEnvironmentList(t *testing.T) { func TestProjectInfo(t *testing.T) { var projectInfo = ` - {"autoIdle":1,"branches":"false","developmentEnvironmentsLimit":5,"environments":[ + {"autoIdle":1,"branches":"false","developmentEnvironmentsLimit":5,"factsUI":0,"problemsUI":0,"environments":[ {"deployType":"branch","environmentType":"production","id":3,"name":"Master","openshiftProjectName":"high-cotton-master","route":"http://highcotton.org"}, {"deployType":"branch","environmentType":"development","id":4,"name":"Staging","openshiftProjectName":"high-cotton-staging","route":"https://varnish-highcotton-org-staging.us.amazee.io"}, {"deployType":"branch","environmentType":"development","id":5,"name":"Development","openshiftProjectName":"high-cotton-development","route":"https://varnish-highcotton-org-development.us.amazee.io"}, {"deployType":"pullrequest","environmentType":"development","id":6,"name":"PR-175","openshiftProjectName":"high-cotton-pr-175","route":""}, {"deployType":"branch","environmentType":"development","id":10,"name":"high-cotton","openshiftProjectName":"high-cotton-high-cotton","route":null}], "gitUrl":"test","id":18,"name":"high-cotton","productionEnvironment":"doopdd","routerPattern":"${environment}-${project}.lagoon.example.com","pullrequests":"false","storageCalc":1,"subfolder":null}` - var projectInfoSuccess = `{"header":["ID","ProjectName","GitURL","Branches","PullRequests","ProductionRoute","DevEnvironments","DevEnvLimit","ProductionEnv","RouterPattern","AutoIdle"],"data":[["18","high-cotton","test","false","false","http://highcotton.org","4/5","5","doopdd","${environment}-${project}.lagoon.example.com","1"]]}` + var projectInfoSuccess = `{"header":["ID","ProjectName","GitURL","Branches","PullRequests","ProductionRoute","DevEnvironments","DevEnvLimit","ProductionEnv","RouterPattern","AutoIdle","FactsUI","ProblemsUI"],"data":[["18","high-cotton","test","false","false","http://highcotton.org","4/5","5","doopdd","${environment}-${project}.lagoon.example.com","1","0","0"]]}` returnResult, err := processProjectInfo([]byte(projectInfo)) if err != nil { From 2f5ec6200a1eaf4d5e89b6abeb12280c877868f0 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Wed, 7 Dec 2022 10:58:15 -0800 Subject: [PATCH 05/17] added DeployTargetConfigs --- internal/lagoon/client/_lgraphql/projectByName.graphql | 9 +++++++++ internal/schema/project.go | 3 ++- pkg/api/projects.go | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/internal/lagoon/client/_lgraphql/projectByName.graphql b/internal/lagoon/client/_lgraphql/projectByName.graphql index 37d317d3..974c3244 100644 --- a/internal/lagoon/client/_lgraphql/projectByName.graphql +++ b/internal/lagoon/client/_lgraphql/projectByName.graphql @@ -16,6 +16,15 @@ query ( autoIdle factsUi problemsUi + deployTargetConfigs{ + id + project + deployTarget{ + id + name + token + } + } groups{ ... on Group { __typename diff --git a/internal/schema/project.go b/internal/schema/project.go index 2e13e5dd..40baf195 100644 --- a/internal/schema/project.go +++ b/internal/schema/project.go @@ -33,7 +33,8 @@ type Project struct { // Openshift is unmarshalled during export. OpenshiftID *OpenshiftID `json:"openshift,omitempty"` // Groups are unmarshalled during export. - Groups *Groups `json:"groups,omitempty"` + Groups *Groups `json:"groups,omitempty"` + DeployTargetConfig *DeployTargetConfig `json:"deployTargetsConfigs"` } // ProjectConfig contains project configuration. diff --git a/pkg/api/projects.go b/pkg/api/projects.go index 7bd31aa6..54a59853 100644 --- a/pkg/api/projects.go +++ b/pkg/api/projects.go @@ -21,6 +21,13 @@ func (api *Interface) GetOpenShiftInfoForProject(project Project) ([]byte, error routerPattern } gitUrl + deployTargetConfigs{ + deployTarget{ + id + name + token + } + } privateKey subfolder openshiftProjectPattern From 7adbefa66667078d540e25687ea97825af26a2f0 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Sun, 11 Dec 2022 15:58:12 -0800 Subject: [PATCH 06/17] Added DeployTargetConfigs to export command --- .../client/_lgraphql/projectByName.graphql | 15 ++++++++++--- internal/lagoon/client/lgraphql/lgraphql.go | 6 +++--- internal/schema/config.go | 21 +++++++++++++++---- internal/schema/deploytargetconfig.go | 12 +++++------ internal/schema/project.go | 4 ++-- internal/schema/testdata/ciBranchPicky.json | 1 + .../schema/testdata/newNotifications.json | 1 + .../schema/testdata/noNewNotifications.json | 1 + internal/schema/testdata/rocketChat.json | 1 + internal/schema/testdata/singleProject.json | 1 + pkg/graphql/main.go | 9 ++++++++ 11 files changed, 54 insertions(+), 18 deletions(-) diff --git a/internal/lagoon/client/_lgraphql/projectByName.graphql b/internal/lagoon/client/_lgraphql/projectByName.graphql index 974c3244..eb93fad0 100644 --- a/internal/lagoon/client/_lgraphql/projectByName.graphql +++ b/internal/lagoon/client/_lgraphql/projectByName.graphql @@ -16,14 +16,23 @@ query ( autoIdle factsUi problemsUi - deployTargetConfigs{ - id - project + deployTargetConfigs { + branches deployTarget{ id name token } + id + project{ + autoIdle + gitUrl + name + productionEnvironment + storageCalc + } + pullrequests + weight } groups{ ... on Group { diff --git a/internal/lagoon/client/lgraphql/lgraphql.go b/internal/lagoon/client/lgraphql/lgraphql.go index ced6f90f..4810ad11 100644 --- a/internal/lagoon/client/lgraphql/lgraphql.go +++ b/internal/lagoon/client/lgraphql/lgraphql.go @@ -30,7 +30,7 @@ // _lgraphql/listDeployTargets.graphql (231B) // _lgraphql/me.graphql (232B) // _lgraphql/minimalProjectByName.graphql (332B) -// _lgraphql/projectByName.graphql (1.779kB) +// _lgraphql/projectByName.graphql (2.123kB) // _lgraphql/projectByNameMetadata.graphql (121B) // _lgraphql/projectsByMetadata.graphql (486B) // _lgraphql/removeProjectMetadataByKey.graphql (254B) @@ -707,7 +707,7 @@ func _lgraphqlMinimalprojectbynameGraphql() (*asset, error) { return a, nil } -var __lgraphqlProjectbynameGraphql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x6e\xdb\x30\x0c\xbd\xe7\x2b\xb8\x62\x87\xee\x62\x6c\x3b\xee\xb6\x16\x41\x37\x74\xcb\x8a\x36\xcd\xb5\x60\x64\x3a\xd6\x22\x4b\x0e\x45\x7b\x30\x82\xfc\xfb\xe0\x04\xb3\x65\xd9\x4d\x7b\x18\xaa\x4b\x94\x47\xfa\xf1\xe9\x49\xe4\xae\x22\x6e\xe0\x72\x06\xf0\xde\x62\x41\x5f\xe0\x41\x58\xdb\xcd\xbb\x0f\xb0\x9f\x01\x00\x94\xec\x7e\x93\x92\xab\x66\x81\x05\x5d\x1e\x21\x80\x53\xe6\xf1\x83\x7f\x79\xed\xd2\x69\xb7\x6d\x43\xdd\x1f\xac\xc4\x7d\x4f\x4d\x0f\xac\x19\xad\xca\xc9\x77\x40\x59\x19\xc3\xb4\xab\xc8\x4b\x00\xb2\xae\x51\xe8\x96\x9a\x00\x72\x69\xa5\x44\x3b\x3b\xb7\xb5\x66\x67\x0b\xb2\xd2\x45\xbd\x38\xc6\x0d\x5d\xa3\x51\x1d\xe6\x4a\xb2\x3e\xd7\x99\xdc\x9d\x0e\x72\x87\x22\xc4\xb6\x8b\xa7\x54\x93\x71\x65\xcb\x13\x50\xfa\x1f\xba\xd0\x3d\xf1\x46\xcb\x23\x9b\xe7\xcf\x93\xa1\x12\xff\xa8\x43\x99\x6b\x43\x45\x08\x6d\xd8\x55\xa5\xef\xbd\x02\x48\x92\x04\x9c\x85\x9b\x36\x00\x61\x00\xe0\xe9\x49\x9a\x92\x06\x1e\x8e\x4c\x6d\x57\x41\xc5\x9a\xd8\x0f\x3f\x06\xa8\x3c\x71\x8c\x01\x50\x81\xda\x8c\x50\xef\xf3\x5b\x6a\x46\x14\x93\xe5\x4e\x6b\x4b\xcd\xb2\x29\x9f\x89\xac\xd0\x54\xe3\xd0\x61\x84\x64\x9a\xbd\x2c\xa6\x0a\x18\x9c\x0c\xc4\x14\xec\xcc\x30\x25\x4c\xe8\xf7\xfd\xce\x3a\xd1\x99\x56\xd8\x3e\x1e\x0f\x13\x17\xb1\x08\x12\x1e\x0c\xaa\xed\xeb\x2e\xe5\x0f\xad\x73\xe7\xb6\xe7\x2f\x4a\xe5\x68\x2d\x99\x49\x89\x93\x02\xee\x9d\xda\x92\x5c\xe7\x28\x6f\xa6\x62\xbf\x07\x9d\x01\x96\x7a\x45\x7c\xc3\x84\x42\xbc\xcc\xd1\xfe\xe2\xf9\xae\x42\x03\x09\x5c\x7c\x4a\x3e\x27\x1f\x2f\xe0\xf0\x82\xf6\x79\xfb\xd0\x5e\x27\xfb\xf8\x26\xbf\xa6\x29\x93\xf7\xe7\xb4\xbf\x50\xf1\xa7\x56\xec\xbc\xcb\x64\x49\x58\xf8\xff\xe6\x58\xe4\x0e\xd9\x34\x3c\xfb\x61\x3c\x63\xc2\xc2\xc1\x30\xec\x33\xc9\xd6\x2b\x64\x8d\x6b\x43\x43\x99\x51\x65\xaf\xdc\xa0\xc3\xea\x41\x5b\x0d\xf8\xba\x91\x75\x8e\x2f\xa5\xd2\xb8\xb8\x6d\x4f\xe0\x15\x7a\xba\xa7\x6c\x84\x7f\x23\x4c\xa7\xf0\xa5\x96\x41\xe7\x05\x12\x22\xfe\x78\xf4\x46\x5d\x3d\x9a\xa2\x67\xec\x99\x78\xcc\xb1\x45\xb1\x49\x53\x53\xa0\xfd\x3d\xcc\xfe\x06\x00\x00\xff\xff\x6c\x32\x0c\xee\xf3\x06\x00\x00") +var __lgraphqlProjectbynameGraphql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xc1\x6e\xdb\x30\x0c\xbd\xe7\x2b\xb8\x62\x87\xee\x62\x6c\x3b\xee\xb6\x06\x41\x37\x74\xcb\x8a\x36\xcd\xb5\x60\x6c\xda\xd6\x22\x4b\x8e\x44\xa7\x30\x02\xff\xfb\xe0\x24\xb3\x25\x5b\x4e\x7b\x18\xe6\x4b\x9c\x47\xe9\xe9\xf1\x91\xa2\x77\x15\x99\x1a\xae\x67\x00\xef\x15\x16\xf4\x05\x1e\xd9\x08\x95\xbd\xfb\x00\x87\x19\x00\x40\x69\xf4\x6f\x8a\xf9\xa6\x5e\x62\x41\xd7\x47\x08\xe0\xb4\xf2\xb8\xe1\xef\xba\xf6\x11\x49\xf7\xda\x86\xba\x3f\x58\xb1\xfe\x9e\xc8\x1e\xd8\x18\x54\x71\x4e\xb6\x03\xca\x4a\x4a\x43\xbb\x8a\x2c\x3b\xa0\x11\x7b\x64\xba\xa3\xda\x81\x74\x52\xc5\x2c\xb4\x5a\xa8\xbd\x30\x5a\x15\xa4\xb8\x8b\x5a\xd6\x06\x33\x9a\xa3\x8c\x3b\x4c\x97\xa4\x6c\x2e\x52\xbe\x3f\x25\x72\x8f\xcc\x64\x54\x17\x4f\x68\x4f\x52\x97\x2d\x8f\x43\x69\x7f\x88\x42\xf4\xc4\x99\xe0\x27\x23\xa7\xf3\x49\x31\x66\xfb\x24\x5c\x99\x1b\x49\x85\x0b\x25\x54\x4a\x5d\xaf\xd0\x64\xc4\x73\xad\x52\x91\x59\xc7\xb9\x80\x25\xfe\x16\x77\xa9\x67\xf4\xc8\xec\xf6\x61\xbd\x25\xe5\x20\xcd\x6c\x62\xef\xb9\xba\x3e\xfb\x28\xbd\x80\x05\xc1\x63\x2f\x57\x07\x26\x2a\xe4\xcb\x0b\x76\x02\xc0\x0b\x89\x2c\xef\xb9\xfa\x1d\x99\xd1\x55\x69\xdd\x04\xa2\x28\x02\xad\xe0\xb6\x0d\x80\x9f\xd9\xf3\x33\xd7\x25\x8d\x74\x8f\x80\x82\x8a\x0d\x19\xeb\x6f\x06\xa8\x2c\x99\x21\x06\x40\x05\x0a\x39\x42\xad\xcd\xef\xa8\x1e\x51\x04\x8f\x3b\x3d\x5b\xaa\x57\x75\x39\x11\x59\xa3\xac\xc6\xa1\x66\x84\xa4\xc2\x58\x5e\x86\x0e\x90\x18\x0c\x0c\x29\x8c\x1e\x14\xbe\x09\x16\xaa\x7f\x53\x9a\x45\x2a\x62\x6c\xcb\xee\xb7\xf4\xb9\x10\x4b\x67\xc1\xa3\xc4\x78\xfb\xb6\xa2\xbc\xd0\x26\xd7\x7a\x7b\xb9\x50\x71\x8e\x4a\x91\x9c\xe8\xa5\x80\x80\x07\x1d\x6f\x89\xe7\x39\xf2\x7f\x53\x71\x38\x80\x48\x01\x4b\xb1\x26\x73\x6b\x08\x99\xcc\x2a\x47\xf5\xcb\x2c\x76\x15\x4a\x88\xe0\xea\x53\xf4\x39\xfa\x78\x05\xcd\x2b\xda\x17\x6d\xa3\xbd\x4d\xf6\xb1\x27\xbf\x26\x89\x21\x6b\x2f\x69\x7f\xe5\xc4\x9f\x22\x36\xda\xea\x94\x57\x84\x85\xfd\x67\x8e\x0d\xdc\x21\x95\xb8\xb9\x37\xe3\xd9\x7d\x08\xcf\xaf\x7e\x25\xa9\xfd\x1a\x8d\xc0\x8d\x24\x5f\xe6\xe0\x64\x1b\x6b\xef\x86\xed\xbd\x6b\xe5\xf1\x75\x9f\x82\x4b\x7c\xe7\x11\xed\x5f\xdb\x13\x78\x83\x96\x1e\x28\x1d\xe1\xdf\x08\x93\x10\xbe\x12\xec\xdd\x3c\x47\xc2\x80\x7f\xf8\x49\x1b\xdc\xea\xc0\xf8\x9e\xb4\x27\xd0\xcc\x43\x8b\x86\x26\x85\xa6\x40\xfb\xdb\xcc\xfe\x04\x00\x00\xff\xff\x87\x73\x32\xb1\x4b\x08\x00\x00") func _lgraphqlProjectbynameGraphqlBytes() ([]byte, error) { return bindataRead( @@ -723,7 +723,7 @@ func _lgraphqlProjectbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa8, 0xec, 0x7e, 0xd4, 0xa, 0x7e, 0xb7, 0xf7, 0x1c, 0xd9, 0x41, 0xe8, 0xa7, 0xe5, 0x6e, 0x93, 0xe2, 0x4b, 0xaf, 0x2f, 0xdb, 0x7, 0x84, 0x68, 0x5d, 0x29, 0x11, 0x1b, 0xed, 0x3, 0x5a, 0x73}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x46, 0x98, 0x25, 0x98, 0x83, 0x85, 0x20, 0x45, 0x7e, 0xad, 0x80, 0xde, 0x75, 0x47, 0x13, 0x10, 0x8c, 0x31, 0x6b, 0xda, 0x79, 0x7a, 0x86, 0x3b, 0xa2, 0xc8, 0x3b, 0xea, 0x2a, 0x78, 0xcf, 0xe2}} return a, nil } diff --git a/internal/schema/config.go b/internal/schema/config.go index 37585c42..a8780af4 100644 --- a/internal/schema/config.go +++ b/internal/schema/config.go @@ -14,10 +14,11 @@ import ( // Fields for comprising structs are dictated by the add* Lagoon APIs. type Config struct { // API objects - Projects []ProjectConfig `json:"projects,omitempty"` - Groups []GroupConfig `json:"groups,omitempty"` - Users []User `json:"users,omitempty"` - Notifications *NotificationsConfig `json:"notifications,omitempty"` + Projects []ProjectConfig `json:"projects,omitempty"` + Groups []GroupConfig `json:"groups,omitempty"` + Users []User `json:"users,omitempty"` + Notifications *NotificationsConfig `json:"notifications,omitempty"` + DeployTargetConfig []DeployTargetConfig `json:"deployTargetConfigs,omitempty"` } // UnmarshalJSON implements json.Unmarshaler interface to control how lagoon @@ -98,10 +99,12 @@ func ProjectsToConfig( rocketChatNotifications := map[string]bool{} emailNotifications := map[string]bool{} microsoftTeamsNotifications := map[string]bool{} + deployTargetConfigs := map[uint]bool{} for _, project := range projects { projectConfig := ProjectConfig{Project: project, Notifications: &ProjectNotifications{}} + for _, group := range project.Groups.Groups { // project group users are appended to the project directly because this // group is automatically created in Lagoon. @@ -197,6 +200,16 @@ func ProjectsToConfig( config.Notifications.MicrosoftTeams = append(config.Notifications.MicrosoftTeams, n) } + + for _, deployTargetConfig := range project.DeployTargetConfig { + if project.Name == deployTargetConfig.Project.Name { + projectConfig.DeployTargetConfig = append(projectConfig.DeployTargetConfig, + deployTargetConfig) + deployTargetConfigs[deployTargetConfig.ID] = true + config.DeployTargetConfig = append(config.DeployTargetConfig, deployTargetConfig) + + } + } minimiseProjectConfig(&projectConfig, exclude) config.Projects = append(config.Projects, projectConfig) } diff --git a/internal/schema/deploytargetconfig.go b/internal/schema/deploytargetconfig.go index 2f06a34a..76a67846 100644 --- a/internal/schema/deploytargetconfig.go +++ b/internal/schema/deploytargetconfig.go @@ -3,12 +3,12 @@ package schema // DeployTargetConfig . type DeployTargetConfig struct { ID uint `json:"id"` - Project Project `json:"project"` - Weight uint `json:"weight"` - Branches string `json:"branches"` - Pullrequests string `json:"pullrequests"` - DeployTarget DeployTarget `json:"deployTarget"` - DeployTargetProjectPattern string `json:"deployTargetProjectPattern"` + Project Project `json:"project,omitempty"` + Weight uint `json:"weight,omitempty"` + Branches string `json:"branches,omitempty"` + Pullrequests string `json:"pullrequests,omitempty"` + DeployTarget DeployTarget `json:"deployTarget,omitempty"` + DeployTargetProjectPattern string `json:"deployTargetProjectPattern,omitempty"` } // AddDeployTargetConfigInput . diff --git a/internal/schema/project.go b/internal/schema/project.go index 40baf195..5af8e390 100644 --- a/internal/schema/project.go +++ b/internal/schema/project.go @@ -33,8 +33,8 @@ type Project struct { // Openshift is unmarshalled during export. OpenshiftID *OpenshiftID `json:"openshift,omitempty"` // Groups are unmarshalled during export. - Groups *Groups `json:"groups,omitempty"` - DeployTargetConfig *DeployTargetConfig `json:"deployTargetsConfigs"` + Groups *Groups `json:"groups,omitempty"` + DeployTargetConfig []DeployTargetConfig `json:"deployTargetConfigs,omitempty"` } // ProjectConfig contains project configuration. diff --git a/internal/schema/testdata/ciBranchPicky.json b/internal/schema/testdata/ciBranchPicky.json index 42f34131..f2f58984 100644 --- a/internal/schema/testdata/ciBranchPicky.json +++ b/internal/schema/testdata/ciBranchPicky.json @@ -11,6 +11,7 @@ "storageCalc": 1, "openshiftProjectPattern": null, "developmentEnvironmentsLimit": 5, + "deployTargetConfigs": null, "gitUrl": "ssh://git@192.168.42.1:2222/git/node.git", "groups": [ { diff --git a/internal/schema/testdata/newNotifications.json b/internal/schema/testdata/newNotifications.json index 0bdb2ecb..5ec2b40e 100644 --- a/internal/schema/testdata/newNotifications.json +++ b/internal/schema/testdata/newNotifications.json @@ -11,6 +11,7 @@ "storageCalc": 1, "openshiftProjectPattern": null, "developmentEnvironmentsLimit": 5, + "deployTargetConfigs": null, "gitUrl": "ssh://git@192.168.42.1:2222/git/github.git", "groups": [ { diff --git a/internal/schema/testdata/noNewNotifications.json b/internal/schema/testdata/noNewNotifications.json index 6fb7cfb0..911038b1 100644 --- a/internal/schema/testdata/noNewNotifications.json +++ b/internal/schema/testdata/noNewNotifications.json @@ -11,6 +11,7 @@ "storageCalc": 1, "openshiftProjectPattern": null, "developmentEnvironmentsLimit": 5, + "deployTargetConfigs": null, "gitUrl": "ssh://git@192.168.42.1:2222/git/github.git", "groups": [ { diff --git a/internal/schema/testdata/rocketChat.json b/internal/schema/testdata/rocketChat.json index b3bbf81c..57364909 100644 --- a/internal/schema/testdata/rocketChat.json +++ b/internal/schema/testdata/rocketChat.json @@ -10,6 +10,7 @@ "storageCalc": 1, "openshiftProjectPattern": "lagoon", "developmentEnvironmentsLimit": 5, + "deployTargetConfigs": null, "gitUrl": "git@github.com:uselagoon/lagoon.git", "groups": [ { diff --git a/internal/schema/testdata/singleProject.json b/internal/schema/testdata/singleProject.json index 67c80fd2..54714932 100644 --- a/internal/schema/testdata/singleProject.json +++ b/internal/schema/testdata/singleProject.json @@ -10,6 +10,7 @@ "storageCalc": 1, "openshiftProjectPattern": null, "developmentEnvironmentsLimit": 10, + "deployTargetConfigs": null, "gitUrl": "git@github.amazee.io:foo-bar/bananas-au.git", "groups": [ { diff --git a/pkg/graphql/main.go b/pkg/graphql/main.go index 908d954b..2a12e897 100644 --- a/pkg/graphql/main.go +++ b/pkg/graphql/main.go @@ -53,6 +53,15 @@ var ProjectByNameFragment = `fragment Project on Project { problemsUi factsUi productionEnvironment + deployTargetConfigs{ + id + deployTarget{ + id + name + token + } + + } environments { id name From 3eb4894d03c4bf307f89e06f73b9c6ba51070980 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Sun, 11 Dec 2022 16:07:30 -0800 Subject: [PATCH 07/17] test --- docs/commands/lagoon_update_variable.md | 42 +++++++++++++++++++ .../addOrUpdateEnvVariableByName.graphql | 10 +++++ .../variables/deleteEnvVariableByName.graphql | 5 +++ ...vVariablesByProjectEnvironmentName.graphql | 10 +++++ 4 files changed, 67 insertions(+) create mode 100644 docs/commands/lagoon_update_variable.md create mode 100644 internal/lagoon/client/_lgraphql/variables/addOrUpdateEnvVariableByName.graphql create mode 100644 internal/lagoon/client/_lgraphql/variables/deleteEnvVariableByName.graphql create mode 100644 internal/lagoon/client/_lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql diff --git a/docs/commands/lagoon_update_variable.md b/docs/commands/lagoon_update_variable.md new file mode 100644 index 00000000..83d8ff86 --- /dev/null +++ b/docs/commands/lagoon_update_variable.md @@ -0,0 +1,42 @@ +## lagoon update variable + +Add or update a variable to an environment or project + +### Synopsis + +Add or update a variable to an environment or project + +``` +lagoon update variable [flags] +``` + +### Options + +``` + -h, --help help for variable + -N, --name string Name of the variable to add + -S, --scope string Scope of the variable[global, build, runtime, container_registry, internal_container_registry] + -V, --value string Value of the variable to add +``` + +### Options inherited from parent commands + +``` + --config-file string Path to the config file to use (must be *.yml or *.yaml) + --debug Enable debugging output (if supported) + -e, --environment string Specify an environment to use + --force Force yes on prompts (if supported) + -l, --lagoon string The Lagoon instance to interact with + --no-header No header on table (if supported) + --output-csv Output as CSV (if supported) + --output-json Output as JSON (if supported) + --pretty Make JSON pretty (if supported) + -p, --project string Specify a project to use + --skip-update-check Skip checking for updates + -i, --ssh-key string Specify path to a specific SSH key to use for lagoon authentication +``` + +### SEE ALSO + +* [lagoon update](lagoon_update.md) - Update a resource + diff --git a/internal/lagoon/client/_lgraphql/variables/addOrUpdateEnvVariableByName.graphql b/internal/lagoon/client/_lgraphql/variables/addOrUpdateEnvVariableByName.graphql new file mode 100644 index 00000000..83d5e5f5 --- /dev/null +++ b/internal/lagoon/client/_lgraphql/variables/addOrUpdateEnvVariableByName.graphql @@ -0,0 +1,10 @@ +mutation ( + $input: EnvVariableByNameInput! +) { + addOrUpdateEnvVariableByName(input: $input) { + id + name + value + scope + } +} diff --git a/internal/lagoon/client/_lgraphql/variables/deleteEnvVariableByName.graphql b/internal/lagoon/client/_lgraphql/variables/deleteEnvVariableByName.graphql new file mode 100644 index 00000000..e1a87d41 --- /dev/null +++ b/internal/lagoon/client/_lgraphql/variables/deleteEnvVariableByName.graphql @@ -0,0 +1,5 @@ +mutation ( + $input: DeleteEnvVariableByNameInput! +) { + deleteEnvVariableByName(input: $input) +} diff --git a/internal/lagoon/client/_lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql b/internal/lagoon/client/_lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql new file mode 100644 index 00000000..f24d0450 --- /dev/null +++ b/internal/lagoon/client/_lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql @@ -0,0 +1,10 @@ +query ( + $input: EnvVariableByProjectEnvironmentNameInput! +){ + getEnvVariablesByProjectEnvironmentName(input: $input) { + id + name + value + scope + } +} From 7af371bbcf8b9b06f754dca48e324e5df9bb4283 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Sun, 11 Dec 2022 16:07:52 -0800 Subject: [PATCH 08/17] test --- internal/lagoon/variables.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 internal/lagoon/variables.go diff --git a/internal/lagoon/variables.go b/internal/lagoon/variables.go new file mode 100644 index 00000000..e07c7be4 --- /dev/null +++ b/internal/lagoon/variables.go @@ -0,0 +1,29 @@ +package lagoon + +import ( + "context" + + "github.com/uselagoon/lagoon-cli/internal/schema" +) + +type Variables interface { + AddOrUpdateEnvVariableByName(ctx context.Context, in *schema.EnvVariableByNameInput, envvar *schema.UpdateEnvVarResponse) error + DeleteEnvVariableByName(ctx context.Context, in *schema.DeleteEnvVariableByNameInput, envvar *schema.DeleteEnvVarResponse) error + GetEnvVariablesByProjectEnvironmentName(ctx context.Context, in *schema.EnvVariableByProjectEnvironmentNameInput, envvar *[]schema.EnvKeyValue) error +} + +func AddOrUpdateEnvVariableByName(ctx context.Context, in *schema.EnvVariableByNameInput, v Variables) (*schema.UpdateEnvVarResponse, error) { + envvar := schema.UpdateEnvVarResponse{} + return &envvar, v.AddOrUpdateEnvVariableByName(ctx, in, &envvar) +} + +func DeleteEnvVariableByName(ctx context.Context, in *schema.DeleteEnvVariableByNameInput, v Variables) (*schema.DeleteEnvVarResponse, error) { + envvar := schema.DeleteEnvVarResponse{} + return &envvar, v.DeleteEnvVariableByName(ctx, in, &envvar) +} + +// ListEnvVars gets info of envvars in lagoon. +func GetEnvVariablesByProjectEnvironmentName(ctx context.Context, in *schema.EnvVariableByProjectEnvironmentNameInput, v Variables) (*[]schema.EnvKeyValue, error) { + envvar := []schema.EnvKeyValue{} + return &envvar, v.GetEnvVariablesByProjectEnvironmentName(ctx, in, &envvar) +} From 44603aa5e71e436d8bc6e6940146e49112569aa9 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Sun, 11 Dec 2022 16:17:08 -0800 Subject: [PATCH 09/17] added deployTargetConfigs --- .../client/_lgraphql/projectByName.graphql | 3 - internal/lagoon/client/lgraphql/lgraphql.go | 185 +++++------------- internal/mock/mock_importer.go | 183 ++++++++--------- internal/mock/mock_me.go | 15 +- internal/schema/config.go | 3 +- 5 files changed, 149 insertions(+), 240 deletions(-) diff --git a/internal/lagoon/client/_lgraphql/projectByName.graphql b/internal/lagoon/client/_lgraphql/projectByName.graphql index d4b2909a..eb93fad0 100644 --- a/internal/lagoon/client/_lgraphql/projectByName.graphql +++ b/internal/lagoon/client/_lgraphql/projectByName.graphql @@ -16,7 +16,6 @@ query ( autoIdle factsUi problemsUi -<<<<<<< HEAD deployTargetConfigs { branches deployTarget{ @@ -35,8 +34,6 @@ query ( pullrequests weight } -======= ->>>>>>> b6829b1c951f24899e9b832b5d9bc0d7058bc64e groups{ ... on Group { __typename diff --git a/internal/lagoon/client/lgraphql/lgraphql.go b/internal/lagoon/client/lgraphql/lgraphql.go index 8f77203b..b4239f31 100644 --- a/internal/lagoon/client/lgraphql/lgraphql.go +++ b/internal/lagoon/client/lgraphql/lgraphql.go @@ -1,6 +1,5 @@ // Code generated by go-bindata. DO NOT EDIT. // sources: -<<<<<<< HEAD // _lgraphql/addDeployTarget.graphql (869B) // _lgraphql/addDeployTargetConfig.graphql (1.325kB) // _lgraphql/addEnvVariable.graphql (292B) @@ -40,51 +39,10 @@ // _lgraphql/updateDeployTarget.graphql (944B) // _lgraphql/updateDeployTargetConfig.graphql (661B) // _lgraphql/updateProjectMetadata.graphql (337B) +// _lgraphql/variables/addOrUpdateEnvVariableByName.graphql (159B) +// _lgraphql/variables/deleteEnvVariableByName.graphql (100B) +// _lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql (184B) -======= -// _lgraphql/addDeployTarget.graphql -// _lgraphql/addDeployTargetConfig.graphql -// _lgraphql/addEnvVariable.graphql -// _lgraphql/addGroup.graphql -// _lgraphql/addGroupsToProject.graphql -// _lgraphql/addNotificationEmail.graphql -// _lgraphql/addNotificationMicrosoftTeams.graphql -// _lgraphql/addNotificationRocketChat.graphql -// _lgraphql/addNotificationSlack.graphql -// _lgraphql/addNotificationToProject.graphql -// _lgraphql/addOrUpdateEnvironment.graphql -// _lgraphql/addProject.graphql -// _lgraphql/addRestore.graphql -// _lgraphql/addSshKey.graphql -// _lgraphql/addUser.graphql -// _lgraphql/addUserToGroup.graphql -// _lgraphql/backupsForEnvironmentByName.graphql -// _lgraphql/deleteDeployTarget.graphql -// _lgraphql/deleteDeployTargetConfig.graphql -// _lgraphql/deployEnvironmentBranch.graphql -// _lgraphql/deployEnvironmentLatest.graphql -// _lgraphql/deployEnvironmentPromote.graphql -// _lgraphql/deployEnvironmentPullrequest.graphql -// _lgraphql/deployTargetConfigsByProjectId.graphql -// _lgraphql/environmentByName.graphql -// _lgraphql/lagoonSchema.graphql -// _lgraphql/lagoonVersion.graphql -// _lgraphql/listDeployTargets.graphql -// _lgraphql/me.graphql -// _lgraphql/minimalProjectByName.graphql -// _lgraphql/projectByName.graphql -// _lgraphql/projectByNameMetadata.graphql -// _lgraphql/projectsByMetadata.graphql -// _lgraphql/removeProjectMetadataByKey.graphql -// _lgraphql/switchActiveStandby.graphql -// _lgraphql/taskByID.graphql -// _lgraphql/updateDeployTarget.graphql -// _lgraphql/updateDeployTargetConfig.graphql -// _lgraphql/updateProjectMetadata.graphql -// _lgraphql/variables/addOrUpdateEnvVariableByName.graphql -// _lgraphql/variables/deleteEnvVariableByName.graphql -// _lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql ->>>>>>> b6829b1c951f24899e9b832b5d9bc0d7058bc64e package lgraphql import ( @@ -752,11 +710,7 @@ func _lgraphqlMinimalprojectbynameGraphql() (*asset, error) { return a, nil } -<<<<<<< HEAD var __lgraphqlProjectbynameGraphql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xc1\x6e\xdb\x30\x0c\xbd\xe7\x2b\xb8\x62\x87\xee\x62\x6c\x3b\xee\xb6\x06\x41\x37\x74\xcb\x8a\x36\xcd\xb5\x60\x6c\xda\xd6\x22\x4b\x8e\x44\xa7\x30\x02\xff\xfb\xe0\x24\xb3\x25\x5b\x4e\x7b\x18\xe6\x4b\x9c\x47\xe9\xe9\xf1\x91\xa2\x77\x15\x99\x1a\xae\x67\x00\xef\x15\x16\xf4\x05\x1e\xd9\x08\x95\xbd\xfb\x00\x87\x19\x00\x40\x69\xf4\x6f\x8a\xf9\xa6\x5e\x62\x41\xd7\x47\x08\xe0\xb4\xf2\xb8\xe1\xef\xba\xf6\x11\x49\xf7\xda\x86\xba\x3f\x58\xb1\xfe\x9e\xc8\x1e\xd8\x18\x54\x71\x4e\xb6\x03\xca\x4a\x4a\x43\xbb\x8a\x2c\x3b\xa0\x11\x7b\x64\xba\xa3\xda\x81\x74\x52\xc5\x2c\xb4\x5a\xa8\xbd\x30\x5a\x15\xa4\xb8\x8b\x5a\xd6\x06\x33\x9a\xa3\x8c\x3b\x4c\x97\xa4\x6c\x2e\x52\xbe\x3f\x25\x72\x8f\xcc\x64\x54\x17\x4f\x68\x4f\x52\x97\x2d\x8f\x43\x69\x7f\x88\x42\xf4\xc4\x99\xe0\x27\x23\xa7\xf3\x49\x31\x66\xfb\x24\x5c\x99\x1b\x49\x85\x0b\x25\x54\x4a\x5d\xaf\xd0\x64\xc4\x73\xad\x52\x91\x59\xc7\xb9\x80\x25\xfe\x16\x77\xa9\x67\xf4\xc8\xec\xf6\x61\xbd\x25\xe5\x20\xcd\x6c\x62\xef\xb9\xba\x3e\xfb\x28\xbd\x80\x05\xc1\x63\x2f\x57\x07\x26\x2a\xe4\xcb\x0b\x76\x02\xc0\x0b\x89\x2c\xef\xb9\xfa\x1d\x99\xd1\x55\x69\xdd\x04\xa2\x28\x02\xad\xe0\xb6\x0d\x80\x9f\xd9\xf3\x33\xd7\x25\x8d\x74\x8f\x80\x82\x8a\x0d\x19\xeb\x6f\x06\xa8\x2c\x99\x21\x06\x40\x05\x0a\x39\x42\xad\xcd\xef\xa8\x1e\x51\x04\x8f\x3b\x3d\x5b\xaa\x57\x75\x39\x11\x59\xa3\xac\xc6\xa1\x66\x84\xa4\xc2\x58\x5e\x86\x0e\x90\x18\x0c\x0c\x29\x8c\x1e\x14\xbe\x09\x16\xaa\x7f\x53\x9a\x45\x2a\x62\x6c\xcb\xee\xb7\xf4\xb9\x10\x4b\x67\xc1\xa3\xc4\x78\xfb\xb6\xa2\xbc\xd0\x26\xd7\x7a\x7b\xb9\x50\x71\x8e\x4a\x91\x9c\xe8\xa5\x80\x80\x07\x1d\x6f\x89\xe7\x39\xf2\x7f\x53\x71\x38\x80\x48\x01\x4b\xb1\x26\x73\x6b\x08\x99\xcc\x2a\x47\xf5\xcb\x2c\x76\x15\x4a\x88\xe0\xea\x53\xf4\x39\xfa\x78\x05\xcd\x2b\xda\x17\x6d\xa3\xbd\x4d\xf6\xb1\x27\xbf\x26\x89\x21\x6b\x2f\x69\x7f\xe5\xc4\x9f\x22\x36\xda\xea\x94\x57\x84\x85\xfd\x67\x8e\x0d\xdc\x21\x95\xb8\xb9\x37\xe3\xd9\x7d\x08\xcf\xaf\x7e\x25\xa9\xfd\x1a\x8d\xc0\x8d\x24\x5f\xe6\xe0\x64\x1b\x6b\xef\x86\xed\xbd\x6b\xe5\xf1\x75\x9f\x82\x4b\x7c\xe7\x11\xed\x5f\xdb\x13\x78\x83\x96\x1e\x28\x1d\xe1\xdf\x08\x93\x10\xbe\x12\xec\xdd\x3c\x47\xc2\x80\x7f\xf8\x49\x1b\xdc\xea\xc0\xf8\x9e\xb4\x27\xd0\xcc\x43\x8b\x86\x26\x85\xa6\x40\xfb\xdb\xcc\xfe\x04\x00\x00\xff\xff\x87\x73\x32\xb1\x4b\x08\x00\x00") -======= -var __lgraphqlProjectbynameGraphql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x6e\xdb\x30\x0c\xbd\xe7\x2b\xb8\x62\x87\xee\x62\x6c\x3b\xee\xb6\x16\x41\x37\x74\xcb\x8a\x36\xcd\xb5\x60\x64\x3a\xd6\x22\x4b\x0e\x45\x7b\x30\x82\xfc\xfb\xe0\x04\xb3\x65\xd9\x4d\x7b\x18\xaa\x4b\x94\x47\xfa\xf1\xe9\x49\xe4\xae\x22\x6e\xe0\x72\x06\xf0\xde\x62\x41\x5f\xe0\x41\x58\xdb\xcd\xbb\x0f\xb0\x9f\x01\x00\x94\xec\x7e\x93\x92\xab\x66\x81\x05\x5d\x1e\x21\x80\x53\xe6\xf1\x83\x7f\x79\xed\xd2\x69\xb7\x6d\x43\xdd\x1f\xac\xc4\x7d\x4f\x4d\x0f\xac\x19\xad\xca\xc9\x77\x40\x59\x19\xc3\xb4\xab\xc8\x4b\x00\xb2\xae\x51\xe8\x96\x9a\x00\x72\x69\xa5\x44\x3b\x3b\xb7\xb5\x66\x67\x0b\xb2\xd2\x45\xbd\x38\xc6\x0d\x5d\xa3\x51\x1d\xe6\x4a\xb2\x3e\xd7\x99\xdc\x9d\x0e\x72\x87\x22\xc4\xb6\x8b\xa7\x54\x93\x71\x65\xcb\x13\x50\xfa\x1f\xba\xd0\x3d\xf1\x46\xcb\x23\x9b\xe7\xcf\x93\xa1\x12\xff\xa8\x43\x99\x6b\x43\x45\x08\x6d\xd8\x55\xa5\xef\xbd\x02\x48\x92\x04\x9c\x85\x9b\x36\x00\x61\x00\xe0\xe9\x49\x9a\x92\x06\x1e\x8e\x4c\x6d\x57\x41\xc5\x9a\xd8\x0f\x3f\x06\xa8\x3c\x71\x8c\x01\x50\x81\xda\x8c\x50\xef\xf3\x5b\x6a\x46\x14\x93\xe5\x4e\x6b\x4b\xcd\xb2\x29\x9f\x89\xac\xd0\x54\xe3\xd0\x61\x84\x64\x9a\xbd\x2c\xa6\x0a\x18\x9c\x0c\xc4\x14\xec\xcc\x30\x25\x4c\xe8\xf7\xfd\xce\x3a\xd1\x99\x56\xd8\x3e\x1e\x0f\x13\x17\xb1\x08\x12\x1e\x0c\xaa\xed\xeb\x2e\xe5\x0f\xad\x73\xe7\xb6\xe7\x2f\x4a\xe5\x68\x2d\x99\x49\x89\x93\x02\xee\x9d\xda\x92\x5c\xe7\x28\x6f\xa6\x62\xbf\x07\x9d\x01\x96\x7a\x45\x7c\xc3\x84\x42\xbc\xcc\xd1\xfe\xe2\xf9\xae\x42\x03\x09\x5c\x7c\x4a\x3e\x27\x1f\x2f\xe0\xf0\x82\xf6\x79\xfb\xd0\x5e\x27\xfb\xf8\x26\xbf\xa6\x29\x93\xf7\xe7\xb4\xbf\x50\xf1\xa7\x56\xec\xbc\xcb\x64\x49\x58\xf8\xff\xe6\x58\xe4\x0e\xd9\x34\x3c\xfb\x61\x3c\x63\xc2\xc2\xc1\x30\xec\x33\xc9\xd6\x2b\x64\x8d\x6b\x43\x43\x99\x51\x65\xaf\xdc\xa0\xc3\xea\x41\x5b\x0d\xf8\xba\x91\x75\x8e\x2f\xa5\xd2\xb8\xb8\x6d\x4f\xe0\x15\x7a\xba\xa7\x6c\x84\x7f\x23\x4c\xa7\xf0\xa5\x96\x41\xe7\x05\x12\x22\xfe\x78\xf4\x46\x5d\x3d\x9a\xa2\x67\xec\x99\x78\xcc\xb1\x45\xb1\x49\x53\x53\xa0\xfd\x3d\xcc\xfe\x06\x00\x00\xff\xff\x6c\x32\x0c\xee\xf3\x06\x00\x00") ->>>>>>> b6829b1c951f24899e9b832b5d9bc0d7058bc64e func _lgraphqlProjectbynameGraphqlBytes() ([]byte, error) { return bindataRead( @@ -952,7 +906,7 @@ func _lgraphqlVariablesAddorupdateenvvariablebynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/variables/addOrUpdateEnvVariableByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbb, 0x5, 0x9a, 0xe1, 0x52, 0xb6, 0x20, 0x10, 0x57, 0xd4, 0x89, 0xbe, 0x7, 0x86, 0x55, 0x3e, 0x97, 0xbf, 0x40, 0xcb, 0x66, 0x8, 0x8, 0xb0, 0x3f, 0x68, 0xdc, 0x9a, 0xa0, 0x62, 0x6c, 0x5a}} return a, nil } @@ -972,7 +926,7 @@ func _lgraphqlVariablesDeleteenvvariablebynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/variables/deleteEnvVariableByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x37, 0xed, 0x1, 0x52, 0x6f, 0x21, 0x73, 0xcd, 0xde, 0xa8, 0x3, 0xde, 0xab, 0xf2, 0x49, 0x6c, 0x26, 0xad, 0x1, 0xbf, 0xcc, 0x87, 0xb6, 0xb6, 0xdb, 0x8b, 0x2c, 0x21, 0xa7, 0x58, 0xbc, 0x48}} return a, nil } @@ -992,7 +946,7 @@ func _lgraphqlVariablesGetenvvariablesbyprojectenvironmentnameGraphql() (*asset, } info := bindataFileInfo{name: "_lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x56, 0xe9, 0xe2, 0xe4, 0xd9, 0x65, 0x89, 0x3e, 0x6, 0xf4, 0x15, 0x29, 0xeb, 0x4f, 0x7c, 0x33, 0x7a, 0xdd, 0x8e, 0x5c, 0x7d, 0x5b, 0xcb, 0x55, 0xc0, 0xdc, 0x9c, 0x40, 0x93, 0x9d, 0x2f, 0x15}} return a, nil } @@ -1175,94 +1129,51 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ -<<<<<<< HEAD "_lgraphql": {nil, map[string]*bintree{ - "addDeployTarget.graphql": {_lgraphqlAdddeploytargetGraphql, map[string]*bintree{}}, - "addDeployTargetConfig.graphql": {_lgraphqlAdddeploytargetconfigGraphql, map[string]*bintree{}}, - "addEnvVariable.graphql": {_lgraphqlAddenvvariableGraphql, map[string]*bintree{}}, - "addGroup.graphql": {_lgraphqlAddgroupGraphql, map[string]*bintree{}}, - "addGroupsToProject.graphql": {_lgraphqlAddgroupstoprojectGraphql, map[string]*bintree{}}, - "addNotificationEmail.graphql": {_lgraphqlAddnotificationemailGraphql, map[string]*bintree{}}, - "addNotificationMicrosoftTeams.graphql": {_lgraphqlAddnotificationmicrosoftteamsGraphql, map[string]*bintree{}}, - "addNotificationRocketChat.graphql": {_lgraphqlAddnotificationrocketchatGraphql, map[string]*bintree{}}, - "addNotificationSlack.graphql": {_lgraphqlAddnotificationslackGraphql, map[string]*bintree{}}, - "addNotificationToProject.graphql": {_lgraphqlAddnotificationtoprojectGraphql, map[string]*bintree{}}, - "addOrUpdateEnvironment.graphql": {_lgraphqlAddorupdateenvironmentGraphql, map[string]*bintree{}}, - "addProject.graphql": {_lgraphqlAddprojectGraphql, map[string]*bintree{}}, - "addRestore.graphql": {_lgraphqlAddrestoreGraphql, map[string]*bintree{}}, - "addSshKey.graphql": {_lgraphqlAddsshkeyGraphql, map[string]*bintree{}}, - "addUser.graphql": {_lgraphqlAdduserGraphql, map[string]*bintree{}}, - "addUserToGroup.graphql": {_lgraphqlAddusertogroupGraphql, map[string]*bintree{}}, - "backupsForEnvironmentByName.graphql": {_lgraphqlBackupsforenvironmentbynameGraphql, map[string]*bintree{}}, - "deleteDeployTarget.graphql": {_lgraphqlDeletedeploytargetGraphql, map[string]*bintree{}}, - "deleteDeployTargetConfig.graphql": {_lgraphqlDeletedeploytargetconfigGraphql, map[string]*bintree{}}, - "deployEnvironmentBranch.graphql": {_lgraphqlDeployenvironmentbranchGraphql, map[string]*bintree{}}, - "deployEnvironmentLatest.graphql": {_lgraphqlDeployenvironmentlatestGraphql, map[string]*bintree{}}, - "deployEnvironmentPromote.graphql": {_lgraphqlDeployenvironmentpromoteGraphql, map[string]*bintree{}}, - "deployEnvironmentPullrequest.graphql": {_lgraphqlDeployenvironmentpullrequestGraphql, map[string]*bintree{}}, + "addDeployTarget.graphql": {_lgraphqlAdddeploytargetGraphql, map[string]*bintree{}}, + "addDeployTargetConfig.graphql": {_lgraphqlAdddeploytargetconfigGraphql, map[string]*bintree{}}, + "addEnvVariable.graphql": {_lgraphqlAddenvvariableGraphql, map[string]*bintree{}}, + "addGroup.graphql": {_lgraphqlAddgroupGraphql, map[string]*bintree{}}, + "addGroupsToProject.graphql": {_lgraphqlAddgroupstoprojectGraphql, map[string]*bintree{}}, + "addNotificationEmail.graphql": {_lgraphqlAddnotificationemailGraphql, map[string]*bintree{}}, + "addNotificationMicrosoftTeams.graphql": {_lgraphqlAddnotificationmicrosoftteamsGraphql, map[string]*bintree{}}, + "addNotificationRocketChat.graphql": {_lgraphqlAddnotificationrocketchatGraphql, map[string]*bintree{}}, + "addNotificationSlack.graphql": {_lgraphqlAddnotificationslackGraphql, map[string]*bintree{}}, + "addNotificationToProject.graphql": {_lgraphqlAddnotificationtoprojectGraphql, map[string]*bintree{}}, + "addOrUpdateEnvironment.graphql": {_lgraphqlAddorupdateenvironmentGraphql, map[string]*bintree{}}, + "addProject.graphql": {_lgraphqlAddprojectGraphql, map[string]*bintree{}}, + "addRestore.graphql": {_lgraphqlAddrestoreGraphql, map[string]*bintree{}}, + "addSshKey.graphql": {_lgraphqlAddsshkeyGraphql, map[string]*bintree{}}, + "addUser.graphql": {_lgraphqlAdduserGraphql, map[string]*bintree{}}, + "addUserToGroup.graphql": {_lgraphqlAddusertogroupGraphql, map[string]*bintree{}}, + "backupsForEnvironmentByName.graphql": {_lgraphqlBackupsforenvironmentbynameGraphql, map[string]*bintree{}}, + "deleteDeployTarget.graphql": {_lgraphqlDeletedeploytargetGraphql, map[string]*bintree{}}, + "deleteDeployTargetConfig.graphql": {_lgraphqlDeletedeploytargetconfigGraphql, map[string]*bintree{}}, + "deployEnvironmentBranch.graphql": {_lgraphqlDeployenvironmentbranchGraphql, map[string]*bintree{}}, + "deployEnvironmentLatest.graphql": {_lgraphqlDeployenvironmentlatestGraphql, map[string]*bintree{}}, + "deployEnvironmentPromote.graphql": {_lgraphqlDeployenvironmentpromoteGraphql, map[string]*bintree{}}, + "deployEnvironmentPullrequest.graphql": {_lgraphqlDeployenvironmentpullrequestGraphql, map[string]*bintree{}}, "deployTargetConfigsByProjectId.graphql": {_lgraphqlDeploytargetconfigsbyprojectidGraphql, map[string]*bintree{}}, - "environmentByName.graphql": {_lgraphqlEnvironmentbynameGraphql, map[string]*bintree{}}, - "lagoonSchema.graphql": {_lgraphqlLagoonschemaGraphql, map[string]*bintree{}}, - "lagoonVersion.graphql": {_lgraphqlLagoonversionGraphql, map[string]*bintree{}}, - "listDeployTargets.graphql": {_lgraphqlListdeploytargetsGraphql, map[string]*bintree{}}, - "me.graphql": {_lgraphqlMeGraphql, map[string]*bintree{}}, - "minimalProjectByName.graphql": {_lgraphqlMinimalprojectbynameGraphql, map[string]*bintree{}}, - "projectByName.graphql": {_lgraphqlProjectbynameGraphql, map[string]*bintree{}}, - "projectByNameMetadata.graphql": {_lgraphqlProjectbynamemetadataGraphql, map[string]*bintree{}}, - "projectsByMetadata.graphql": {_lgraphqlProjectsbymetadataGraphql, map[string]*bintree{}}, - "removeProjectMetadataByKey.graphql": {_lgraphqlRemoveprojectmetadatabykeyGraphql, map[string]*bintree{}}, - "switchActiveStandby.graphql": {_lgraphqlSwitchactivestandbyGraphql, map[string]*bintree{}}, - "taskByID.graphql": {_lgraphqlTaskbyidGraphql, map[string]*bintree{}}, - "updateDeployTarget.graphql": {_lgraphqlUpdatedeploytargetGraphql, map[string]*bintree{}}, - "updateDeployTargetConfig.graphql": {_lgraphqlUpdatedeploytargetconfigGraphql, map[string]*bintree{}}, - "updateProjectMetadata.graphql": {_lgraphqlUpdateprojectmetadataGraphql, map[string]*bintree{}}, -======= - "_lgraphql": &bintree{nil, map[string]*bintree{ - "addDeployTarget.graphql": &bintree{_lgraphqlAdddeploytargetGraphql, map[string]*bintree{}}, - "addDeployTargetConfig.graphql": &bintree{_lgraphqlAdddeploytargetconfigGraphql, map[string]*bintree{}}, - "addEnvVariable.graphql": &bintree{_lgraphqlAddenvvariableGraphql, map[string]*bintree{}}, - "addGroup.graphql": &bintree{_lgraphqlAddgroupGraphql, map[string]*bintree{}}, - "addGroupsToProject.graphql": &bintree{_lgraphqlAddgroupstoprojectGraphql, map[string]*bintree{}}, - "addNotificationEmail.graphql": &bintree{_lgraphqlAddnotificationemailGraphql, map[string]*bintree{}}, - "addNotificationMicrosoftTeams.graphql": &bintree{_lgraphqlAddnotificationmicrosoftteamsGraphql, map[string]*bintree{}}, - "addNotificationRocketChat.graphql": &bintree{_lgraphqlAddnotificationrocketchatGraphql, map[string]*bintree{}}, - "addNotificationSlack.graphql": &bintree{_lgraphqlAddnotificationslackGraphql, map[string]*bintree{}}, - "addNotificationToProject.graphql": &bintree{_lgraphqlAddnotificationtoprojectGraphql, map[string]*bintree{}}, - "addOrUpdateEnvironment.graphql": &bintree{_lgraphqlAddorupdateenvironmentGraphql, map[string]*bintree{}}, - "addProject.graphql": &bintree{_lgraphqlAddprojectGraphql, map[string]*bintree{}}, - "addRestore.graphql": &bintree{_lgraphqlAddrestoreGraphql, map[string]*bintree{}}, - "addSshKey.graphql": &bintree{_lgraphqlAddsshkeyGraphql, map[string]*bintree{}}, - "addUser.graphql": &bintree{_lgraphqlAdduserGraphql, map[string]*bintree{}}, - "addUserToGroup.graphql": &bintree{_lgraphqlAddusertogroupGraphql, map[string]*bintree{}}, - "backupsForEnvironmentByName.graphql": &bintree{_lgraphqlBackupsforenvironmentbynameGraphql, map[string]*bintree{}}, - "deleteDeployTarget.graphql": &bintree{_lgraphqlDeletedeploytargetGraphql, map[string]*bintree{}}, - "deleteDeployTargetConfig.graphql": &bintree{_lgraphqlDeletedeploytargetconfigGraphql, map[string]*bintree{}}, - "deployEnvironmentBranch.graphql": &bintree{_lgraphqlDeployenvironmentbranchGraphql, map[string]*bintree{}}, - "deployEnvironmentLatest.graphql": &bintree{_lgraphqlDeployenvironmentlatestGraphql, map[string]*bintree{}}, - "deployEnvironmentPromote.graphql": &bintree{_lgraphqlDeployenvironmentpromoteGraphql, map[string]*bintree{}}, - "deployEnvironmentPullrequest.graphql": &bintree{_lgraphqlDeployenvironmentpullrequestGraphql, map[string]*bintree{}}, - "deployTargetConfigsByProjectId.graphql": &bintree{_lgraphqlDeploytargetconfigsbyprojectidGraphql, map[string]*bintree{}}, - "environmentByName.graphql": &bintree{_lgraphqlEnvironmentbynameGraphql, map[string]*bintree{}}, - "lagoonSchema.graphql": &bintree{_lgraphqlLagoonschemaGraphql, map[string]*bintree{}}, - "lagoonVersion.graphql": &bintree{_lgraphqlLagoonversionGraphql, map[string]*bintree{}}, - "listDeployTargets.graphql": &bintree{_lgraphqlListdeploytargetsGraphql, map[string]*bintree{}}, - "me.graphql": &bintree{_lgraphqlMeGraphql, map[string]*bintree{}}, - "minimalProjectByName.graphql": &bintree{_lgraphqlMinimalprojectbynameGraphql, map[string]*bintree{}}, - "projectByName.graphql": &bintree{_lgraphqlProjectbynameGraphql, map[string]*bintree{}}, - "projectByNameMetadata.graphql": &bintree{_lgraphqlProjectbynamemetadataGraphql, map[string]*bintree{}}, - "projectsByMetadata.graphql": &bintree{_lgraphqlProjectsbymetadataGraphql, map[string]*bintree{}}, - "removeProjectMetadataByKey.graphql": &bintree{_lgraphqlRemoveprojectmetadatabykeyGraphql, map[string]*bintree{}}, - "switchActiveStandby.graphql": &bintree{_lgraphqlSwitchactivestandbyGraphql, map[string]*bintree{}}, - "taskByID.graphql": &bintree{_lgraphqlTaskbyidGraphql, map[string]*bintree{}}, - "updateDeployTarget.graphql": &bintree{_lgraphqlUpdatedeploytargetGraphql, map[string]*bintree{}}, - "updateDeployTargetConfig.graphql": &bintree{_lgraphqlUpdatedeploytargetconfigGraphql, map[string]*bintree{}}, - "updateProjectMetadata.graphql": &bintree{_lgraphqlUpdateprojectmetadataGraphql, map[string]*bintree{}}, - "variables": &bintree{nil, map[string]*bintree{ - "addOrUpdateEnvVariableByName.graphql": &bintree{_lgraphqlVariablesAddorupdateenvvariablebynameGraphql, map[string]*bintree{}}, - "deleteEnvVariableByName.graphql": &bintree{_lgraphqlVariablesDeleteenvvariablebynameGraphql, map[string]*bintree{}}, - "getEnvVariablesByProjectEnvironmentName.graphql": &bintree{_lgraphqlVariablesGetenvvariablesbyprojectenvironmentnameGraphql, map[string]*bintree{}}, + "environmentByName.graphql": {_lgraphqlEnvironmentbynameGraphql, map[string]*bintree{}}, + "lagoonSchema.graphql": {_lgraphqlLagoonschemaGraphql, map[string]*bintree{}}, + "lagoonVersion.graphql": {_lgraphqlLagoonversionGraphql, map[string]*bintree{}}, + "listDeployTargets.graphql": {_lgraphqlListdeploytargetsGraphql, map[string]*bintree{}}, + "me.graphql": {_lgraphqlMeGraphql, map[string]*bintree{}}, + "minimalProjectByName.graphql": {_lgraphqlMinimalprojectbynameGraphql, map[string]*bintree{}}, + "projectByName.graphql": {_lgraphqlProjectbynameGraphql, map[string]*bintree{}}, + "projectByNameMetadata.graphql": {_lgraphqlProjectbynamemetadataGraphql, map[string]*bintree{}}, + "projectsByMetadata.graphql": {_lgraphqlProjectsbymetadataGraphql, map[string]*bintree{}}, + "removeProjectMetadataByKey.graphql": {_lgraphqlRemoveprojectmetadatabykeyGraphql, map[string]*bintree{}}, + "switchActiveStandby.graphql": {_lgraphqlSwitchactivestandbyGraphql, map[string]*bintree{}}, + "taskByID.graphql": {_lgraphqlTaskbyidGraphql, map[string]*bintree{}}, + "updateDeployTarget.graphql": {_lgraphqlUpdatedeploytargetGraphql, map[string]*bintree{}}, + "updateDeployTargetConfig.graphql": {_lgraphqlUpdatedeploytargetconfigGraphql, map[string]*bintree{}}, + "updateProjectMetadata.graphql": {_lgraphqlUpdateprojectmetadataGraphql, map[string]*bintree{}}, + "variables": {nil, map[string]*bintree{ + "addOrUpdateEnvVariableByName.graphql": {_lgraphqlVariablesAddorupdateenvvariablebynameGraphql, map[string]*bintree{}}, + "deleteEnvVariableByName.graphql": {_lgraphqlVariablesDeleteenvvariablebynameGraphql, map[string]*bintree{}}, + "getEnvVariablesByProjectEnvironmentName.graphql": {_lgraphqlVariablesGetenvvariablesbyprojectenvironmentnameGraphql, map[string]*bintree{}}, }}, ->>>>>>> b6829b1c951f24899e9b832b5d9bc0d7058bc64e }}, }} diff --git a/internal/mock/mock_importer.go b/internal/mock/mock_importer.go index 358b07bf..603e530c 100644 --- a/internal/mock/mock_importer.go +++ b/internal/mock/mock_importer.go @@ -6,105 +6,106 @@ package mock import ( context "context" + reflect "reflect" + gomock "github.com/golang/mock/gomock" schema "github.com/uselagoon/lagoon-cli/internal/schema" - reflect "reflect" ) -// MockImporter is a mock of Importer interface +// MockImporter is a mock of Importer interface. type MockImporter struct { ctrl *gomock.Controller recorder *MockImporterMockRecorder } -// MockImporterMockRecorder is the mock recorder for MockImporter +// MockImporterMockRecorder is the mock recorder for MockImporter. type MockImporterMockRecorder struct { mock *MockImporter } -// NewMockImporter creates a new mock instance +// NewMockImporter creates a new mock instance. func NewMockImporter(ctrl *gomock.Controller) *MockImporter { mock := &MockImporter{ctrl: ctrl} mock.recorder = &MockImporterMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use +// EXPECT returns an object that allows the caller to indicate expected use. func (m *MockImporter) EXPECT() *MockImporterMockRecorder { return m.recorder } -// AddGroup mocks base method -func (m *MockImporter) AddGroup(arg0 context.Context, arg1 *schema.AddGroupInput, arg2 *schema.Group) error { +// AddEnvVariable mocks base method. +func (m *MockImporter) AddEnvVariable(arg0 context.Context, arg1 *schema.EnvVariableInput, arg2 *schema.EnvKeyValue) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddGroup", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddEnvVariable", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddGroup indicates an expected call of AddGroup -func (mr *MockImporterMockRecorder) AddGroup(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddEnvVariable indicates an expected call of AddEnvVariable. +func (mr *MockImporterMockRecorder) AddEnvVariable(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroup", reflect.TypeOf((*MockImporter)(nil).AddGroup), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEnvVariable", reflect.TypeOf((*MockImporter)(nil).AddEnvVariable), arg0, arg1, arg2) } -// AddUser mocks base method -func (m *MockImporter) AddUser(arg0 context.Context, arg1 *schema.AddUserInput, arg2 *schema.User) error { +// AddGroup mocks base method. +func (m *MockImporter) AddGroup(arg0 context.Context, arg1 *schema.AddGroupInput, arg2 *schema.Group) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddUser", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddGroup", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddUser indicates an expected call of AddUser -func (mr *MockImporterMockRecorder) AddUser(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddGroup indicates an expected call of AddGroup. +func (mr *MockImporterMockRecorder) AddGroup(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockImporter)(nil).AddUser), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroup", reflect.TypeOf((*MockImporter)(nil).AddGroup), arg0, arg1, arg2) } -// AddSSHKey mocks base method -func (m *MockImporter) AddSSHKey(arg0 context.Context, arg1 *schema.AddSSHKeyInput, arg2 *schema.SSHKey) error { +// AddGroupsToProject mocks base method. +func (m *MockImporter) AddGroupsToProject(arg0 context.Context, arg1 *schema.ProjectGroupsInput, arg2 *schema.Project) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddSSHKey", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddGroupsToProject", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddSSHKey indicates an expected call of AddSSHKey -func (mr *MockImporterMockRecorder) AddSSHKey(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddGroupsToProject indicates an expected call of AddGroupsToProject. +func (mr *MockImporterMockRecorder) AddGroupsToProject(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSSHKey", reflect.TypeOf((*MockImporter)(nil).AddSSHKey), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroupsToProject", reflect.TypeOf((*MockImporter)(nil).AddGroupsToProject), arg0, arg1, arg2) } -// AddUserToGroup mocks base method -func (m *MockImporter) AddUserToGroup(arg0 context.Context, arg1 *schema.UserGroupRoleInput, arg2 *schema.Group) error { +// AddNotificationEmail mocks base method. +func (m *MockImporter) AddNotificationEmail(arg0 context.Context, arg1 *schema.AddNotificationEmailInput, arg2 *schema.NotificationEmail) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddUserToGroup", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddNotificationEmail", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddUserToGroup indicates an expected call of AddUserToGroup -func (mr *MockImporterMockRecorder) AddUserToGroup(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddNotificationEmail indicates an expected call of AddNotificationEmail. +func (mr *MockImporterMockRecorder) AddNotificationEmail(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserToGroup", reflect.TypeOf((*MockImporter)(nil).AddUserToGroup), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationEmail", reflect.TypeOf((*MockImporter)(nil).AddNotificationEmail), arg0, arg1, arg2) } -// AddNotificationSlack mocks base method -func (m *MockImporter) AddNotificationSlack(arg0 context.Context, arg1 *schema.AddNotificationSlackInput, arg2 *schema.NotificationSlack) error { +// AddNotificationMicrosoftTeams mocks base method. +func (m *MockImporter) AddNotificationMicrosoftTeams(arg0 context.Context, arg1 *schema.AddNotificationMicrosoftTeamsInput, arg2 *schema.NotificationMicrosoftTeams) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddNotificationSlack", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddNotificationMicrosoftTeams", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddNotificationSlack indicates an expected call of AddNotificationSlack -func (mr *MockImporterMockRecorder) AddNotificationSlack(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddNotificationMicrosoftTeams indicates an expected call of AddNotificationMicrosoftTeams. +func (mr *MockImporterMockRecorder) AddNotificationMicrosoftTeams(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationSlack", reflect.TypeOf((*MockImporter)(nil).AddNotificationSlack), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationMicrosoftTeams", reflect.TypeOf((*MockImporter)(nil).AddNotificationMicrosoftTeams), arg0, arg1, arg2) } -// AddNotificationRocketChat mocks base method +// AddNotificationRocketChat mocks base method. func (m *MockImporter) AddNotificationRocketChat(arg0 context.Context, arg1 *schema.AddNotificationRocketChatInput, arg2 *schema.NotificationRocketChat) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AddNotificationRocketChat", arg0, arg1, arg2) @@ -112,134 +113,134 @@ func (m *MockImporter) AddNotificationRocketChat(arg0 context.Context, arg1 *sch return ret0 } -// AddNotificationRocketChat indicates an expected call of AddNotificationRocketChat +// AddNotificationRocketChat indicates an expected call of AddNotificationRocketChat. func (mr *MockImporterMockRecorder) AddNotificationRocketChat(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationRocketChat", reflect.TypeOf((*MockImporter)(nil).AddNotificationRocketChat), arg0, arg1, arg2) } -// AddNotificationEmail mocks base method -func (m *MockImporter) AddNotificationEmail(arg0 context.Context, arg1 *schema.AddNotificationEmailInput, arg2 *schema.NotificationEmail) error { +// AddNotificationSlack mocks base method. +func (m *MockImporter) AddNotificationSlack(arg0 context.Context, arg1 *schema.AddNotificationSlackInput, arg2 *schema.NotificationSlack) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddNotificationEmail", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddNotificationSlack", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddNotificationEmail indicates an expected call of AddNotificationEmail -func (mr *MockImporterMockRecorder) AddNotificationEmail(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddNotificationSlack indicates an expected call of AddNotificationSlack. +func (mr *MockImporterMockRecorder) AddNotificationSlack(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationEmail", reflect.TypeOf((*MockImporter)(nil).AddNotificationEmail), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationSlack", reflect.TypeOf((*MockImporter)(nil).AddNotificationSlack), arg0, arg1, arg2) } -// AddNotificationMicrosoftTeams mocks base method -func (m *MockImporter) AddNotificationMicrosoftTeams(arg0 context.Context, arg1 *schema.AddNotificationMicrosoftTeamsInput, arg2 *schema.NotificationMicrosoftTeams) error { +// AddNotificationToProject mocks base method. +func (m *MockImporter) AddNotificationToProject(arg0 context.Context, arg1 *schema.AddNotificationToProjectInput, arg2 *schema.Project) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddNotificationMicrosoftTeams", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddNotificationToProject", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddNotificationMicrosoftTeams indicates an expected call of AddNotificationMicrosoftTeams -func (mr *MockImporterMockRecorder) AddNotificationMicrosoftTeams(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddNotificationToProject indicates an expected call of AddNotificationToProject. +func (mr *MockImporterMockRecorder) AddNotificationToProject(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationMicrosoftTeams", reflect.TypeOf((*MockImporter)(nil).AddNotificationMicrosoftTeams), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationToProject", reflect.TypeOf((*MockImporter)(nil).AddNotificationToProject), arg0, arg1, arg2) } -// AddProject mocks base method -func (m *MockImporter) AddProject(arg0 context.Context, arg1 *schema.AddProjectInput, arg2 *schema.Project) error { +// AddOrUpdateEnvironment mocks base method. +func (m *MockImporter) AddOrUpdateEnvironment(arg0 context.Context, arg1 *schema.AddEnvironmentInput, arg2 *schema.Environment) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddProject", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddOrUpdateEnvironment", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddProject indicates an expected call of AddProject -func (mr *MockImporterMockRecorder) AddProject(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddOrUpdateEnvironment indicates an expected call of AddOrUpdateEnvironment. +func (mr *MockImporterMockRecorder) AddOrUpdateEnvironment(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddProject", reflect.TypeOf((*MockImporter)(nil).AddProject), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOrUpdateEnvironment", reflect.TypeOf((*MockImporter)(nil).AddOrUpdateEnvironment), arg0, arg1, arg2) } -// AddEnvVariable mocks base method -func (m *MockImporter) AddEnvVariable(arg0 context.Context, arg1 *schema.EnvVariableInput, arg2 *schema.EnvKeyValue) error { +// AddProject mocks base method. +func (m *MockImporter) AddProject(arg0 context.Context, arg1 *schema.AddProjectInput, arg2 *schema.Project) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddEnvVariable", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddProject", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddEnvVariable indicates an expected call of AddEnvVariable -func (mr *MockImporterMockRecorder) AddEnvVariable(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddProject indicates an expected call of AddProject. +func (mr *MockImporterMockRecorder) AddProject(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEnvVariable", reflect.TypeOf((*MockImporter)(nil).AddEnvVariable), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddProject", reflect.TypeOf((*MockImporter)(nil).AddProject), arg0, arg1, arg2) } -// ProjectByName mocks base method -func (m *MockImporter) ProjectByName(arg0 context.Context, arg1 string, arg2 *schema.Project) error { +// AddSSHKey mocks base method. +func (m *MockImporter) AddSSHKey(arg0 context.Context, arg1 *schema.AddSSHKeyInput, arg2 *schema.SSHKey) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectByName", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddSSHKey", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// ProjectByName indicates an expected call of ProjectByName -func (mr *MockImporterMockRecorder) ProjectByName(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddSSHKey indicates an expected call of AddSSHKey. +func (mr *MockImporterMockRecorder) AddSSHKey(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectByName", reflect.TypeOf((*MockImporter)(nil).ProjectByName), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSSHKey", reflect.TypeOf((*MockImporter)(nil).AddSSHKey), arg0, arg1, arg2) } -// AddOrUpdateEnvironment mocks base method -func (m *MockImporter) AddOrUpdateEnvironment(arg0 context.Context, arg1 *schema.AddEnvironmentInput, arg2 *schema.Environment) error { +// AddUser mocks base method. +func (m *MockImporter) AddUser(arg0 context.Context, arg1 *schema.AddUserInput, arg2 *schema.User) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddOrUpdateEnvironment", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddUser", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddOrUpdateEnvironment indicates an expected call of AddOrUpdateEnvironment -func (mr *MockImporterMockRecorder) AddOrUpdateEnvironment(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddUser indicates an expected call of AddUser. +func (mr *MockImporterMockRecorder) AddUser(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOrUpdateEnvironment", reflect.TypeOf((*MockImporter)(nil).AddOrUpdateEnvironment), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockImporter)(nil).AddUser), arg0, arg1, arg2) } -// EnvironmentByName mocks base method -func (m *MockImporter) EnvironmentByName(arg0 context.Context, arg1 string, arg2 uint, arg3 *schema.Environment) error { +// AddUserToGroup mocks base method. +func (m *MockImporter) AddUserToGroup(arg0 context.Context, arg1 *schema.UserGroupRoleInput, arg2 *schema.Group) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentByName", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "AddUserToGroup", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// EnvironmentByName indicates an expected call of EnvironmentByName -func (mr *MockImporterMockRecorder) EnvironmentByName(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +// AddUserToGroup indicates an expected call of AddUserToGroup. +func (mr *MockImporterMockRecorder) AddUserToGroup(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentByName", reflect.TypeOf((*MockImporter)(nil).EnvironmentByName), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserToGroup", reflect.TypeOf((*MockImporter)(nil).AddUserToGroup), arg0, arg1, arg2) } -// AddGroupsToProject mocks base method -func (m *MockImporter) AddGroupsToProject(arg0 context.Context, arg1 *schema.ProjectGroupsInput, arg2 *schema.Project) error { +// EnvironmentByName mocks base method. +func (m *MockImporter) EnvironmentByName(arg0 context.Context, arg1 string, arg2 uint, arg3 *schema.Environment) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddGroupsToProject", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "EnvironmentByName", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) return ret0 } -// AddGroupsToProject indicates an expected call of AddGroupsToProject -func (mr *MockImporterMockRecorder) AddGroupsToProject(arg0, arg1, arg2 interface{}) *gomock.Call { +// EnvironmentByName indicates an expected call of EnvironmentByName. +func (mr *MockImporterMockRecorder) EnvironmentByName(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroupsToProject", reflect.TypeOf((*MockImporter)(nil).AddGroupsToProject), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentByName", reflect.TypeOf((*MockImporter)(nil).EnvironmentByName), arg0, arg1, arg2, arg3) } -// AddNotificationToProject mocks base method -func (m *MockImporter) AddNotificationToProject(arg0 context.Context, arg1 *schema.AddNotificationToProjectInput, arg2 *schema.Project) error { +// ProjectByName mocks base method. +func (m *MockImporter) ProjectByName(arg0 context.Context, arg1 string, arg2 *schema.Project) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddNotificationToProject", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ProjectByName", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddNotificationToProject indicates an expected call of AddNotificationToProject -func (mr *MockImporterMockRecorder) AddNotificationToProject(arg0, arg1, arg2 interface{}) *gomock.Call { +// ProjectByName indicates an expected call of ProjectByName. +func (mr *MockImporterMockRecorder) ProjectByName(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationToProject", reflect.TypeOf((*MockImporter)(nil).AddNotificationToProject), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectByName", reflect.TypeOf((*MockImporter)(nil).ProjectByName), arg0, arg1, arg2) } diff --git a/internal/mock/mock_me.go b/internal/mock/mock_me.go index 2e09baa8..9d5479cf 100644 --- a/internal/mock/mock_me.go +++ b/internal/mock/mock_me.go @@ -6,35 +6,36 @@ package mock import ( context "context" + reflect "reflect" + gomock "github.com/golang/mock/gomock" schema "github.com/uselagoon/lagoon-cli/internal/schema" - reflect "reflect" ) -// MockMe is a mock of Me interface +// MockMe is a mock of Me interface. type MockMe struct { ctrl *gomock.Controller recorder *MockMeMockRecorder } -// MockMeMockRecorder is the mock recorder for MockMe +// MockMeMockRecorder is the mock recorder for MockMe. type MockMeMockRecorder struct { mock *MockMe } -// NewMockMe creates a new mock instance +// NewMockMe creates a new mock instance. func NewMockMe(ctrl *gomock.Controller) *MockMe { mock := &MockMe{ctrl: ctrl} mock.recorder = &MockMeMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use +// EXPECT returns an object that allows the caller to indicate expected use. func (m *MockMe) EXPECT() *MockMeMockRecorder { return m.recorder } -// Me mocks base method +// Me mocks base method. func (m *MockMe) Me(ctx context.Context, user *schema.User) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Me", ctx, user) @@ -42,7 +43,7 @@ func (m *MockMe) Me(ctx context.Context, user *schema.User) error { return ret0 } -// Me indicates an expected call of Me +// Me indicates an expected call of Me. func (mr *MockMeMockRecorder) Me(ctx, user interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Me", reflect.TypeOf((*MockMe)(nil).Me), ctx, user) diff --git a/internal/schema/config.go b/internal/schema/config.go index 70e7e8bb..ccfa46b4 100644 --- a/internal/schema/config.go +++ b/internal/schema/config.go @@ -203,8 +203,7 @@ func ProjectsToConfig( for _, deployTargetConfig := range project.DeployTargetConfig { if project.Name == deployTargetConfig.Project.Name { - projectConfig.DeployTargetConfig = append(projectConfig.DeployTargetConfig, - deployTargetConfig) + deployTargetConfigs[deployTargetConfig.ID] = true config.DeployTargetConfig = append(config.DeployTargetConfig, deployTargetConfig) From 04df61b033081b1b77785b6ad6f38d3a6cda5e41 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Thu, 22 Dec 2022 09:01:18 -0800 Subject: [PATCH 10/17] deployTargetConfig --- .vscode/launch.json | 16 ++++++++++++++++ internal/schema/.DS_Store | Bin 0 -> 6148 bytes internal/schema/config.go | 18 ++++-------------- 3 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 internal/schema/.DS_Store diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..3d35b0a3 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Package", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "main.go", + "args": ["export", "project", "-p", "bicore-template","--debug","--force","lagoon.yaml"] + } + ] +} \ No newline at end of file diff --git a/internal/schema/.DS_Store b/internal/schema/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ce5034af3670671ed262db639e25fd77adf99e0e GIT binary patch literal 6148 zcmeHK%}T>S5Z-O8-BN@c6nb3nS};~C6fdFH7cim+m70*C!I&*gY7eE5v%Zi|;`2DO zy8(+mcoMNQu=~x<&u->}>6d+v_BY)O@IBS(NKs-#A1|w8lZhypskB@m@W&thp1 zJRsbp0-98ApBUVvgI(G<&thrNq%*EphI#DD)#HWh)xj=xIOCo{>WKkjV3mQo89I3W zpTjS+_L0AuLL*{;82D!l@W#j=4WTG|wtg!Q&squX9vTY9m8gJ#zH$kG0q!Fm?KFOg aI>dPvOM^HI+I2c0T?8~C)DZ)}z`!ScfK3Ac literal 0 HcmV?d00001 diff --git a/internal/schema/config.go b/internal/schema/config.go index ccfa46b4..5abcbf01 100644 --- a/internal/schema/config.go +++ b/internal/schema/config.go @@ -14,11 +14,10 @@ import ( // Fields for comprising structs are dictated by the add* Lagoon APIs. type Config struct { // API objects - Projects []ProjectConfig `json:"projects,omitempty"` - Groups []GroupConfig `json:"groups,omitempty"` - Users []User `json:"users,omitempty"` - Notifications *NotificationsConfig `json:"notifications,omitempty"` - DeployTargetConfig []DeployTargetConfig `json:"deployTargetConfigs,omitempty"` + Projects []ProjectConfig `json:"projects,omitempty"` + Groups []GroupConfig `json:"groups,omitempty"` + Users []User `json:"users,omitempty"` + Notifications *NotificationsConfig `json:"notifications,omitempty"` } // UnmarshalJSON implements json.Unmarshaler interface to control how lagoon @@ -99,7 +98,6 @@ func ProjectsToConfig( rocketChatNotifications := map[string]bool{} emailNotifications := map[string]bool{} microsoftTeamsNotifications := map[string]bool{} - deployTargetConfigs := map[uint]bool{} for _, project := range projects { projectConfig := @@ -201,14 +199,6 @@ func ProjectsToConfig( append(config.Notifications.MicrosoftTeams, n) } - for _, deployTargetConfig := range project.DeployTargetConfig { - if project.Name == deployTargetConfig.Project.Name { - - deployTargetConfigs[deployTargetConfig.ID] = true - config.DeployTargetConfig = append(config.DeployTargetConfig, deployTargetConfig) - - } - } minimiseProjectConfig(&projectConfig, exclude) config.Projects = append(config.Projects, projectConfig) } From 0fe255f60a66169e72f7285157e8b3e54ed474ea Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Wed, 28 Dec 2022 09:16:25 -0800 Subject: [PATCH 11/17] deploytargetconfigs tests updated --- .../schema/testdata/ciBranchPicky.golden.yaml | 15 ++++++++++ internal/schema/testdata/ciBranchPicky.json | 20 ++++++++++++- .../testdata/newNotifications.golden.yaml | 13 ++++++++ .../schema/testdata/newNotifications.json | 18 ++++++++++- .../testdata/noNewNotifications.golden.yaml | 25 ++++++++++++++++ .../schema/testdata/noNewNotifications.json | 30 ++++++++++++++++++- .../schema/testdata/rocketChat.golden.yaml | 15 ++++++++++ internal/schema/testdata/rocketChat.json | 20 ++++++++++++- internal/schema/testdata/singleProject.json | 2 +- 9 files changed, 153 insertions(+), 5 deletions(-) diff --git a/internal/schema/testdata/ciBranchPicky.golden.yaml b/internal/schema/testdata/ciBranchPicky.golden.yaml index 430d2d9b..1fede92b 100644 --- a/internal/schema/testdata/ciBranchPicky.golden.yaml +++ b/internal/schema/testdata/ciBranchPicky.golden.yaml @@ -10,6 +10,21 @@ groups: projects: - autoIdle: 1 branches: ^feature/|^(dev|test|develop|master)$ + deployTargetConfigs: + - branches: qa + deployTarget: + id: 157 + name: test.amazee.io + token: test + id: 2094 + project: + autoIdle: 1 + gitUrl: ssh://git@bitbucket.biscrum.com:7999/wpsites/test.git + name: test-template + productionEnvironment: master + storageCalc: 1 + pullrequests: "false" + weight: 102 environments: - autoIdle: 1 deployBaseRef: master diff --git a/internal/schema/testdata/ciBranchPicky.json b/internal/schema/testdata/ciBranchPicky.json index f2f58984..8a228603 100644 --- a/internal/schema/testdata/ciBranchPicky.json +++ b/internal/schema/testdata/ciBranchPicky.json @@ -11,7 +11,25 @@ "storageCalc": 1, "openshiftProjectPattern": null, "developmentEnvironmentsLimit": 5, - "deployTargetConfigs": null, + "deployTargetConfigs": [ + { + "branches": "qa", + "deployTarget": { + "id": 157, + "name": "test.amazee.io", + "token": "test" }, + "id": 2094, + "project": { + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:7999/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 + }, + "pullrequests": "false", + "weight": 102 + } + ], "gitUrl": "ssh://git@192.168.42.1:2222/git/node.git", "groups": [ { diff --git a/internal/schema/testdata/newNotifications.golden.yaml b/internal/schema/testdata/newNotifications.golden.yaml index ab1754b4..abc6a1a6 100644 --- a/internal/schema/testdata/newNotifications.golden.yaml +++ b/internal/schema/testdata/newNotifications.golden.yaml @@ -17,6 +17,19 @@ notifications: webhook: https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn projects: - autoIdle: 1 + deployTargetConfigs: + - branches: qa + deployTarget: + id: 157 + name: test.amazee.io + token: test + id: 1245 + project: + autoIdle: 1 + gitUrl: ssh://git@bitbucket.biscrum.com:888/wpsites/test.git + name: test-template + productionEnvironment: master + storageCalc: 1 environments: - autoIdle: 1 deployBaseRef: master diff --git a/internal/schema/testdata/newNotifications.json b/internal/schema/testdata/newNotifications.json index 5ec2b40e..14683d88 100644 --- a/internal/schema/testdata/newNotifications.json +++ b/internal/schema/testdata/newNotifications.json @@ -11,7 +11,23 @@ "storageCalc": 1, "openshiftProjectPattern": null, "developmentEnvironmentsLimit": 5, - "deployTargetConfigs": null, + "deployTargetConfigs": [ + { + "branches": "qa", + "deployTarget": { + "id": 157, + "name": "test.amazee.io", + "token": "test" }, + "id": 1245, + "project": { + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:888/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 + } + } + ], "gitUrl": "ssh://git@192.168.42.1:2222/git/github.git", "groups": [ { diff --git a/internal/schema/testdata/noNewNotifications.golden.yaml b/internal/schema/testdata/noNewNotifications.golden.yaml index e81cdf25..fabaab49 100644 --- a/internal/schema/testdata/noNewNotifications.golden.yaml +++ b/internal/schema/testdata/noNewNotifications.golden.yaml @@ -14,6 +14,31 @@ notifications: webhook: https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn projects: - autoIdle: 1 + deployTargetConfigs: + - branches: qa + deployTarget: + id: 157 + name: test.amazee.io + token: test + id: 1245 + project: + autoIdle: 1 + gitUrl: ssh://git@bitbucket.biscrum.com:888/wpsites/test.git + name: test-template + productionEnvironment: master + storageCalc: 1 + - branches: master + deployTarget: + id: 158 + name: test.amazee.io + token: test + id: 1246 + project: + autoIdle: 1 + gitUrl: ssh://git@bitbucket.biscrum.com:889/wpsites/test.git + name: test-template + productionEnvironment: master + storageCalc: 1 environments: - autoIdle: 1 deployBaseRef: master diff --git a/internal/schema/testdata/noNewNotifications.json b/internal/schema/testdata/noNewNotifications.json index 911038b1..54eca8ae 100644 --- a/internal/schema/testdata/noNewNotifications.json +++ b/internal/schema/testdata/noNewNotifications.json @@ -11,7 +11,35 @@ "storageCalc": 1, "openshiftProjectPattern": null, "developmentEnvironmentsLimit": 5, - "deployTargetConfigs": null, + "deployTargetConfigs": [ { + "branches": "qa", + "deployTarget": { + "id": 157, + "name": "test.amazee.io", + "token": "test" }, + "id": 1245, + "project": { + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:888/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 }}, + { + "branches": "master", + "deployTarget": { + "id": 158, + "name": "test.amazee.io", + "token": "test" + }, + "id": 1246, + "project":{ + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:889/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 + } + }], "gitUrl": "ssh://git@192.168.42.1:2222/git/github.git", "groups": [ { diff --git a/internal/schema/testdata/rocketChat.golden.yaml b/internal/schema/testdata/rocketChat.golden.yaml index 78621a73..d1c75fd7 100644 --- a/internal/schema/testdata/rocketChat.golden.yaml +++ b/internal/schema/testdata/rocketChat.golden.yaml @@ -7,6 +7,21 @@ notifications: webhook: https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn projects: - autoIdle: 1 + deployTargetConfigs: + - branches: qa + deployTarget: + id: 157 + name: test.amazee.io + token: test + id: 2094 + project: + autoIdle: 1 + gitUrl: ssh://git@bitbucket.biscrum.com:7999/wpsites/test.git + name: test-template + productionEnvironment: master + storageCalc: 1 + pullrequests: "false" + weight: 102 gitUrl: git@github.com:uselagoon/lagoon.git groups: - kickstart-group diff --git a/internal/schema/testdata/rocketChat.json b/internal/schema/testdata/rocketChat.json index 57364909..1ddf86bc 100644 --- a/internal/schema/testdata/rocketChat.json +++ b/internal/schema/testdata/rocketChat.json @@ -10,7 +10,25 @@ "storageCalc": 1, "openshiftProjectPattern": "lagoon", "developmentEnvironmentsLimit": 5, - "deployTargetConfigs": null, + "deployTargetConfigs": [ + { + "branches": "qa", + "deployTarget": { + "id": 157, + "name": "test.amazee.io", + "token": "test" }, + "id": 2094, + "project": { + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:7999/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 + }, + "pullrequests": "false", + "weight": 102 + } + ], "gitUrl": "git@github.com:uselagoon/lagoon.git", "groups": [ { diff --git a/internal/schema/testdata/singleProject.json b/internal/schema/testdata/singleProject.json index 54714932..34aa7606 100644 --- a/internal/schema/testdata/singleProject.json +++ b/internal/schema/testdata/singleProject.json @@ -10,7 +10,7 @@ "storageCalc": 1, "openshiftProjectPattern": null, "developmentEnvironmentsLimit": 10, - "deployTargetConfigs": null, + "deployTargetConfigs": [], "gitUrl": "git@github.amazee.io:foo-bar/bananas-au.git", "groups": [ { From 9fafc688cc46df7162c970c60c5c820f6cd29eb6 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Wed, 28 Dec 2022 09:27:49 -0800 Subject: [PATCH 12/17] removed launch --- .vscode/launch.json | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 3d35b0a3..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Launch Package", - "type": "go", - "request": "launch", - "mode": "auto", - "program": "main.go", - "args": ["export", "project", "-p", "bicore-template","--debug","--force","lagoon.yaml"] - } - ] -} \ No newline at end of file From b27ef1e39ae110968422e965c18ba437a9256478 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Wed, 4 Jan 2023 11:05:05 -0800 Subject: [PATCH 13/17] changed identation on json files --- internal/schema/testdata/ciBranchPicky.json | 322 +++++++++-------- .../schema/testdata/newNotifications.json | 274 +++++++-------- .../schema/testdata/noNewNotifications.json | 291 ++++++++-------- internal/schema/testdata/rocketChat.json | 146 ++++---- internal/schema/testdata/singleProject.json | 327 +++++++++--------- 5 files changed, 647 insertions(+), 713 deletions(-) diff --git a/internal/schema/testdata/ciBranchPicky.json b/internal/schema/testdata/ciBranchPicky.json index 8a228603..9014a846 100644 --- a/internal/schema/testdata/ciBranchPicky.json +++ b/internal/schema/testdata/ciBranchPicky.json @@ -1,169 +1,155 @@ { - "data": { - "projectByName": { - "id": 23, - "name": "ci-branch-picky", - "autoIdle": 1, - "branches": "^feature/|^(dev|test|develop|master)$", - "pullrequests": "true", - "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\n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\nVwNKKpAumJkAAAAJKHVubmFtZWQpAQI=\n-----END OPENSSH PRIVATE KEY-----\n", - "productionEnvironment": "master", - "storageCalc": 1, - "openshiftProjectPattern": null, - "developmentEnvironmentsLimit": 5, - "deployTargetConfigs": [ - { - "branches": "qa", - "deployTarget": { - "id": 157, - "name": "test.amazee.io", - "token": "test" }, - "id": 2094, - "project": { - "autoIdle": 1, - "gitUrl": "ssh://git@bitbucket.biscrum.com:7999/wpsites/test.git", - "name": "test-template", - "productionEnvironment": "master", - "storageCalc": 1 - }, - "pullrequests": "false", - "weight": 102 - } - ], - "gitUrl": "ssh://git@192.168.42.1:2222/git/node.git", - "groups": [ - { - "__typename": "Group", - "name": "ci-group", - "members": [ - { - "user": { - "email": "ci-customer-user-ecdsa521@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-ecdsa-nistp521", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ecdsa-sha2-nistp521", - "keyValue": "AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAFAX0rkOBwlrXr2rJNxYVi0fRj8IiHBaFCsAM0zO+o2fh+h4EuL1Mx4F237SX5G0zuL8R6Sbf9LrY2lhKZdDpiFdgF7pP1TZ8RuDvKgasppGDEzAIm9+7bmHR118CejWF7llgHD3oz+/aRHTZVpOOaCyTGkF2oPeUejrI74KoPHk3HHpQ==" - } - ], - "firstName": null, - "lastName": null - }, - "role": "OWNER" - }, - { - "user": { - "email": "ci-customer-user-ed25519@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-ed25519", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-ed25519", - "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIMdEs1h19jv2UrbtKcqPDatUxT9lPYcbGlEAbInsY8Ka" - } - ], - "firstName": null, - "lastName": null - }, - "role": "OWNER" - }, - { - "user": { - "email": "ci-customer-user-rsa@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-rsa", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-rsa", - "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" - } - ], - "firstName": null, - "lastName": null - }, - "role": "OWNER" - } - ] - }, - { - "__typename": "Group", - "name": "project-ci-branch-picky", - "members": [ - { - "user": { - "email": "ci-customer-user-rsa@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-rsa", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-rsa", - "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" - } - ], - "firstName": null, - "lastName": null - }, - "role": "MAINTAINER" - } - ] - } - ], - "notifications": [], - "openshift": { - "id": 1 - }, - "envVariables": [], - "environments": [ - { - "name": "master", - "deployType": "branch", - "deployBaseRef": "master", - "deployHeadRef": null, - "deployTitle": null, - "environmentType": "production", - "openshiftProjectName": "ci-branch-picky", - "autoIdle": 1, - "envVariables": [] - }, - { - "name": "develop", - "deployType": "branch", - "deployBaseRef": "develop", - "deployHeadRef": null, - "deployTitle": null, - "environmentType": "development", - "openshiftProjectName": "ci-branch-picky", - "autoIdle": 1, - "envVariables": [] - }, - { - "name": "stage", - "deployType": "branch", - "deployBaseRef": "stage", - "deployHeadRef": null, - "deployTitle": null, - "environmentType": "development", - "openshiftProjectName": "ci-branch-picky", - "autoIdle": 1, - "envVariables": [] - }, - { - "name": "banana", - "deployType": "branch", - "deployBaseRef": "banana", - "deployHeadRef": null, - "deployTitle": null, - "environmentType": "development", - "openshiftProjectName": "ci-branch-picky", - "autoIdle": 1, - "envVariables": [] - } - ] - } - } -} + "data": { + "projectByName": { + "id": 23, + "name": "ci-branch-picky", + "autoIdle": 1, + "branches": "^feature/|^(dev|test|develop|master)$", + "pullrequests": "true", + "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\n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\nVwNKKpAumJkAAAAJKHVubmFtZWQpAQI=\n-----END OPENSSH PRIVATE KEY-----\n", + "productionEnvironment": "master", + "storageCalc": 1, + "openshiftProjectPattern": null, + "developmentEnvironmentsLimit": 5, + "deployTargetConfigs": [{ + "branches": "qa", + "deployTarget": { + "id": 157, + "name": "test.amazee.io", + "token": "test" + }, + "id": 2094, + "project": { + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:7999/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 + }, + "pullrequests": "false", + "weight": 102 + }], + "gitUrl": "ssh://git@192.168.42.1:2222/git/node.git", + "groups": [{ + "__typename": "Group", + "name": "ci-group", + "members": [{ + "user": { + "email": "ci-customer-user-ecdsa521@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-ecdsa-nistp521", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ecdsa-sha2-nistp521", + "keyValue": "AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAFAX0rkOBwlrXr2rJNxYVi0fRj8IiHBaFCsAM0zO+o2fh+h4EuL1Mx4F237SX5G0zuL8R6Sbf9LrY2lhKZdDpiFdgF7pP1TZ8RuDvKgasppGDEzAIm9+7bmHR118CejWF7llgHD3oz+/aRHTZVpOOaCyTGkF2oPeUejrI74KoPHk3HHpQ==" + }], + "firstName": null, + "lastName": null + }, + "role": "OWNER" + }, + { + "user": { + "email": "ci-customer-user-ed25519@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-ed25519", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-ed25519", + "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIMdEs1h19jv2UrbtKcqPDatUxT9lPYcbGlEAbInsY8Ka" + }], + "firstName": null, + "lastName": null + }, + "role": "OWNER" + }, + { + "user": { + "email": "ci-customer-user-rsa@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-rsa", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-rsa", + "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" + }], + "firstName": null, + "lastName": null + }, + "role": "OWNER" + } + ] + }, + { + "__typename": "Group", + "name": "project-ci-branch-picky", + "members": [{ + "user": { + "email": "ci-customer-user-rsa@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-rsa", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-rsa", + "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" + }], + "firstName": null, + "lastName": null + }, + "role": "MAINTAINER" + }] + } + ], + "notifications": [], + "openshift": { + "id": 1 + }, + "envVariables": [], + "environments": [{ + "name": "master", + "deployType": "branch", + "deployBaseRef": "master", + "deployHeadRef": null, + "deployTitle": null, + "environmentType": "production", + "openshiftProjectName": "ci-branch-picky", + "autoIdle": 1, + "envVariables": [] + }, + { + "name": "develop", + "deployType": "branch", + "deployBaseRef": "develop", + "deployHeadRef": null, + "deployTitle": null, + "environmentType": "development", + "openshiftProjectName": "ci-branch-picky", + "autoIdle": 1, + "envVariables": [] + }, + { + "name": "stage", + "deployType": "branch", + "deployBaseRef": "stage", + "deployHeadRef": null, + "deployTitle": null, + "environmentType": "development", + "openshiftProjectName": "ci-branch-picky", + "autoIdle": 1, + "envVariables": [] + }, + { + "name": "banana", + "deployType": "branch", + "deployBaseRef": "banana", + "deployHeadRef": null, + "deployTitle": null, + "environmentType": "development", + "openshiftProjectName": "ci-branch-picky", + "autoIdle": 1, + "envVariables": [] + } + ] + } + } +} \ No newline at end of file diff --git a/internal/schema/testdata/newNotifications.json b/internal/schema/testdata/newNotifications.json index 14683d88..5abfc101 100644 --- a/internal/schema/testdata/newNotifications.json +++ b/internal/schema/testdata/newNotifications.json @@ -1,146 +1,130 @@ { - "data": { - "projectByName": { - "id": 3, - "name": "ci-github", - "autoIdle": 1, - "branches": "true", - "pullrequests": "true", - "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\n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\nVwNKKpAumJkAAAAJKHVubmFtZWQpAQI=\n-----END OPENSSH PRIVATE KEY-----\n", - "productionEnvironment": "master", - "storageCalc": 1, - "openshiftProjectPattern": null, - "developmentEnvironmentsLimit": 5, - "deployTargetConfigs": [ - { - "branches": "qa", - "deployTarget": { - "id": 157, - "name": "test.amazee.io", - "token": "test" }, - "id": 1245, - "project": { - "autoIdle": 1, - "gitUrl": "ssh://git@bitbucket.biscrum.com:888/wpsites/test.git", - "name": "test-template", - "productionEnvironment": "master", - "storageCalc": 1 - } - } - ], - "gitUrl": "ssh://git@192.168.42.1:2222/git/github.git", - "groups": [ - { - "__typename": "Group", - "name": "ci-group", - "members": [ - { - "user": { - "email": "ci-customer-user-ecdsa521@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-ecdsa-nistp521", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ecdsa-sha2-nistp521", - "keyValue": "AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAFAX0rkOBwlrXr2rJNxYVi0fRj8IiHBaFCsAM0zO+o2fh+h4EuL1Mx4F237SX5G0zuL8R6Sbf9LrY2lhKZdDpiFdgF7pP1TZ8RuDvKgasppGDEzAIm9+7bmHR118CejWF7llgHD3oz+/aRHTZVpOOaCyTGkF2oPeUejrI74KoPHk3HHpQ==" - } - ], - "firstName": null, - "lastName": null - }, - "role": "OWNER" - }, - { - "user": { - "email": "ci-customer-user-ed25519@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-ed25519", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-ed25519", - "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIMdEs1h19jv2UrbtKcqPDatUxT9lPYcbGlEAbInsY8Ka" - } - ], - "firstName": null, - "lastName": null - }, - "role": "OWNER" - }, - { - "user": { - "email": "ci-customer-user-rsa@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-rsa", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-rsa", - "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" - } - ], - "firstName": null, - "lastName": null - }, - "role": "OWNER" - } - ] - }, - { - "__typename": "Group", - "name": "project-ci-github", - "members": [ - { - "user": { - "email": "ci-customer-user-rsa@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-rsa", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-rsa", - "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" - } - ], - "firstName": null, - "lastName": null - }, - "role": "MAINTAINER" - } - ] - } - ], - "notifications": [ - { - "__typename": "NotificationRocketChat", - "webhook": "https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn", - "name": "amazeeio--lagoon-local-ci", - "channel": "lagoon-local-ci" - }, - { - "__typename": "NotificationEmail", - "emailAddress": "localdeveloper@amazee.io", - "name": "local-email-testing" - } - ], - "openshift": { - "id": 2 - }, - "envVariables": [], - "environments": [ - { - "name": "master", - "deployType": "branch", - "deployBaseRef": "master", - "deployHeadRef": null, - "deployTitle": null, - "environmentType": "production", - "openshiftProjectName": "ci-local", - "autoIdle": 1, - "envVariables": [] - } - ] - } - } -} + "data": { + "projectByName": { + "id": 3, + "name": "ci-github", + "autoIdle": 1, + "branches": "true", + "pullrequests": "true", + "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\n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\nVwNKKpAumJkAAAAJKHVubmFtZWQpAQI=\n-----END OPENSSH PRIVATE KEY-----\n", + "productionEnvironment": "master", + "storageCalc": 1, + "openshiftProjectPattern": null, + "developmentEnvironmentsLimit": 5, + "deployTargetConfigs": [{ + "branches": "qa", + "deployTarget": { + "id": 157, + "name": "test.amazee.io", + "token": "test" + }, + "id": 1245, + "project": { + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:888/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 + } + }], + "gitUrl": "ssh://git@192.168.42.1:2222/git/github.git", + "groups": [{ + "__typename": "Group", + "name": "ci-group", + "members": [{ + "user": { + "email": "ci-customer-user-ecdsa521@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-ecdsa-nistp521", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ecdsa-sha2-nistp521", + "keyValue": "AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAFAX0rkOBwlrXr2rJNxYVi0fRj8IiHBaFCsAM0zO+o2fh+h4EuL1Mx4F237SX5G0zuL8R6Sbf9LrY2lhKZdDpiFdgF7pP1TZ8RuDvKgasppGDEzAIm9+7bmHR118CejWF7llgHD3oz+/aRHTZVpOOaCyTGkF2oPeUejrI74KoPHk3HHpQ==" + }], + "firstName": null, + "lastName": null + }, + "role": "OWNER" + }, + { + "user": { + "email": "ci-customer-user-ed25519@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-ed25519", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-ed25519", + "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIMdEs1h19jv2UrbtKcqPDatUxT9lPYcbGlEAbInsY8Ka" + }], + "firstName": null, + "lastName": null + }, + "role": "OWNER" + }, + { + "user": { + "email": "ci-customer-user-rsa@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-rsa", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-rsa", + "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" + }], + "firstName": null, + "lastName": null + }, + "role": "OWNER" + } + ] + }, + { + "__typename": "Group", + "name": "project-ci-github", + "members": [{ + "user": { + "email": "ci-customer-user-rsa@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-rsa", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-rsa", + "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" + }], + "firstName": null, + "lastName": null + }, + "role": "MAINTAINER" + }] + } + ], + "notifications": [{ + "__typename": "NotificationRocketChat", + "webhook": "https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn", + "name": "amazeeio--lagoon-local-ci", + "channel": "lagoon-local-ci" + }, + { + "__typename": "NotificationEmail", + "emailAddress": "localdeveloper@amazee.io", + "name": "local-email-testing" + } + ], + "openshift": { + "id": 2 + }, + "envVariables": [], + "environments": [{ + "name": "master", + "deployType": "branch", + "deployBaseRef": "master", + "deployHeadRef": null, + "deployTitle": null, + "environmentType": "production", + "openshiftProjectName": "ci-local", + "autoIdle": 1, + "envVariables": [] + }] + } + } +} \ No newline at end of file diff --git a/internal/schema/testdata/noNewNotifications.json b/internal/schema/testdata/noNewNotifications.json index 54eca8ae..63e5a8d8 100644 --- a/internal/schema/testdata/noNewNotifications.json +++ b/internal/schema/testdata/noNewNotifications.json @@ -1,152 +1,141 @@ { - "data": { - "projectByName": { - "id": 3, - "name": "ci-github", - "autoIdle": 1, - "branches": "true", - "pullrequests": "true", - "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\n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\nVwNKKpAumJkAAAAJKHVubmFtZWQpAQI=\n-----END OPENSSH PRIVATE KEY-----\n", - "productionEnvironment": "master", - "storageCalc": 1, - "openshiftProjectPattern": null, - "developmentEnvironmentsLimit": 5, - "deployTargetConfigs": [ { - "branches": "qa", - "deployTarget": { - "id": 157, - "name": "test.amazee.io", - "token": "test" }, - "id": 1245, - "project": { - "autoIdle": 1, - "gitUrl": "ssh://git@bitbucket.biscrum.com:888/wpsites/test.git", - "name": "test-template", - "productionEnvironment": "master", - "storageCalc": 1 }}, - { - "branches": "master", - "deployTarget": { - "id": 158, - "name": "test.amazee.io", - "token": "test" - }, - "id": 1246, - "project":{ - "autoIdle": 1, - "gitUrl": "ssh://git@bitbucket.biscrum.com:889/wpsites/test.git", - "name": "test-template", - "productionEnvironment": "master", - "storageCalc": 1 - } - }], - "gitUrl": "ssh://git@192.168.42.1:2222/git/github.git", - "groups": [ - { - "__typename": "Group", - "name": "ci-group", - "members": [ - { - "user": { - "email": "ci-customer-user-ecdsa521@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-ecdsa-nistp521", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ecdsa-sha2-nistp521", - "keyValue": "AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAFAX0rkOBwlrXr2rJNxYVi0fRj8IiHBaFCsAM0zO+o2fh+h4EuL1Mx4F237SX5G0zuL8R6Sbf9LrY2lhKZdDpiFdgF7pP1TZ8RuDvKgasppGDEzAIm9+7bmHR118CejWF7llgHD3oz+/aRHTZVpOOaCyTGkF2oPeUejrI74KoPHk3HHpQ==" - } - ], - "firstName": null, - "lastName": null - }, - "role": "OWNER" - }, - { - "user": { - "email": "ci-customer-user-ed25519@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-ed25519", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-ed25519", - "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIMdEs1h19jv2UrbtKcqPDatUxT9lPYcbGlEAbInsY8Ka" - } - ], - "firstName": null, - "lastName": null - }, - "role": "OWNER" - }, - { - "user": { - "email": "ci-customer-user-rsa@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-rsa", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-rsa", - "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" - } - ], - "firstName": null, - "lastName": null - }, - "role": "OWNER" - } - ] - }, - { - "__typename": "Group", - "name": "project-ci-github", - "members": [ - { - "user": { - "email": "ci-customer-user-rsa@example.com", - "sshKeys": [ - { - "name": "ci-customer-sshkey-rsa", - "keyType": "ssh-rsa", - "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" - } - ], - "firstName": null, - "lastName": null - }, - "role": "MAINTAINER" - } - ] - } - ], - "notifications": [ - { - "__typename": "NotificationRocketChat", - "webhook": "https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn", - "name": "amazeeio--lagoon-local-ci", - "channel": "lagoon-local-ci" - }, - {} - ], - "openshift": { - "id": 2 - }, - "envVariables": [], - "environments": [ - { - "name": "master", - "deployType": "branch", - "deployBaseRef": "master", - "deployHeadRef": null, - "deployTitle": null, - "environmentType": "production", - "openshiftProjectName": "ci-local", - "autoIdle": 1, - "envVariables": [] - } - ] - } - } -} + "data": { + "projectByName": { + "id": 3, + "name": "ci-github", + "autoIdle": 1, + "branches": "true", + "pullrequests": "true", + "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAACFwAAAAdzc2gtcn\nNhAAAAAwEAAQAAAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8GQH8K\nIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5ZQiGTVaB5Uo\nGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0GAISt9Gg9kq6wa7k7\nRRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5EyMkf0s86ZTttQPqQijWse\nnLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0k7I85mV5uM99v7owJ/0YSJGcN2YE\nSq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxteTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVh\nvcMJNmuj+Wnp9USwki6U5HdpgBJPT5YJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468y\nlT0qpqjtV4OSuCzl+P/TeJ+KpCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXr\nkK/BJs/h3fj2NddeVCJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p\n5L4NuudcFAygbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzol\nsAAAdAv6DYJ7+g2CcAAAAHc3NoLXJzYQAAAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZ\nfJDZJmSU4jNxMf8GQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EP\nhg359+4f5ZQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRr\nl+0GAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5Ey\nMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0k7I85mV5\nuM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxteTwvN2W5hIEld8I\np+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5YJia3/LyE5IlPaRfZ+vB\nDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+KpCxDoqp88yQpYRYn9ztvEVvOkT\n8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVCJXdwiB4m+T2C/RHtGxVColqUf2nEntXx\nweuJgqBz+4YxXqRrKu4p5L4NuudcFAygbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoD\nkkc6ZmKdM5Yth6RaCzolsAAAADAQABAAACAFEvifRJrFwV6/IhIIsxT4d4/xHBc9wYxYxT\niCAxxcW3xBwJsrjoivRC2MCmz/zJ/bMa5ga7Z3CmzrezwrIBXdVg3BG4Q4zVLodOdx05vz\nnRga7D6HvIy1HDE0PC3kNvqaZ0gMlhEfXfOAmnZqPK1G/bkKhLhkLADRaFqFFUuLbXiS51\nQVzne80jZgiDg9QT7udDHhfXYT1XSCFCpptK10EHRleMDwR/q8fkJe2EOY1Rf2ZdxJuflE\n+2d0iLUrPYGXcd0Joc7dmmsMi1tTRRYQVl5lLNxvkk7m7UdnCJ5tMDn+rrfy6qqDgJTIbT\n5sRhn9R38BjXcD8KQc3pk0f5RCi0IfcYvJpNCro6HJeWAwGiOffGz2IxRyUVy7KRtnWMDG\npyLbmnEIh40McEMpHLGBKQM+drxlnh4oZeMhnOx2zj4gORgksyDQ4K13Yqb5k8zYIVTZgK\nq3XV2WvSGKAYr/2B2lqMkxWARgCaKBDrvQt1wFzhcg6k8ytHvRo+NsX3N79Sq0oNa3Pwow\nhRy+vQKOEdrddGAwmIzfiEg5lTrF/quMSCQ3YZ6rbi7VuFRbxRFv7l1xqxD2Ih+Q2fdH7M\nrk/PK9A1/r5ettWOkuo8dclisPzkQqVeQ+qITrLd6FgyshpkhjqAy4hVyDwAS2ybkTBBjs\nRPDhicxAsp/LB4uwcRAAABAHNXgjD3umcKciYRAbltNJrXx9xkdAv8I69oEMCy4hCmvKUj\ny/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1MDFruaRfjyJ8qjbEifcqRtcF3rz\nsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3uCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhy\nnVE80/X5cy07bXXR5rv1x4NKSVbPhlntL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5\nRoEgeVdcXeK56UJqXHjmKN++m3c8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVW\notXsAs1h8LNkBe8AAAEBAOb2rw8kI5+j6nxdTba9zfxX8Ea/9euxwfv98B0/hcEaQsOtgA\nngQtIhV5sxtsH0H6LetH1BmkBCYlAxmRbwTNLYk6c5oBhu0KUWz3tfdfUpeS2XiwPW54EZ\n5qp+cwJJlU3gQjv+BTEpPYZwWdL9Ftw6jZo7iB9vfIN4JeFSXiqSC3eti24Y74Y0/y15Xp\nGAxI96fV6G/NTkMRSYH7RcoOD9O0UWlM7DS4ahHWN1cQ3FDG/eOfXxGHm+7GIoPs1T2mUN\n9WjFSo+ivl4h+TObiiVpD3TA1BvOI63hQHQWPZBgrkrpU1oJky5TCkiPOauYZHJGNhEEC+\nbuOesX8rhXJxMAAAEBANmwgnKnBiAIjMJP+s+1yCXlLElIPjm75BHaIJOZ+mNRGreS8TKU\nM4Rukhydn9/FcioL/Xv458FyPHono6Xq+jnkBARuPgHnXC2ItFeUlDCIA1+G8U/fqgsGK8\nLfWB5CckpNt+1mVFiT1X8R4NL6jWMg/wlwaMMdJ5vIxLmfIk/gljtrmavtAztlqqGE+eJW\nbsemhM5vqAJM8CSVVyXFFT4O2yVytTmzs7x6ZGScRy/Pkirn83sPwlwCylh6ApBD/z/G+6\nMY3I0CNyitBDNnwATbzdvPqrHKk6kI3wLDcNuDmz/Ky/GpoHf8e4nXSGxKTkqCwB9YFaMS\nVwNKKpAumJkAAAAJKHVubmFtZWQpAQI=\n-----END OPENSSH PRIVATE KEY-----\n", + "productionEnvironment": "master", + "storageCalc": 1, + "openshiftProjectPattern": null, + "developmentEnvironmentsLimit": 5, + "deployTargetConfigs": [{ + "branches": "qa", + "deployTarget": { + "id": 157, + "name": "test.amazee.io", + "token": "test" + }, + "id": 1245, + "project": { + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:888/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 + } + }, + { + "branches": "master", + "deployTarget": { + "id": 158, + "name": "test.amazee.io", + "token": "test" + }, + "id": 1246, + "project": { + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:889/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 + } + } + ], + "gitUrl": "ssh://git@192.168.42.1:2222/git/github.git", + "groups": [{ + "__typename": "Group", + "name": "ci-group", + "members": [{ + "user": { + "email": "ci-customer-user-ecdsa521@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-ecdsa-nistp521", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ecdsa-sha2-nistp521", + "keyValue": "AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAFAX0rkOBwlrXr2rJNxYVi0fRj8IiHBaFCsAM0zO+o2fh+h4EuL1Mx4F237SX5G0zuL8R6Sbf9LrY2lhKZdDpiFdgF7pP1TZ8RuDvKgasppGDEzAIm9+7bmHR118CejWF7llgHD3oz+/aRHTZVpOOaCyTGkF2oPeUejrI74KoPHk3HHpQ==" + }], + "firstName": null, + "lastName": null + }, + "role": "OWNER" + }, + { + "user": { + "email": "ci-customer-user-ed25519@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-ed25519", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-ed25519", + "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIMdEs1h19jv2UrbtKcqPDatUxT9lPYcbGlEAbInsY8Ka" + }], + "firstName": null, + "lastName": null + }, + "role": "OWNER" + }, + { + "user": { + "email": "ci-customer-user-rsa@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-rsa", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-rsa", + "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" + }], + "firstName": null, + "lastName": null + }, + "role": "OWNER" + } + ] + }, + { + "__typename": "Group", + "name": "project-ci-github", + "members": [{ + "user": { + "email": "ci-customer-user-rsa@example.com", + "sshKeys": [{ + "name": "ci-customer-sshkey-rsa", + "keyType": "ssh-rsa", + "keyValue": "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" + }], + "firstName": null, + "lastName": null + }, + "role": "MAINTAINER" + }] + } + ], + "notifications": [{ + "__typename": "NotificationRocketChat", + "webhook": "https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn", + "name": "amazeeio--lagoon-local-ci", + "channel": "lagoon-local-ci" + }, + {} + ], + "openshift": { + "id": 2 + }, + "envVariables": [], + "environments": [{ + "name": "master", + "deployType": "branch", + "deployBaseRef": "master", + "deployHeadRef": null, + "deployTitle": null, + "environmentType": "production", + "openshiftProjectName": "ci-local", + "autoIdle": 1, + "envVariables": [] + }] + } + } +} \ No newline at end of file diff --git a/internal/schema/testdata/rocketChat.json b/internal/schema/testdata/rocketChat.json index 1ddf86bc..ef7990be 100644 --- a/internal/schema/testdata/rocketChat.json +++ b/internal/schema/testdata/rocketChat.json @@ -1,78 +1,70 @@ { - "data": { - "projectByName": { - "name": "lagoon", - "autoIdle": 1, - "branches": "true", - "pullrequests": "true", - "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\nQyNTUxOQAAACCFAC4qLImDr5RrciJoPMBusxQZaLWdvmAOsoY68om9dwAAAIjkFOGA5BTh\ngAAAAAtzc2gtZWQyNTUxOQAAACCFAC4qLImDr5RrciJoPMBusxQZaLWdvmAOsoY68om9dw\nAAAECHDZUyo80V7E46OSEt7fYuQaXZPrIjRn7W3nIW3ekpqYUALiosiYOvlGtyImg8wG6z\nFBlotZ2+YA6yhjryib13AAAAAAECAwQF\n-----END OPENSSH PRIVATE KEY-----\n", - "productionEnvironment": "master", - "storageCalc": 1, - "openshiftProjectPattern": "lagoon", - "developmentEnvironmentsLimit": 5, - "deployTargetConfigs": [ - { - "branches": "qa", - "deployTarget": { - "id": 157, - "name": "test.amazee.io", - "token": "test" }, - "id": 2094, - "project": { - "autoIdle": 1, - "gitUrl": "ssh://git@bitbucket.biscrum.com:7999/wpsites/test.git", - "name": "test-template", - "productionEnvironment": "master", - "storageCalc": 1 - }, - "pullrequests": "false", - "weight": 102 - } - ], - "gitUrl": "git@github.com:uselagoon/lagoon.git", - "groups": [ - { - "__typename": "Group", - "name": "kickstart-group", - "members": [] - }, - { - "__typename": "Group", - "name": "project-lagoon", - "members": [ - { - "user": { - "email": "default-user@lagoon", - "sshKeys": [ - { - "name": "auto-add via api", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-ed25519", - "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIIUALiosiYOvlGtyImg8wG6zFBlotZ2+YA6yhjryib13" - } - ], - "firstName": null, - "lastName": null - }, - "role": "MAINTAINER" - } - ] - } - ], - "notifications": [ - { - "__typename": "NotificationRocketChat", - "webhook": "https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn", - "name": "amazeeio--lagoon-kickstart", - "channel": "lagoon-kickstart" - } - ], - "openshift": { - "id": 3 - }, - "envVariables": [], - "environments": [] - } - } -} + "data": { + "projectByName": { + "name": "lagoon", + "autoIdle": 1, + "branches": "true", + "pullrequests": "true", + "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\nQyNTUxOQAAACCFAC4qLImDr5RrciJoPMBusxQZaLWdvmAOsoY68om9dwAAAIjkFOGA5BTh\ngAAAAAtzc2gtZWQyNTUxOQAAACCFAC4qLImDr5RrciJoPMBusxQZaLWdvmAOsoY68om9dw\nAAAECHDZUyo80V7E46OSEt7fYuQaXZPrIjRn7W3nIW3ekpqYUALiosiYOvlGtyImg8wG6z\nFBlotZ2+YA6yhjryib13AAAAAAECAwQF\n-----END OPENSSH PRIVATE KEY-----\n", + "productionEnvironment": "master", + "storageCalc": 1, + "openshiftProjectPattern": "lagoon", + "developmentEnvironmentsLimit": 5, + "deployTargetConfigs": [{ + "branches": "qa", + "deployTarget": { + "id": 157, + "name": "test.amazee.io", + "token": "test" + }, + "id": 2094, + "project": { + "autoIdle": 1, + "gitUrl": "ssh://git@bitbucket.biscrum.com:7999/wpsites/test.git", + "name": "test-template", + "productionEnvironment": "master", + "storageCalc": 1 + }, + "pullrequests": "false", + "weight": 102 + }], + "gitUrl": "git@github.com:uselagoon/lagoon.git", + "groups": [{ + "__typename": "Group", + "name": "kickstart-group", + "members": [] + }, + { + "__typename": "Group", + "name": "project-lagoon", + "members": [{ + "user": { + "email": "default-user@lagoon", + "sshKeys": [{ + "name": "auto-add via api", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-ed25519", + "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIIUALiosiYOvlGtyImg8wG6zFBlotZ2+YA6yhjryib13" + }], + "firstName": null, + "lastName": null + }, + "role": "MAINTAINER" + }] + } + ], + "notifications": [{ + "__typename": "NotificationRocketChat", + "webhook": "https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn", + "name": "amazeeio--lagoon-kickstart", + "channel": "lagoon-kickstart" + }], + "openshift": { + "id": 3 + }, + "envVariables": [], + "environments": [] + } + } +} \ No newline at end of file diff --git a/internal/schema/testdata/singleProject.json b/internal/schema/testdata/singleProject.json index 34aa7606..9f15b2bd 100644 --- a/internal/schema/testdata/singleProject.json +++ b/internal/schema/testdata/singleProject.json @@ -1,173 +1,156 @@ { - "data": { - "projectByName": { - "name": "bananas", - "autoIdle": 1, - "branches": "^(master|develop|production)$", - "pullrequests": null, - "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\nQyNTUxOQAAACDyqifji2CwiyZVExfEllTsHVKwhXz1XDTBeEa/q312NwAAAJDLqG7Iy6hu\nyAAAAAtzc2gtZWQyNTUxOQAAACDyqifji2CwiyZVExfEllTsHVKwhXz1XDTBeEa/q312Nw\nAAAEC0EKQryGzT+PYQH1GsfmkP2SXBPvY9lvxD5sj4mcE4ivKqJ+OLYLCLJlUTF8SWVOwd\nUrCFfPVcNMF4Rr+rfXY3AAAADHNjb3R0QHRoaW5reQE=\n-----END OPENSSH PRIVATE KEY-----\n", - "productionEnvironment": "production", - "storageCalc": 1, - "openshiftProjectPattern": null, - "developmentEnvironmentsLimit": 10, - "deployTargetConfigs": [], - "gitUrl": "git@github.amazee.io:foo-bar/bananas-au.git", - "groups": [ - { - "__typename": "Group", - "name": "abc", - "id": "d5e3f014-8110-43f8-b0d2-0b60ef917e63", - "members": [ - { - "user": { - "email": "foo@example.com", - "sshKeys": [ - { - "name": "foo-example", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-ed25519", - "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIPKqJ+OLYLCLJlUTF8SWVOwdUrCFfPVcNMF4Rr+rfXY3" - } - ], - "firstName": "foofirst", - "lastName": "foolast" - }, - "role": "OWNER" - }, - { - "user": { - "email": "bar@example.com", - "sshKeys": [ - { - "name": "bar-example", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-ed25519", - "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIPKqJ+OLYLCLJlUTF8SWVOwdUrCFfPVcNMF4Rr+rfXY3" - } - ], - "firstName": "barfirst", - "lastName": "barlast" - }, - "role": "OWNER" - } - ] - }, - { - "__typename": "Group", - "name": "project-bananas", - "id": "324b5b77-975b-4243-b540-697e1aa475c5", - "members": [ - { - "user": { - "email": "projectuser@example.com", - "sshKeys": [ - { - "name": "projectuser", - "created": "2020-02-11 09:00:42", - "keyFingerprint": "", - "keyType": "ssh-ed25519", - "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIPKqJ+OLYLCLJlUTF8SWVOwdUrCFfPVcNMF4Rr+rfXY3" - } - ], - "firstName": "projectuserfirst", - "lastName": "projectuserlast" - }, - "role": "MAINTAINER" - } - ] - } - ], - "notifications": [ - { - "__typename": "NotificationSlack", - "webhook": "https://hooks.slack.example.com/services/xxx/yyy", - "name": "example-slack", - "channel": "build-notifications" - } - ], - "openshift": { - "id": 1 - }, - "envVariables": [ - { - "name": "ENABLE_REDIS", - "scope": "global", - "value": "1" - } - ], - "environments": [ - { - "id": 6, - "name": "develop", - "openshiftProjectName": "bananas-develop", - "autoIdle": 1, - "envVariables": [ - { - "name": "ENABLE_REDIS", - "scope": "build", - "value": "1" - } - ] - }, - { - "id": 1708, - "name": "feature/persist-db", - "openshiftProjectName": "bananas-feature-persist-db", - "autoIdle": 1, - "envVariables": [] - }, - { - "id": 88, - "name": "master", - "openshiftProjectName": "bananas-master", - "autoIdle": 1, - "envVariables": [] - }, - { - "id": 15601, - "name": "pr-486", - "openshiftProjectName": "bananas-pr-486", - "autoIdle": 1, - "envVariables": [] - }, - { - "id": 16072, - "name": "pr-487", - "openshiftProjectName": "bananas-pr-487", - "autoIdle": 1, - "envVariables": [] - }, - { - "id": 24571, - "name": "pr-507", - "openshiftProjectName": "bananas-pr-507", - "autoIdle": 1, - "envVariables": [] - }, - { - "id": 31365, - "name": "pr-513", - "openshiftProjectName": "bananas-pr-513", - "autoIdle": 1, - "envVariables": [] - }, - { - "id": 512, - "name": "production", - "openshiftProjectName": "bananas-production", - "autoIdle": 1, - "envVariables": [] - }, - { - "id": 1007, - "name": "sandbox", - "openshiftProjectName": "bananas-sandbox", - "autoIdle": 1, - "envVariables": [] - } - ] - } - } -} + "data": { + "projectByName": { + "name": "bananas", + "autoIdle": 1, + "branches": "^(master|develop|production)$", + "pullrequests": null, + "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\nQyNTUxOQAAACDyqifji2CwiyZVExfEllTsHVKwhXz1XDTBeEa/q312NwAAAJDLqG7Iy6hu\nyAAAAAtzc2gtZWQyNTUxOQAAACDyqifji2CwiyZVExfEllTsHVKwhXz1XDTBeEa/q312Nw\nAAAEC0EKQryGzT+PYQH1GsfmkP2SXBPvY9lvxD5sj4mcE4ivKqJ+OLYLCLJlUTF8SWVOwd\nUrCFfPVcNMF4Rr+rfXY3AAAADHNjb3R0QHRoaW5reQE=\n-----END OPENSSH PRIVATE KEY-----\n", + "productionEnvironment": "production", + "storageCalc": 1, + "openshiftProjectPattern": null, + "developmentEnvironmentsLimit": 10, + "deployTargetConfigs": [], + "gitUrl": "git@github.amazee.io:foo-bar/bananas-au.git", + "groups": [{ + "__typename": "Group", + "name": "abc", + "id": "d5e3f014-8110-43f8-b0d2-0b60ef917e63", + "members": [{ + "user": { + "email": "foo@example.com", + "sshKeys": [{ + "name": "foo-example", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-ed25519", + "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIPKqJ+OLYLCLJlUTF8SWVOwdUrCFfPVcNMF4Rr+rfXY3" + }], + "firstName": "foofirst", + "lastName": "foolast" + }, + "role": "OWNER" + }, + { + "user": { + "email": "bar@example.com", + "sshKeys": [{ + "name": "bar-example", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-ed25519", + "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIPKqJ+OLYLCLJlUTF8SWVOwdUrCFfPVcNMF4Rr+rfXY3" + }], + "firstName": "barfirst", + "lastName": "barlast" + }, + "role": "OWNER" + } + ] + }, + { + "__typename": "Group", + "name": "project-bananas", + "id": "324b5b77-975b-4243-b540-697e1aa475c5", + "members": [{ + "user": { + "email": "projectuser@example.com", + "sshKeys": [{ + "name": "projectuser", + "created": "2020-02-11 09:00:42", + "keyFingerprint": "", + "keyType": "ssh-ed25519", + "keyValue": "AAAAC3NzaC1lZDI1NTE5AAAAIPKqJ+OLYLCLJlUTF8SWVOwdUrCFfPVcNMF4Rr+rfXY3" + }], + "firstName": "projectuserfirst", + "lastName": "projectuserlast" + }, + "role": "MAINTAINER" + }] + } + ], + "notifications": [{ + "__typename": "NotificationSlack", + "webhook": "https://hooks.slack.example.com/services/xxx/yyy", + "name": "example-slack", + "channel": "build-notifications" + }], + "openshift": { + "id": 1 + }, + "envVariables": [{ + "name": "ENABLE_REDIS", + "scope": "global", + "value": "1" + }], + "environments": [{ + "id": 6, + "name": "develop", + "openshiftProjectName": "bananas-develop", + "autoIdle": 1, + "envVariables": [{ + "name": "ENABLE_REDIS", + "scope": "build", + "value": "1" + }] + }, + { + "id": 1708, + "name": "feature/persist-db", + "openshiftProjectName": "bananas-feature-persist-db", + "autoIdle": 1, + "envVariables": [] + }, + { + "id": 88, + "name": "master", + "openshiftProjectName": "bananas-master", + "autoIdle": 1, + "envVariables": [] + }, + { + "id": 15601, + "name": "pr-486", + "openshiftProjectName": "bananas-pr-486", + "autoIdle": 1, + "envVariables": [] + }, + { + "id": 16072, + "name": "pr-487", + "openshiftProjectName": "bananas-pr-487", + "autoIdle": 1, + "envVariables": [] + }, + { + "id": 24571, + "name": "pr-507", + "openshiftProjectName": "bananas-pr-507", + "autoIdle": 1, + "envVariables": [] + }, + { + "id": 31365, + "name": "pr-513", + "openshiftProjectName": "bananas-pr-513", + "autoIdle": 1, + "envVariables": [] + }, + { + "id": 512, + "name": "production", + "openshiftProjectName": "bananas-production", + "autoIdle": 1, + "envVariables": [] + }, + { + "id": 1007, + "name": "sandbox", + "openshiftProjectName": "bananas-sandbox", + "autoIdle": 1, + "envVariables": [] + } + ] + } + } +} \ No newline at end of file From a402418e2711237222a1565faf3c814c7e76903a Mon Sep 17 00:00:00 2001 From: polinashtanko <102825546+polinashtanko@users.noreply.github.com> Date: Fri, 6 Jan 2023 11:11:41 -0800 Subject: [PATCH 14/17] Delete .DS_Store --- internal/schema/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 internal/schema/.DS_Store diff --git a/internal/schema/.DS_Store b/internal/schema/.DS_Store deleted file mode 100644 index ce5034af3670671ed262db639e25fd77adf99e0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5Z-O8-BN@c6nb3nS};~C6fdFH7cim+m70*C!I&*gY7eE5v%Zi|;`2DO zy8(+mcoMNQu=~x<&u->}>6d+v_BY)O@IBS(NKs-#A1|w8lZhypskB@m@W&thp1 zJRsbp0-98ApBUVvgI(G<&thrNq%*EphI#DD)#HWh)xj=xIOCo{>WKkjV3mQo89I3W zpTjS+_L0AuLL*{;82D!l@W#j=4WTG|wtg!Q&squX9vTY9m8gJ#zH$kG0q!Fm?KFOg aI>dPvOM^HI+I2c0T?8~C)DZ)}z`!ScfK3Ac From 90a6b3c385e81999e09342f767670e8b2244adac Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Fri, 13 Jan 2023 14:25:38 -0800 Subject: [PATCH 15/17] added deployTargetConfigs to import --- internal/lagoon/import.go | 20 +++++++++++++++++++ internal/lagoon/import_test.go | 19 ++++++++++++++++++ .../lagoon/testdata/exhaustive.import.yaml | 6 ++++++ internal/mock/mock_importer.go | 14 +++++++++++++ 4 files changed, 59 insertions(+) diff --git a/internal/lagoon/import.go b/internal/lagoon/import.go index 8466d044..8d4a5bf3 100644 --- a/internal/lagoon/import.go +++ b/internal/lagoon/import.go @@ -48,6 +48,8 @@ type Importer interface { context.Context, *schema.ProjectGroupsInput, *schema.Project) error AddNotificationToProject(context.Context, *schema.AddNotificationToProjectInput, *schema.Project) error + AddDeployTargetConfiguration(context.Context, + *schema.AddDeployTargetConfigInput, *schema.DeployTargetConfig) error } // Import creates objects in the Lagoon API based on a configuration object. @@ -176,6 +178,7 @@ func Import(ctx context.Context, i Importer, r io.Reader, keepGoing bool, continue // next project } } + // add project env-vars for _, ev := range p.EnvVariables { err := i.AddEnvVariable(ctx, &schema.EnvVariableInput{ @@ -190,6 +193,23 @@ func Import(ctx context.Context, i Importer, r io.Reader, keepGoing bool, l.Printf("couldn't add Project EnvVariable: %v", err) } } + for _, d := range p.DeployTargetConfig { + err := i.AddDeployTargetConfiguration(ctx, &schema.AddDeployTargetConfigInput{ + ID: d.ID, + Project: p.ID, + Weight: d.Weight, + Branches: d.Branches, + Pullrequests: d.Pullrequests, + DeployTarget: d.DeployTarget.ID, + DeployTargetProjectPattern: d.DeployTargetProjectPattern, + }, nil) + if err != nil { + if !keepGoing { + return fmt.Errorf("couldn't add Project DeployTargetConfig: %w", err) + } + l.Printf("couldn't add Project DeployTargetConfig: %v", err) + } + } // add project environments for _, env := range p.Environments { newEnv := schema.Environment{} diff --git a/internal/lagoon/import_test.go b/internal/lagoon/import_test.go index 5a31b748..8e6f3601 100644 --- a/internal/lagoon/import_test.go +++ b/internal/lagoon/import_test.go @@ -32,6 +32,8 @@ type importCalls struct { AddEnvironmentInputs []schema.AddEnvironmentInput ProjectGroupsInputs []schema.ProjectGroupsInput AddNotificationToProjectInputs []schema.AddNotificationToProjectInput + AddDeployTargetConfigInputs []schema.AddDeployTargetConfigInput + AddDeployTargetInputs []schema.AddDeployTargetInput } func TestImport(t *testing.T) { @@ -42,6 +44,7 @@ func TestImport(t *testing.T) { "exhaustive": {input: "testdata/exhaustive.import.yaml", expect: &importCalls{ NewProjectID: 99, NewEnvironmentID: 88, + AddGroupInputs: []schema.AddGroupInput{ {Name: "abc"}, }, @@ -90,6 +93,16 @@ func TestImport(t *testing.T) { GroupRole: api.MaintainerRole, }, }, + AddDeployTargetConfigInputs: []schema.AddDeployTargetConfigInput{ + { + + ID: 1234, + Weight: 123, + Branches: "master", + Pullrequests: "This project is configured with DeployTargets", + DeployTargetProjectPattern: "test", + }, + }, AddNotificationSlackInputs: []schema.AddNotificationSlackInput{ { Name: "example-slack", @@ -200,6 +213,12 @@ func TestImport(t *testing.T) { importer.EXPECT().AddUserToGroup( ctx, &tc.expect.UserGroupRoleInputs[i], nil) } + + for i := range tc.expect.AddDeployTargetConfigInputs { + importer.EXPECT().AddDeployTargetConfiguration( + ctx, &tc.expect.AddDeployTargetConfigInputs[i], nil) + } + for i := range tc.expect.AddNotificationSlackInputs { importer.EXPECT().AddNotificationSlack( ctx, &tc.expect.AddNotificationSlackInputs[i], nil) diff --git a/internal/lagoon/testdata/exhaustive.import.yaml b/internal/lagoon/testdata/exhaustive.import.yaml index 03f313c1..65443659 100644 --- a/internal/lagoon/testdata/exhaustive.import.yaml +++ b/internal/lagoon/testdata/exhaustive.import.yaml @@ -23,6 +23,12 @@ notifications: projects: - autoIdle: 1 branches: ^(master|develop|production)$ + deployTargetConfigs: + - branches: master + id: 1234 + pullrequests: "This project is configured with DeployTargets" + weight: 123 + deployTargetProjectPattern: test developmentEnvironmentsLimit: 10 envVariables: - name: ENABLE_REDIS diff --git a/internal/mock/mock_importer.go b/internal/mock/mock_importer.go index 603e530c..27300c20 100644 --- a/internal/mock/mock_importer.go +++ b/internal/mock/mock_importer.go @@ -35,6 +35,20 @@ func (m *MockImporter) EXPECT() *MockImporterMockRecorder { return m.recorder } +// AddDeployTargetConfiguration mocks base method. +func (m *MockImporter) AddDeployTargetConfiguration(arg0 context.Context, arg1 *schema.AddDeployTargetConfigInput, arg2 *schema.DeployTargetConfig) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddDeployTargetConfiguration", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// AddDeployTargetConfiguration indicates an expected call of AddDeployTargetConfiguration. +func (mr *MockImporterMockRecorder) AddDeployTargetConfiguration(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddDeployTargetConfiguration", reflect.TypeOf((*MockImporter)(nil).AddDeployTargetConfiguration), arg0, arg1, arg2) +} + // AddEnvVariable mocks base method. func (m *MockImporter) AddEnvVariable(arg0 context.Context, arg1 *schema.EnvVariableInput, arg2 *schema.EnvKeyValue) error { m.ctrl.T.Helper() From e8f7526161850a0b103ee9324386db37c18ed996 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Thu, 19 Jan 2023 09:34:23 -0800 Subject: [PATCH 16/17] import deployTargetConfig without DeployTarget --- internal/lagoon/testdata/exhaustive.import.yaml | 6 ++++++ internal/schema/config.go | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/internal/lagoon/testdata/exhaustive.import.yaml b/internal/lagoon/testdata/exhaustive.import.yaml index 65443659..3b3e00c1 100644 --- a/internal/lagoon/testdata/exhaustive.import.yaml +++ b/internal/lagoon/testdata/exhaustive.import.yaml @@ -1,3 +1,9 @@ +deployTargetConfigs: + - branches: master + id: 1234 + pullrequests: "This project is configured with DeployTargets" + weight: 123 + deployTargetProjectPattern: test groups: - name: abc users: diff --git a/internal/schema/config.go b/internal/schema/config.go index 5abcbf01..2eb1a8c6 100644 --- a/internal/schema/config.go +++ b/internal/schema/config.go @@ -14,10 +14,11 @@ import ( // Fields for comprising structs are dictated by the add* Lagoon APIs. type Config struct { // API objects - Projects []ProjectConfig `json:"projects,omitempty"` - Groups []GroupConfig `json:"groups,omitempty"` - Users []User `json:"users,omitempty"` - Notifications *NotificationsConfig `json:"notifications,omitempty"` + Projects []ProjectConfig `json:"projects,omitempty"` + Groups []GroupConfig `json:"groups,omitempty"` + Users []User `json:"users,omitempty"` + Notifications *NotificationsConfig `json:"notifications,omitempty"` + DeployTargetConfigs []DeployTargetConfig `json:"deployTargetConfigs,omitempty"` } // UnmarshalJSON implements json.Unmarshaler interface to control how lagoon From 84fab7ffa8b2218d5d359ef99dcdbb0be789c050 Mon Sep 17 00:00:00 2001 From: Polina Shtanko Date: Sat, 21 Jan 2023 19:25:22 -0800 Subject: [PATCH 17/17] removed deployTarget --- internal/lagoon/import_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/lagoon/import_test.go b/internal/lagoon/import_test.go index 8e6f3601..ded3e1c6 100644 --- a/internal/lagoon/import_test.go +++ b/internal/lagoon/import_test.go @@ -33,7 +33,6 @@ type importCalls struct { ProjectGroupsInputs []schema.ProjectGroupsInput AddNotificationToProjectInputs []schema.AddNotificationToProjectInput AddDeployTargetConfigInputs []schema.AddDeployTargetConfigInput - AddDeployTargetInputs []schema.AddDeployTargetInput } func TestImport(t *testing.T) {