mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-21 05:55:35 +00:00
Move from dep to go modules
Also bump plumbing/scripts commit
This commit is contained in:
parent
aba44d4ee1
commit
1a38009d97
17
Gopkg.lock
generated
17
Gopkg.lock
generated
@ -1,17 +0,0 @@
|
||||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:6adfb125a4b886c749f68f3b7c46c4e9e489e175574ec5ed80c507cbeb91efa1"
|
||||
name = "github.com/tektoncd/plumbing"
|
||||
packages = ["scripts"]
|
||||
pruneopts = "UT"
|
||||
revision = "51c53a31e7791871544c7a6526b6e0ad6ce25d65"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
input-imports = ["github.com/tektoncd/plumbing/scripts"]
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
15
Gopkg.toml
15
Gopkg.toml
@ -1,15 +0,0 @@
|
||||
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
|
||||
# for detailed Gopkg.toml documentation.
|
||||
|
||||
required = [
|
||||
"github.com/tektoncd/plumbing/scripts",
|
||||
]
|
||||
|
||||
[prune]
|
||||
non-go = true
|
||||
go-tests = true
|
||||
unused-packages = true
|
||||
|
||||
[[prune.project]]
|
||||
name = "github.com/tektoncd/plumbing"
|
||||
non-go = false
|
3
deps.go
Normal file
3
deps.go
Normal file
@ -0,0 +1,3 @@
|
||||
package deps
|
||||
|
||||
import _ "github.com/tektoncd/plumbing/scripts"
|
5
go.mod
Normal file
5
go.mod
Normal file
@ -0,0 +1,5 @@
|
||||
module github.com/tektoncd/catalog
|
||||
|
||||
go 1.13
|
||||
|
||||
require github.com/tektoncd/plumbing v0.0.0-20210305071546-f1f0e093f988
|
95
go.sum
Normal file
95
go.sum
Normal file
@ -0,0 +1,95 @@
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-licenses v0.0.0-20200602185517-f29a4c695c3d/go.mod h1:g1VOUGKZYIqe8lDq2mL7plhAWXqrEaGUs7eIjthN1sk=
|
||||
github.com/google/licenseclassifier v0.0.0-20190926221455-842c0d70d702/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
|
||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
||||
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
|
||||
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
|
||||
github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
|
||||
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
|
||||
github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/tektoncd/plumbing v0.0.0-20191114095731-51c53a31e779 h1:sSxeUSt6SAL0cLItd932SwFNdgplkDFcmCBTouDA058=
|
||||
github.com/tektoncd/plumbing v0.0.0-20191114095731-51c53a31e779/go.mod h1:dvZoTaPGpr3ZDqOUR1sc8VOhh/7OzYncVnbQETJTqvQ=
|
||||
github.com/tektoncd/plumbing v0.0.0-20210305071546-f1f0e093f988 h1:gH8pWcqdo2xQvVAEWOeta+sEf4gUY1seGU48TwTIBk0=
|
||||
github.com/tektoncd/plumbing v0.0.0-20210305071546-f1f0e093f988/go.mod h1:WTWwsg91xgm+jPOKoyKVK/yRYxnVDlUYeDlypB1lDdQ=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/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/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
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-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
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-20190221075227-b4e8571b14e0/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-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191119060738-e882bf8e40c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
|
||||
golang.org/x/tools v0.0.0-20191118222007-07fc4c7f2b98/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98=
|
||||
gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g=
|
||||
gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
1
vendor/github.com/tektoncd/plumbing/pipelinerun-logs/cmd/http/kodata/templates
generated
vendored
1
vendor/github.com/tektoncd/plumbing/pipelinerun-logs/cmd/http/kodata/templates
generated
vendored
@ -1 +0,0 @@
|
||||
../../../templates
|
75
vendor/github.com/tektoncd/plumbing/scripts/README.md
generated
vendored
75
vendor/github.com/tektoncd/plumbing/scripts/README.md
generated
vendored
@ -59,21 +59,30 @@ This is a helper script to run the presubmit tests. To use it:
|
||||
integration tests (either your custom one or the default action) and will cause
|
||||
the test to fail if they don't return success.
|
||||
|
||||
1. [optional] Define the function `conformance_tests()`. If you don't define
|
||||
this function, the default action for running the conformance tests is to run
|
||||
`go test -race -v ./test -tags=conformance` in the repo.
|
||||
|
||||
1. [optional] Define the functions `pre_conformance_tests()` and/or
|
||||
`post_conformance_tests()`. These functions will be called before or after the
|
||||
conformance tests (either your custom one or the default action) and will cause
|
||||
the test to fail if they don't return success.
|
||||
|
||||
1. Call the `main()` function passing `$@` (without quotes).
|
||||
|
||||
Running the script without parameters, or with the `--all-tests` flag causes
|
||||
all tests to be executed, in the right order (i.e., build, then unit, then
|
||||
integration tests).
|
||||
integration, then conformance tests).
|
||||
|
||||
Use the flags `--build-tests`, `--unit-tests` and `--integration-tests` to run
|
||||
a specific set of tests. The flag `--emit-metrics` is used to emit metrics when
|
||||
Use the flags `--build-tests`, `--unit-tests`, `--integration-tests` and `--conformance-tests`
|
||||
to run a specific set of tests. The flag `--emit-metrics` is used to emit metrics when
|
||||
running the tests, and is automatically handled by the default action for
|
||||
integration tests (see above).
|
||||
|
||||
The script will automatically skip all presubmit tests for PRs where all changed
|
||||
files are exempt of tests (e.g., a PR changing only the `OWNERS` file).
|
||||
|
||||
Also, for PRs touching only markdown files, the unit and integration tests are
|
||||
Also, for PRs touching only markdown files, the unit, integration and conformance tests are
|
||||
skipped.
|
||||
|
||||
### Sample presubmit test script
|
||||
@ -214,58 +223,30 @@ kubectl get pods || fail_test
|
||||
success
|
||||
```
|
||||
|
||||
## Using the `release.sh` helper script
|
||||
## Using the `deploy-release.sh` helper script
|
||||
|
||||
This is a helper script for Knative release scripts. To use it:
|
||||
This is a helper script to deploy a Tekton release to the dogfooding cluster.
|
||||
|
||||
1. Source the script.
|
||||
Prerequisites:
|
||||
|
||||
1. [optional] By default, the release script will run `./test/presubmit-tests.sh`
|
||||
as the release validation tests. If you need to run something else, set the
|
||||
environment variable `VALIDATION_TESTS` to the executable to run.
|
||||
1. kubectl installed
|
||||
|
||||
1. Write logic for building the release in a function named `build_release()`.
|
||||
Set the environment variable `YAMLS_TO_PUBLISH` to the list of yaml files created,
|
||||
space separated. Use the following boolean (0 is false, 1 is true) and string
|
||||
environment variables for the logic:
|
||||
1. cluster gke_tekton-nightly_europe-north1-a_robocat defined in the local kubeconfig
|
||||
|
||||
- `RELEASE_VERSION`: contains the release version if `--version` was passed. This
|
||||
also overrides the value of the `TAG` variable as `v<version>`.
|
||||
- `RELEASE_BRANCH`: contains the release branch if `--branch` was passed. Otherwise
|
||||
it's empty and `master` HEAD will be considered the release branch.
|
||||
- `RELEASE_NOTES`: contains the filename with the release notes if `--release-notes`
|
||||
was passed. The release notes is a simple markdown file.
|
||||
- `RELEASE_GCS_BUCKET`: contains the GCS bucket name to store the manifests if
|
||||
`--release-gcs` was passed, otherwise the default value `knative-nightly/<repo>`
|
||||
will be used. It is empty if `--publish` was not passed.
|
||||
- `KO_DOCKER_REPO`: contains the GCR to store the images if `--release-gcr` was
|
||||
passed, otherwise the default value `gcr.io/knative-nightly` will be used. It
|
||||
is set to `ko.local` if `--publish` was not passed.
|
||||
- `SKIP_TESTS`: true if `--skip-tests` was passed. This is handled automatically.
|
||||
- `TAG_RELEASE`: true if `--tag-release` was passed. In this case, the environment
|
||||
variable `TAG` will contain the release tag in the form `vYYYYMMDD-<commit_short_hash>`.
|
||||
- `PUBLISH_RELEASE`: true if `--publish` was passed. In this case, the environment
|
||||
variable `KO_FLAGS` will be updated with the `-L` option.
|
||||
- `PUBLISH_TO_GITHUB`: true if `--version`, `--branch` and `--publish-release`
|
||||
were passed.
|
||||
Usage:
|
||||
|
||||
All boolean environment variables default to false for safety.
|
||||
`deploy-release.sh -p project -v version [-b bucket] [-e extra-path] [-f file]`
|
||||
|
||||
All environment variables above, except `KO_FLAGS`, are marked read-only once
|
||||
`main()` is called (see below).
|
||||
Where:
|
||||
|
||||
1. Call the `main()` function passing `$@` (without quotes).
|
||||
- `project` is `pipeline`, `triggers` or `dashboard`
|
||||
|
||||
### Sample release script
|
||||
- `version` is the release number i.e. `v0.13.2`
|
||||
|
||||
```bash
|
||||
source vendor/github.com/knative/test-infra/scripts/release.sh
|
||||
- `bucket` is the URL of the bucket where the release fiel is stored, `gs://tekton-releases` by default
|
||||
|
||||
function build_release() {
|
||||
# config/ contains the manifests
|
||||
ko resolve ${KO_FLAGS} -f config/ > release.yaml
|
||||
YAMLS_TO_PUBLISH="release.yaml"
|
||||
}
|
||||
- `extra-path` is the root path within the bucket where release are stored, empty by default
|
||||
|
||||
main $@
|
||||
```
|
||||
- `file` is the name of the release file, `release.yaml` by default
|
||||
|
||||
To summarize, the deployment job will look for the release file into `<bucket>/<extra-path>/<project>/previous/<version>/<file>`
|
||||
|
114
vendor/github.com/tektoncd/plumbing/scripts/deploy-release.sh
generated
vendored
Normal file
114
vendor/github.com/tektoncd/plumbing/scripts/deploy-release.sh
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
#!/bin/bash
|
||||
set -eu -o pipefail
|
||||
|
||||
declare TEKTON_PROJECT TEKTON_VERSION RELEASE_BUCKET_OPT RELEASE_EXTRA_PATH RELEASE_FILE
|
||||
|
||||
# This script allows to deploy a Tekton release to the dogfooding cluster
|
||||
# by creating a job in the robocat cluster. The complete flow is:
|
||||
# cronjob --[json payload]--> robocat event listener --> deploy trigger template --> deploy pipelinerun
|
||||
# The deploy pipelinerun users a cluster resource on the robocat cluster to deploy to dogfooding
|
||||
|
||||
# Prerequisites:
|
||||
# - kubectl installed
|
||||
# - cluster gke_tekton-nightly_europe-north1-a_robocat defined in the local kubeconfig
|
||||
|
||||
# Read command line options
|
||||
while getopts ":p:v:b:e:f:" opt; do
|
||||
case ${opt} in
|
||||
p )
|
||||
TEKTON_PROJECT=$OPTARG
|
||||
;;
|
||||
v )
|
||||
TEKTON_VERSION=$OPTARG
|
||||
;;
|
||||
b )
|
||||
RELEASE_BUCKET_OPT=$OPTARG
|
||||
;;
|
||||
e )
|
||||
RELEASE_EXTRA_PATH=$OPTARG
|
||||
;;
|
||||
f )
|
||||
RELEASE_FILE=$OPTARG
|
||||
;;
|
||||
\? )
|
||||
echo "Invalid option: $OPTARG" 1>&2
|
||||
echo 1>&2
|
||||
echo "Usage: deploy-release.sh -p project -v version [-b bucket] [-e extra-path] [-f file]" 1>&2
|
||||
;;
|
||||
: )
|
||||
echo "Invalid option: $OPTARG requires an argument" 1>&2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND -1))
|
||||
|
||||
# Check and defaults input params
|
||||
if [ -z "$TEKTON_PROJECT" ]; then
|
||||
echo "Please specify a project with -p project" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$TEKTON_VERSION" ]; then
|
||||
echo "Please specify a version with -v version" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
RELEASE_BUCKET=${RELEASE_BUCKET_OPT:-gs://tekton-releases}
|
||||
if [ -z "$RELEASE_FILE" ]; then
|
||||
if [ "$TEKTON_PROJECT" == "dashboard" ]; then
|
||||
RELEASE_FILE="tekton-dashboard-release-readonly.yaml"
|
||||
else
|
||||
RELEASE_FILE="release.yaml"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Deploy the release
|
||||
cat <<EOF | kubectl create --cluster gke_tekton-nightly_europe-north1-a_robocat -f-
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
generateName: tekton-deploy-${TEKTON_PROJECT}-${TEKTON_VERSION}-to-dogfooding-
|
||||
namespace: default
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: trigger
|
||||
image: curlimages/curl
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- mountPath: /workspace
|
||||
name: workspace
|
||||
command:
|
||||
- /bin/sh
|
||||
args:
|
||||
- -ce
|
||||
- |
|
||||
cat <<EOF > /workspace/post-body.json
|
||||
{
|
||||
"trigger-template": "tekton",
|
||||
"params": {
|
||||
"target": {
|
||||
"namespace": "tekton-pipelines",
|
||||
"cluster-resource": "dogfooding-tekton-deployer"
|
||||
},
|
||||
"tekton": {
|
||||
"project": "$TEKTON_PROJECT",
|
||||
"version": "$TEKTON_VERSION",
|
||||
"environment": "dogfooding",
|
||||
"bucket": "$RELEASE_BUCKET",
|
||||
"file": "$RELEASE_FILE",
|
||||
"extra-path": "$RELEASE_EXTRA_PATH"
|
||||
},
|
||||
"plumbing": {
|
||||
"repository": "github.com/tektoncd/plumbing",
|
||||
"revision": "main"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
curl -d @/workspace/post-body.json http://el-tekton-cd.default.svc.cluster.local:8080
|
||||
restartPolicy: Never
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: workspace
|
||||
EOF
|
10
vendor/github.com/tektoncd/plumbing/scripts/dummy.go
generated
vendored
10
vendor/github.com/tektoncd/plumbing/scripts/dummy.go
generated
vendored
@ -16,11 +16,5 @@ limitations under the License.
|
||||
|
||||
package scripts
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("This is a dummy go file so `go dep` or go modules can be used with tektoncd/plumbing/scripts")
|
||||
fmt.Println("This file can be safely removed if one day this directory contains real, useful go code")
|
||||
}
|
||||
// This is a dummy go file so `go dep` or go modules can be used with tektoncd/plumbing or sub-packages
|
||||
// This file can be safely removed if one day this directory contains real, useful go code
|
||||
|
2
vendor/github.com/tektoncd/plumbing/scripts/e2e-tests.sh
generated
vendored
Executable file → Normal file
2
vendor/github.com/tektoncd/plumbing/scripts/e2e-tests.sh
generated
vendored
Executable file → Normal file
@ -314,7 +314,7 @@ function setup_test_cluster() {
|
||||
# Gets the exit of the test script.
|
||||
# For more details, see set_test_return_code().
|
||||
function get_test_return_code() {
|
||||
echo $(cat ${TEST_RESULT_FILE})
|
||||
echo $(cat "${TEST_RESULT_FILE}")
|
||||
}
|
||||
|
||||
# Set the return code that the test script will return.
|
||||
|
6
vendor/github.com/tektoncd/plumbing/scripts/library.sh
generated
vendored
Executable file → Normal file
6
vendor/github.com/tektoncd/plumbing/scripts/library.sh
generated
vendored
Executable file → Normal file
@ -295,7 +295,7 @@ function report_go_test() {
|
||||
# Install go-junit-report if necessary.
|
||||
run_go_tool github.com/jstemmer/go-junit-report go-junit-report --help > /dev/null 2>&1
|
||||
local xml=$(mktemp ${ARTIFACTS}/junit_XXXXXXXX.xml)
|
||||
cat ${report} \
|
||||
cat "${report}" \
|
||||
| go-junit-report \
|
||||
| sed -e "s#\"github.com/tektoncd/${REPO_NAME}/#\"#g" \
|
||||
> ${xml}
|
||||
@ -325,7 +325,7 @@ function run_go_tool() {
|
||||
${tool} "$@"
|
||||
}
|
||||
|
||||
# Run dep-collector to update licenses.
|
||||
# Update licenses.
|
||||
# Parameters: $1 - output file, relative to repo root dir.
|
||||
# $2...$n - directories and files to inspect.
|
||||
function update_licenses() {
|
||||
@ -339,7 +339,7 @@ function update_licenses() {
|
||||
chmod +w $(find ${dst} -type d)
|
||||
}
|
||||
|
||||
# Run dep-collector to check for forbidden liceses.
|
||||
# Check for forbidden liceses.
|
||||
# Parameters: $1...$n - directories and files to inspect.
|
||||
function check_licenses() {
|
||||
go-licenses check ./...
|
||||
|
52
vendor/github.com/tektoncd/plumbing/scripts/presubmit-tests.sh
generated
vendored
Executable file → Normal file
52
vendor/github.com/tektoncd/plumbing/scripts/presubmit-tests.sh
generated
vendored
Executable file → Normal file
@ -53,7 +53,7 @@ GOFLAGS=${GOFLAGS:-}
|
||||
# Returns true if PR only contains the given file regexes.
|
||||
# Parameters: $1 - file regexes, space separated.
|
||||
function pr_only_contains() {
|
||||
[[ -z "$(cat "${CHANGED_FILES}" | grep -v "\(${1// /\\|}\)$")" ]]
|
||||
[[ -z "$(cat \"${CHANGED_FILES}\" | grep -v \"\(${1// /\\|}\)$\")" ]]
|
||||
}
|
||||
|
||||
# List changed files in the current PR.
|
||||
@ -61,7 +61,7 @@ function pr_only_contains() {
|
||||
function list_changed_files() {
|
||||
local file="${WORK_DIR}/changed_files"
|
||||
if [[ ! -f ${file} ]]; then
|
||||
git --no-pager diff --name-only ${PULL_BASE_SHA}..${PULL_SHA} > ${file}
|
||||
git --no-pager diff --name-only ${PULL_BASE_SHA}..${PULL_PULL_SHA} > ${file}
|
||||
fi
|
||||
echo ${file}
|
||||
}
|
||||
@ -77,8 +77,8 @@ function initialize_environment() {
|
||||
|
||||
WORK_DIR=$(mktemp -d)
|
||||
CHANGED_FILES="$(list_changed_files)"
|
||||
if [[ -n "$(cat ${CHANGED_FILES})" ]]; then
|
||||
echo -e "Changed files in commit ${PULL_PULL_SHA}:\n$(cat ${CHANGED_FILES})"
|
||||
if [[ -n "$(cat \"${CHANGED_FILES}\")" ]]; then
|
||||
echo -e "Changed files in commit ${PULL_PULL_SHA}:\n$(cat \"${CHANGED_FILES}\")"
|
||||
local no_presubmit_files="${NO_PRESUBMIT_FILES[*]}"
|
||||
pr_only_contains "${no_presubmit_files}" && IS_PRESUBMIT_EXEMPT_PR=1
|
||||
pr_only_contains "\.md ${no_presubmit_files}" && IS_DOCUMENTATION_PR=1
|
||||
@ -158,7 +158,7 @@ function yaml_build_tests() {
|
||||
subheader "Linting the yaml files"
|
||||
local yamlfiles=""
|
||||
|
||||
for file in $(cat ${CHANGED_FILES}); do
|
||||
for file in $(cat "${CHANGED_FILES}"); do
|
||||
[[ -z $(echo "${file}" | grep '\.yaml$\|\.yml$' | grep -v '^vendor/' | grep -v '^third_party/') ]] && continue
|
||||
|
||||
echo "found ${file}"
|
||||
@ -281,10 +281,43 @@ function default_integration_test_runner() {
|
||||
return ${failed}
|
||||
}
|
||||
|
||||
# Run conformance tests. If there's no `conformance_tests` function, run the default
|
||||
# conformance test runner.
|
||||
function run_conformance_tests() {
|
||||
(( ! RUN_CONFORMANCE_TESTS )) && return 0
|
||||
header "Running conformance tests"
|
||||
local failed=0
|
||||
# Run pre-conformance tests, if any
|
||||
if function_exists pre_conformance_tests; then
|
||||
pre_conformance_tests || failed=1
|
||||
fi
|
||||
# Don't run conformance tests if pre-conformance tests failed
|
||||
if (( ! failed )); then
|
||||
if function_exists conformance_tests; then
|
||||
conformance_tests || failed=1
|
||||
else
|
||||
default_conformance_test_runner || failed=1
|
||||
fi
|
||||
fi
|
||||
# Don't run post-conformance tests if pre/conformance tests failed
|
||||
if (( ! failed )) && function_exists post_conformance_tests; then
|
||||
post_conformance_tests || failed=1
|
||||
fi
|
||||
results_banner "Conformance" ${failed}
|
||||
return ${failed}
|
||||
}
|
||||
|
||||
# Default conformance test runner that runs conformance tests in the `test` folder.
|
||||
# This runner also runs tests without a build tag in the `test` folder.
|
||||
function default_conformance_test_runner() {
|
||||
report_go_test ./test -tags=conformance
|
||||
}
|
||||
|
||||
# Options set by command-line flags.
|
||||
RUN_BUILD_TESTS=0
|
||||
RUN_UNIT_TESTS=0
|
||||
RUN_INTEGRATION_TESTS=0
|
||||
RUN_CONFORMANCE_TESTS=0
|
||||
EMIT_METRICS=0
|
||||
|
||||
# Process flags and run tests accordingly.
|
||||
@ -330,11 +363,13 @@ function main() {
|
||||
--build-tests) RUN_BUILD_TESTS=1 ;;
|
||||
--unit-tests) RUN_UNIT_TESTS=1 ;;
|
||||
--integration-tests) RUN_INTEGRATION_TESTS=1 ;;
|
||||
--conformance-tests) RUN_CONFORMANCE_TESTS=1 ;;
|
||||
--emit-metrics) EMIT_METRICS=1 ;;
|
||||
--all-tests)
|
||||
RUN_BUILD_TESTS=1
|
||||
RUN_UNIT_TESTS=1
|
||||
RUN_INTEGRATION_TESTS=1
|
||||
RUN_CONFORMANCE_TESTS=1
|
||||
;;
|
||||
--run-test)
|
||||
shift
|
||||
@ -349,6 +384,7 @@ function main() {
|
||||
readonly RUN_BUILD_TESTS
|
||||
readonly RUN_UNIT_TESTS
|
||||
readonly RUN_INTEGRATION_TESTS
|
||||
readonly RUN_CONFORMANCE_TESTS
|
||||
readonly EMIT_METRICS
|
||||
readonly TEST_TO_RUN
|
||||
|
||||
@ -359,7 +395,7 @@ function main() {
|
||||
local failed=0
|
||||
|
||||
if [[ -n "${TEST_TO_RUN}" ]]; then
|
||||
if (( RUN_BUILD_TESTS || RUN_UNIT_TESTS || RUN_INTEGRATION_TESTS )); then
|
||||
if (( RUN_BUILD_TESTS || RUN_UNIT_TESTS || RUN_INTEGRATION_TESTS || RUN_CONFORMANCE_TESTS )); then
|
||||
abort "--run-test must be used alone"
|
||||
fi
|
||||
# If this is a presubmit run, but a documentation-only PR, don't run the test
|
||||
@ -376,6 +412,10 @@ function main() {
|
||||
if (( ! PRESUBMIT_TEST_FAIL_FAST )) || (( ! failed )); then
|
||||
run_integration_tests || failed=1
|
||||
fi
|
||||
# If PRESUBMIT_TEST_FAIL_FAST is set to true, don't run conformance tests if build/unit/integration tests failed
|
||||
if (( ! PRESUBMIT_TEST_FAIL_FAST )) || (( ! failed )); then
|
||||
run_conformance_tests || failed=1
|
||||
fi
|
||||
|
||||
exit ${failed}
|
||||
}
|
||||
|
2
vendor/modules.txt
vendored
Normal file
2
vendor/modules.txt
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# github.com/tektoncd/plumbing v0.0.0-20210305071546-f1f0e093f988
|
||||
github.com/tektoncd/plumbing/scripts
|
Loading…
Reference in New Issue
Block a user