From 892ccedad4c41edce7e9911f96ac36931ec00642 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Wed, 4 Dec 2024 17:34:17 +0100 Subject: [PATCH 01/23] chore: upgrade tekton pipeline to 0.65.3 with dependencies upgrades --- cmd/foghorn/main.go | 10 +- cmd/tektoncontroller/main.go | 10 +- go.mod | 128 +++++++------- go.sum | 313 +++++++++++++++++------------------ 4 files changed, 232 insertions(+), 229 deletions(-) diff --git a/cmd/foghorn/main.go b/cmd/foghorn/main.go index 1f62674a2..f0395cbdb 100644 --- a/cmd/foghorn/main.go +++ b/cmd/foghorn/main.go @@ -11,6 +11,8 @@ import ( "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/manager" ) type options struct { @@ -51,7 +53,13 @@ func main() { logrus.WithError(err).Fatal("Could not create kubeconfig") } - mgr, err := ctrl.NewManager(cfg, ctrl.Options{Scheme: scheme, Namespace: o.namespace}) + mgr, err := ctrl.NewManager(cfg, manager.Options{ + Cache: cache.Options{ + DefaultNamespaces: map[string]cache.Config{ + o.namespace: {}, + }, + }, + }) if err != nil { logrus.WithError(err).Fatal("Unable to start manager") } diff --git a/cmd/tektoncontroller/main.go b/cmd/tektoncontroller/main.go index ac3d9fd6b..65a034803 100644 --- a/cmd/tektoncontroller/main.go +++ b/cmd/tektoncontroller/main.go @@ -13,6 +13,8 @@ import ( pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/manager" ) type options struct { @@ -61,7 +63,13 @@ func main() { logrus.WithError(err).Fatal("Could not create kubeconfig") } - mgr, err := ctrl.NewManager(cfg, ctrl.Options{Scheme: scheme, Namespace: o.namespace}) + mgr, err := ctrl.NewManager(cfg, manager.Options{ + Cache: cache.Options{ + DefaultNamespaces: map[string]cache.Config{ + o.namespace: {}, + }, + }, + }) if err != nil { logrus.WithError(err).Fatal("Unable to start manager") } diff --git a/go.mod b/go.mod index 4e58eec14..9c50ab74d 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/evanphx/json-patch v4.12.0+incompatible github.com/go-stack/stack v1.8.0 github.com/google/go-cmp v0.6.0 - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.6.0 github.com/gorilla/sessions v1.2.1 github.com/h2non/gock v1.0.9 github.com/hashicorp/go-multierror v1.1.1 @@ -16,66 +16,62 @@ require ( github.com/jenkins-x/go-scm v1.14.56 github.com/mattn/go-zglob v0.0.1 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.20.1 + github.com/onsi/gomega v1.33.1 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.13.0 + github.com/prometheus/client_golang v1.19.1 github.com/shurcooL/githubv4 v0.0.0-20191102174205-af46314aec7b github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 - github.com/tektoncd/pipeline v0.41.0 - golang.org/x/oauth2 v0.21.0 + github.com/tektoncd/pipeline v0.65.3 + golang.org/x/oauth2 v0.22.0 gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 - k8s.io/api v0.25.9 - k8s.io/apimachinery v0.30.3 - k8s.io/client-go v0.25.9 - k8s.io/utils v0.0.0-20230726121419-3b25d923346b - knative.dev/pkg v0.0.0-20221011175852-714b7630a836 - sigs.k8s.io/controller-runtime v0.12.0 - sigs.k8s.io/yaml v1.3.0 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 + k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 + knative.dev/pkg v0.0.0-20240416145024-0f34a8815650 + sigs.k8s.io/controller-runtime v0.19.3 + sigs.k8s.io/yaml v1.4.0 ) require ( - cloud.google.com/go/compute/metadata v0.3.0 // indirect - code.gitea.io/sdk/gitea v0.15.1 // indirect + code.gitea.io/sdk/gitea v0.18.0 // indirect contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.0 // indirect + contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect fortio.org/safecast v1.0.0 // indirect - github.com/Azure/go-autorest/autorest v0.11.28 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blendle/zapdriver v1.3.1 // indirect github.com/bluekeyes/go-gitdiff v0.8.0 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.8.0 // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect - github.com/go-kit/log v0.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/davidmz/go-pageant v1.0.2 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/go-fed/httpsig v1.1.0 // indirect + github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.1 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.4.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-containerregistry v0.12.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/cel-go v0.20.1 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/gorilla/securecookie v1.1.1 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/imdario/mergo v0.3.15 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -83,42 +79,42 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 // indirect github.com/nxadm/tail v1.4.8 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/prometheus/statsd_exporter v0.21.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/statsd_exporter v0.22.7 // indirect github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/stoewer/go-strcase v1.2.0 // indirect + github.com/x448/float16 v0.8.4 // indirect go.opencensus.io v0.24.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.8.0 // indirect - go.uber.org/zap v1.23.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.126.0 // indirect - google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/grpc v1.56.3 // indirect - google.golang.org/protobuf v1.33.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/time v0.5.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect + google.golang.org/api v0.181.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/grpc v1.67.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.25.2 // indirect - k8s.io/component-base v0.25.2 // indirect - k8s.io/klog/v2 v2.90.1 // indirect - k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect + k8s.io/apiextensions-apiserver v0.31.0 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) replace ( @@ -131,8 +127,8 @@ replace ( // gomodules.xyz breaks in Athens proxying gomodules.xyz/jsonpatch/v2 => github.com/gomodules/jsonpatch/v2 v2.2.0 - k8s.io/api => k8s.io/api v0.25.9 - k8s.io/apimachinery => k8s.io/apimachinery v0.25.9 + k8s.io/api => k8s.io/api v0.31.3 + k8s.io/apimachinery => k8s.io/apimachinery v0.31.3 ) go 1.22.3 diff --git a/go.sum b/go.sum index e3b77e69f..eef9802f9 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,6 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -32,32 +30,17 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -code.gitea.io/gitea-vet v0.2.1/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE= -code.gitea.io/sdk/gitea v0.15.1 h1:WJreC7YYuxbn0UDaPuWIe/mtiNKTvLN8MLkaw71yx/M= -code.gitea.io/sdk/gitea v0.15.1/go.mod h1:klY2LVI3s3NChzIk/MzMn7G1FHrfU7qd63iSMVoHRBA= +code.gitea.io/sdk/gitea v0.18.0 h1:+zZrwVmujIrgobt6wVBWCqITz6bn1aBjnCUHmpZrerI= +code.gitea.io/sdk/gitea v0.18.0/go.mod h1:IG9xZJoltDNeDSW0qiF2Vqx5orMWa7OhVWrjvrd5NpI= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= -contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= -contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= +contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= +contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= fortio.org/safecast v1.0.0 h1:dr3131WPX8iS1pTf76+39WeXbTrerDYLvi9s7Oi3wiY= fortio.org/safecast v1.0.0/go.mod h1:xZmcPk3vi4kuUFf+tq4SvnlVdwViqf6ZSZl91Jr9Jdg= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= -github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.21 h1:jjQnVFXPfekaqb8vIsv2G1lxshoW+oGv4MDlhRtnYZk= -github.com/Azure/go-autorest/autorest/adal v0.9.21/go.mod h1:zua7mBUaCc5YnSLKYgGJR/w5ePdMDA6H56upLsHzA9U= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= @@ -67,9 +50,10 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -87,22 +71,24 @@ github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMr github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudevents/sdk-go/v2 v2.12.0 h1:p1k+ysVOZtNiXfijnwB3WqZNA3y2cGOiKQygWkUHCEI= -github.com/cloudevents/sdk-go/v2 v2.12.0/go.mod h1:xDmKfzNjM8gBvjaF8ijFjM1VYOVUEeUfapHMUX1T5To= +github.com/cloudevents/sdk-go/v2 v2.15.2 h1:54+I5xQEnI73RBhWHxbI1XJcqOFOVJN85vb41+8mHUc= +github.com/cloudevents/sdk-go/v2 v2.15.2/go.mod h1:lL7kSWAE/V8VI4Wh0jbL2v/jvqsm6tjmaQBSvxcv4uE= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= -github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0= +github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -110,50 +96,52 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI= +github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= -github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -182,14 +170,16 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/gomodules/jsonpatch/v2 v2.2.0 h1:QBjDK/nX43P4z/Os3gnk8VeFdLDgBuMns1Wljyo607U= github.com/gomodules/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= +github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= 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= @@ -200,10 +190,10 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.12.0 h1:nidOEtFYlgPCRqxCKj/4c/js940HVWplCWc5ftdfdUA= -github.com/google/go-containerregistry v0.12.0/go.mod h1:sdIK+oHQO7B93xI8UweYdl887YhuIwg9vz8BSLH3+8k= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -216,10 +206,12 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= @@ -227,8 +219,8 @@ github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/h2non/gock v1.0.9 h1:17gCehSo8ZOgEsFKpQgqHiR7VLyjxdAG3lkhVvO9QZU= github.com/h2non/gock v1.0.9/go.mod h1:CZMcB0Lg5IWnr9bF79pPMg9WeV6WumxQiUJ1UvdO1iE= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= @@ -238,13 +230,12 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= @@ -272,10 +263,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -285,8 +275,6 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/mattn/go-zglob v0.0.1 h1:xsEx/XUoVlI6yXjqBK062zYhRTZltCNmYPx6v+8DNaY= github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= @@ -311,52 +299,56 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= -github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= -github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= -github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/shurcooL/githubv4 v0.0.0-20191102174205-af46314aec7b h1:Cocq9/ZZxCoiybhygOR7hX4E3/PkV8eNbd1AEcUvaHM= github.com/shurcooL/githubv4 v0.0.0-20191102174205-af46314aec7b/go.mod h1:hAF0iLZy4td2EX+/8Tw+4nodhlMrwN3HupfaXj3zkGo= github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f h1:tygelZueB1EtXkPI6mQ4o9DQ0+FKW41hTbunoXZCTqk= @@ -368,6 +360,7 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -384,8 +377,11 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tektoncd/pipeline v0.41.0 h1:FksQuX83ZRasZygQPNmaR6hKBh6gy822XxRuoKBqPUE= -github.com/tektoncd/pipeline v0.41.0/go.mod h1:YY4+PGfdsd6Qxn3PZXmCpKeS3heK8pIIcnUt37vRJ2Q= +github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= +github.com/tektoncd/pipeline v0.65.3 h1:/HXL62kx1LTu76dvrCurafjl+KU2FjEwvcKeQ4WOjbk= +github.com/tektoncd/pipeline v0.65.3/go.mod h1:V3cyfxxc7b3GLT2a13GX2mWA86qmxWhh4mOp4gfFQwQ= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -399,27 +395,23 @@ go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= -go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -430,6 +422,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -450,8 +444,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -487,11 +481,10 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -499,8 +492,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -511,8 +504,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -555,16 +549,17 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= 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.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -572,13 +567,13 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -611,7 +606,6 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -623,8 +617,8 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -646,8 +640,8 @@ google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.181.0 h1:rPdjwnWgiPPOJx3IcSAQ2III5aX5tCer6wMpa/xmZi4= +google.golang.org/api v0.181.0/go.mod h1:MnQ+M0CFsfUwA5beZ+g/vCBCPXvtmZwRz2qzZk8ih1k= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -685,13 +679,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -705,8 +696,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= -google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -719,8 +710,10 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -728,6 +721,8 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= @@ -747,8 +742,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -758,32 +751,30 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.25.9 h1:XuJ2bz2F52jZmp3YjUcp/pozH8kY1BlBHdXnoOXBP3U= -k8s.io/api v0.25.9/go.mod h1:9YRWzD0cRHzfsnf9e5OQsQ4Un6cbZ//Xv3jo44YKm2Y= -k8s.io/apiextensions-apiserver v0.25.2 h1:8uOQX17RE7XL02ngtnh3TgifY7EhekpK+/piwzQNnBo= -k8s.io/apiextensions-apiserver v0.25.2/go.mod h1:iRwwRDlWPfaHhuBfQ0WMa5skdQfrE18QXJaJvIDLvE8= -k8s.io/apimachinery v0.25.9 h1:MPjgTz4dbAKJ/KiHIvDeYkFfIn7ueihqvT520HkV7v4= -k8s.io/apimachinery v0.25.9/go.mod h1:ZTl0drTQaFi5gMM3snYI5tWV1XJmRH1gfnDx2QCLsxk= -k8s.io/client-go v0.25.9 h1:U0S3nc71NRfHXiA0utyCkPt3Mv1SWpQw0g5VfBCv5xg= -k8s.io/client-go v0.25.9/go.mod h1:tmPyOtpbbkneXj65EYZ4sXun1BE/2F2XlRABVj9CBgc= -k8s.io/component-base v0.25.2 h1:Nve/ZyHLUBHz1rqwkjXm/Re6IniNa5k7KgzxZpTfSQY= -k8s.io/component-base v0.25.2/go.mod h1:90W21YMr+Yjg7MX+DohmZLzjsBtaxQDDwaX4YxDkl60= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a h1:gmovKNur38vgoWfGtP5QOGNOA7ki4n6qNYoFAgMlNvg= -k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/pkg v0.0.0-20221011175852-714b7630a836 h1:0N7Zo/O+xeUUebJPm9keBaGclrUoEbljr3J1MsqtaIM= -knative.dev/pkg v0.0.0-20221011175852-714b7630a836/go.mod h1:DMTRDJ5WRxf/DrlOPzohzfhSuJggscLZ8EavOq9O/x8= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= +k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +knative.dev/pkg v0.0.0-20240416145024-0f34a8815650 h1:m2ahFUO0L2VrgGDYdyOUFdE6xBd3pLXAJozLJwqLRQM= +knative.dev/pkg v0.0.0-20240416145024-0f34a8815650/go.mod h1:soFw5ss08G4PU3JiFDKqiZRd2U7xoqcfNpJP1coIXkY= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.12.0 h1:gA4zphrmHFc7ihmY/+GyyE0BxKD+OYdb5+DjD2azFAQ= -sigs.k8s.io/controller-runtime v0.12.0/go.mod h1:BKhxlA4l7FPK4AQcsuL4X6vZeWnKDXez/vp1Y8dxTU0= +sigs.k8s.io/controller-runtime v0.19.3 h1:XO2GvC9OPftRst6xWCpTgBZO04S2cbp0Qqkj8bX1sPw= +sigs.k8s.io/controller-runtime v0.19.3/go.mod h1:j4j87DqtsThvwTv5/Tc5NFRyyF/RF0ip4+62tbTSIUM= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= From 82ebd024b0030058e25b218befd84711293bdb6d Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 5 Dec 2024 11:24:11 +0100 Subject: [PATCH 02/23] chore: use pipelinev1beta1 everywhere --- pkg/apis/lighthouse/v1alpha1/breakpoint.go | 6 +- .../lighthouse/v1alpha1/breakpoint_test.go | 12 +- pkg/apis/lighthouse/v1alpha1/types.go | 4 +- pkg/config/job/base.go | 4 +- pkg/engines/tekton/activity.go | 4 +- pkg/engines/tekton/activity_test.go | 6 +- pkg/engines/tekton/controller_test.go | 11 +- pkg/engines/tekton/utils.go | 28 ++-- pkg/keeper/pipelinerun_monitor.go | 10 +- pkg/keeper/pipelinerun_monitor_test.go | 2 +- .../inrepo/default_parameters.go | 32 ++-- .../inrepo/default_parameters_test.go | 28 ++-- pkg/triggerconfig/inrepo/load_pipelinerun.go | 145 +++++++++--------- pkg/triggerconfig/inrepo/overrides.go | 12 +- pkg/triggerconfig/inrepo/params.go | 56 +++---- pkg/triggerconfig/inrepo/resolver_cache.go | 12 +- pkg/triggerconfig/inrepo/uses_resolver.go | 10 +- test/e2e/tekton/tekton_test.go | 10 +- 18 files changed, 195 insertions(+), 197 deletions(-) diff --git a/pkg/apis/lighthouse/v1alpha1/breakpoint.go b/pkg/apis/lighthouse/v1alpha1/breakpoint.go index dcbf88d23..97d03110e 100644 --- a/pkg/apis/lighthouse/v1alpha1/breakpoint.go +++ b/pkg/apis/lighthouse/v1alpha1/breakpoint.go @@ -2,7 +2,7 @@ package v1alpha1 import ( "github.com/jenkins-x/lighthouse/pkg/config/job" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -36,7 +36,7 @@ type LighthouseBreakpointSpec struct { Filter LighthousePipelineFilter `json:"filter,omitempty"` // Debug the debug configuration to apply - Debug tektonv1beta1.TaskRunDebug `json:"debug,omitempty"` + Debug pipelinev1beta1.TaskRunDebug `json:"debug,omitempty"` } // LighthousePipelineFilter defines the filter to use to apply breakpoints to new breakpoints @@ -82,7 +82,7 @@ func (f *LighthousePipelineFilter) Matches(o *LighthousePipelineFilter) bool { } // ResolveDebug resolves the debug breakpoint -func (f *LighthousePipelineFilter) ResolveDebug(breakpoints []*LighthouseBreakpoint) *tektonv1beta1.TaskRunDebug { +func (f *LighthousePipelineFilter) ResolveDebug(breakpoints []*LighthouseBreakpoint) *pipelinev1beta1.TaskRunDebug { // lets match the first breakpoint for _, bp := range breakpoints { if bp.Spec.Filter.Matches(f) { diff --git a/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go b/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go index e7a96af29..c657d222a 100644 --- a/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go +++ b/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go @@ -3,7 +3,7 @@ package v1alpha1_test import ( "testing" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "github.com/google/go-cmp/cmp" "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" @@ -21,7 +21,7 @@ func TestBreakpointResolveDebug(t *testing.T) { Context: "myctx", Task: "sometask", }, - Debug: tektonv1beta1.TaskRunDebug{ + Debug: pipelinev1beta1.TaskRunDebug{ Breakpoint: []string{"onFailure"}, }, }, @@ -31,7 +31,7 @@ func TestBreakpointResolveDebug(t *testing.T) { Filter: v1alpha1.LighthousePipelineFilter{ Task: "special-task", }, - Debug: tektonv1beta1.TaskRunDebug{ + Debug: pipelinev1beta1.TaskRunDebug{ Breakpoint: []string{"something"}, }, }, @@ -41,7 +41,7 @@ func TestBreakpointResolveDebug(t *testing.T) { tests := []struct { name string filterValues v1alpha1.LighthousePipelineFilter - expected *tektonv1beta1.TaskRunDebug + expected *pipelinev1beta1.TaskRunDebug }{ { name: "matches-all-values", @@ -53,7 +53,7 @@ func TestBreakpointResolveDebug(t *testing.T) { Context: "myctx", Task: "sometask", }, - expected: &tektonv1beta1.TaskRunDebug{ + expected: &pipelinev1beta1.TaskRunDebug{ Breakpoint: []string{"onFailure"}, }, }, @@ -89,7 +89,7 @@ func TestBreakpointResolveDebug(t *testing.T) { Context: "whatever", Task: "special-task", }, - expected: &tektonv1beta1.TaskRunDebug{ + expected: &pipelinev1beta1.TaskRunDebug{ Breakpoint: []string{"something"}, }, }, diff --git a/pkg/apis/lighthouse/v1alpha1/types.go b/pkg/apis/lighthouse/v1alpha1/types.go index e0c02ef57..8d0c1ac2b 100644 --- a/pkg/apis/lighthouse/v1alpha1/types.go +++ b/pkg/apis/lighthouse/v1alpha1/types.go @@ -8,7 +8,7 @@ import ( "time" "github.com/jenkins-x/lighthouse/pkg/config/job" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -146,7 +146,7 @@ type LighthouseJobSpec struct { MaxConcurrency int `json:"max_concurrency,omitempty"` // PipelineRunSpec provides the basis for running the test as a Tekton Pipeline // https://github.com/tektoncd/pipeline - PipelineRunSpec *tektonv1beta1.PipelineRunSpec `json:"pipeline_run_spec,omitempty"` + PipelineRunSpec *pipelinev1beta1.PipelineRunSpec `json:"pipeline_run_spec,omitempty"` // PipelineRunParams are the params used by the pipeline run PipelineRunParams []job.PipelineRunParam `json:"pipeline_run_params,omitempty"` // PodSpec provides the basis for running the test under a Kubernetes agent diff --git a/pkg/config/job/base.go b/pkg/config/job/base.go index 4c8f96dff..409949076 100644 --- a/pkg/config/job/base.go +++ b/pkg/config/job/base.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" ) @@ -67,7 +67,7 @@ type Base struct { // Spec is the Kubernetes pod spec used if Agent is kubernetes. Spec *v1.PodSpec `json:"spec,omitempty"` // PipelineRunSpec is the Tekton PipelineRun spec used if agent is tekton-pipeline - PipelineRunSpec *tektonv1beta1.PipelineRunSpec `json:"pipeline_run_spec,omitempty"` + PipelineRunSpec *pipelinev1beta1.PipelineRunSpec `json:"pipeline_run_spec,omitempty"` // PipelineRunParams are the params used by the pipeline run PipelineRunParams []PipelineRunParam `json:"pipeline_run_params,omitempty"` // lets us register a loader diff --git a/pkg/engines/tekton/activity.go b/pkg/engines/tekton/activity.go index 429780bcf..899e30a1c 100644 --- a/pkg/engines/tekton/activity.go +++ b/pkg/engines/tekton/activity.go @@ -8,14 +8,14 @@ import ( "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" "github.com/jenkins-x/lighthouse/pkg/config/job" "github.com/jenkins-x/lighthouse/pkg/util" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" ) // ConvertPipelineRun translates a PipelineRun into an ActivityRecord -func ConvertPipelineRun(pr *v1beta1.PipelineRun) *v1alpha1.ActivityRecord { +func ConvertPipelineRun(pr *pipelinev1beta1.PipelineRun) *v1alpha1.ActivityRecord { if pr == nil { return nil } diff --git a/pkg/engines/tekton/activity_test.go b/pkg/engines/tekton/activity_test.go index 791b22c98..66a880cae 100644 --- a/pkg/engines/tekton/activity_test.go +++ b/pkg/engines/tekton/activity_test.go @@ -10,7 +10,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/engines/tekton" "github.com/jenkins-x/lighthouse/pkg/util" "github.com/stretchr/testify/assert" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "sigs.k8s.io/yaml" ) @@ -51,10 +51,10 @@ func TestConvertPipelineRun(t *testing.T) { } } -func loadPipelineRun(t *testing.T, dir string) *v1beta1.PipelineRun { +func loadPipelineRun(t *testing.T, dir string) *pipelinev1beta1.PipelineRun { fileName := filepath.Join(dir, "pr.yaml") if assertFileExists(t, fileName) { - pr := &v1beta1.PipelineRun{} + pr := &pipelinev1beta1.PipelineRun{} data, err := os.ReadFile(fileName) if assert.NoError(t, err, "Failed to load file %s", fileName) { err = yaml.Unmarshal(data, pr) diff --git a/pkg/engines/tekton/controller_test.go b/pkg/engines/tekton/controller_test.go index 2310c660b..8a0acc7af 100644 --- a/pkg/engines/tekton/controller_test.go +++ b/pkg/engines/tekton/controller_test.go @@ -17,7 +17,6 @@ import ( "github.com/jenkins-x/lighthouse/pkg/util" "github.com/stretchr/testify/assert" pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -106,7 +105,7 @@ func TestReconcile(t *testing.T) { // assert observed state matches expected state if expectedPR != nil || generateTestOutput { - var pipelineRunList tektonv1beta1.PipelineRunList + var pipelineRunList pipelinev1beta1.PipelineRunList err := c.List(context.TODO(), &pipelineRunList, client.InNamespace(ns)) assert.NoError(t, err) assert.Len(t, pipelineRunList.Items, 1) @@ -176,7 +175,7 @@ func loadLighthouseJob(isObserved bool, dir string) (*v1alpha1.LighthouseJob, st return nil, fileName, nil } -func loadControllerPipelineRun(isObserved bool, dir string) (*tektonv1beta1.PipelineRun, string, error) { +func loadControllerPipelineRun(isObserved bool, dir string) (*pipelinev1beta1.PipelineRun, string, error) { var baseFn string if isObserved { baseFn = "observed-pr.yml" @@ -189,7 +188,7 @@ func loadControllerPipelineRun(isObserved bool, dir string) (*tektonv1beta1.Pipe return nil, fileName, err } if exists { - pr := &tektonv1beta1.PipelineRun{} + pr := &pipelinev1beta1.PipelineRun{} data, err := os.ReadFile(fileName) if err != nil { return nil, fileName, err @@ -203,14 +202,14 @@ func loadControllerPipelineRun(isObserved bool, dir string) (*tektonv1beta1.Pipe return nil, fileName, nil } -func loadObservedPipeline(dir string) (*tektonv1beta1.Pipeline, error) { +func loadObservedPipeline(dir string) (*pipelinev1beta1.Pipeline, error) { fileName := filepath.Join(dir, "observed-pipeline.yml") exists, err := util.FileExists(fileName) if err != nil { return nil, err } if exists { - p := &tektonv1beta1.Pipeline{} + p := &pipelinev1beta1.Pipeline{} data, err := os.ReadFile(fileName) if err != nil { return nil, err diff --git a/pkg/engines/tekton/utils.go b/pkg/engines/tekton/utils.go index dcb0dc52b..39b89b942 100644 --- a/pkg/engines/tekton/utils.go +++ b/pkg/engines/tekton/utils.go @@ -12,7 +12,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/jobutil" "github.com/pkg/errors" "github.com/sirupsen/logrus" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "sigs.k8s.io/controller-runtime/pkg/client" @@ -44,7 +44,7 @@ func trimDashboardURL(base string) string { // makePipeline creates a PipelineRun and substitutes LighthouseJob managed pipeline resources with ResourceSpec instead of ResourceRef // so that we don't have to take care of potentially dangling created pipeline resources. -func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace string, logger *logrus.Entry, idGen buildIDGenerator, c client.Reader) (*tektonv1beta1.PipelineRun, error) { +func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace string, logger *logrus.Entry, idGen buildIDGenerator, c client.Reader) (*pipelinev1beta1.PipelineRun, error) { // First validate. if lj.Spec.PipelineRunSpec == nil { return nil, errors.New("no PipelineSpec defined") @@ -58,7 +58,7 @@ func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace s prLabels, annotations := jobutil.LabelsAndAnnotationsForJob(lj, buildID) specCopy := lj.Spec.PipelineRunSpec.DeepCopy() generateName := jobutil.GenerateName(&lj.Spec) - p := tektonv1beta1.PipelineRun{ + p := pipelinev1beta1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Annotations: annotations, GenerateName: generateName, @@ -126,8 +126,8 @@ func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace s } } for _, key := range sets.StringKeySet(env).List() { - val := tektonv1beta1.ArrayOrString{ - Type: tektonv1beta1.ParamTypeString, + val := pipelinev1beta1.ArrayOrString{ + Type: pipelinev1beta1.ParamTypeString, StringVal: env[key], } new_param := true @@ -141,7 +141,7 @@ func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace s } // append if new param if new_param { - p.Spec.Params = append(p.Spec.Params, tektonv1beta1.Param{ + p.Spec.Params = append(p.Spec.Params, pipelinev1beta1.Param{ Name: key, Value: val, }) @@ -157,7 +157,7 @@ type gitTaskParamNames struct { baseRevisionParam string } -func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *tektonv1beta1.PipelineRun, c client.Reader) (*gitTaskParamNames, error) { +func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *pipelinev1beta1.PipelineRun, c client.Reader) (*gitTaskParamNames, error) { if pr == nil { return nil, errors.New("provided PipelineRun is nil") } @@ -165,14 +165,14 @@ func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *tektonv1beta1.P if pr.Spec.PipelineSpec == nil && pr.Spec.PipelineRef == nil { return nil, errors.New("neither PipelineSpec nor PipelineRef specified for PipelineRun") } - var pipelineSpec *tektonv1beta1.PipelineSpec + var pipelineSpec *pipelinev1beta1.PipelineSpec if pr.Spec.PipelineSpec != nil { pipelineSpec = pr.Spec.PipelineSpec } else if pr.Spec.PipelineRef.Name == "" { return nil, nil } else { - pipeline := tektonv1beta1.Pipeline{ObjectMeta: metav1.ObjectMeta{Name: pr.Spec.PipelineRef.Name, Namespace: pr.Namespace}} + pipeline := pipelinev1beta1.Pipeline{ObjectMeta: metav1.ObjectMeta{Name: pr.Spec.PipelineRef.Name, Namespace: pr.Namespace}} key := client.ObjectKeyFromObject(&pipeline) err := c.Get(ctx, key, &pipeline) if err != nil { @@ -187,10 +187,10 @@ func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *tektonv1beta1.P if task.TaskRef != nil { if task.TaskRef.Name == gitCloneCatalogTaskName { for _, p := range task.Params { - if p.Name == gitCloneURLParam && p.Value.Type == tektonv1beta1.ParamTypeString { + if p.Name == gitCloneURLParam && p.Value.Type == pipelinev1beta1.ParamTypeString { paramNames.urlParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } - if p.Name == gitCloneRevisionParam && p.Value.Type == tektonv1beta1.ParamTypeString { + if p.Name == gitCloneRevisionParam && p.Value.Type == pipelinev1beta1.ParamTypeString { paramNames.revParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } } @@ -201,13 +201,13 @@ func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *tektonv1beta1.P } if task.TaskRef.Name == gitMergeCatalogTaskName { for _, p := range task.Params { - if p.Name == gitCloneURLParam && p.Value.Type == tektonv1beta1.ParamTypeString { + if p.Name == gitCloneURLParam && p.Value.Type == pipelinev1beta1.ParamTypeString { paramNames.urlParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } - if p.Name == gitCloneRevisionParam && p.Value.Type == tektonv1beta1.ParamTypeString { + if p.Name == gitCloneRevisionParam && p.Value.Type == pipelinev1beta1.ParamTypeString { paramNames.baseRevisionParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } - if p.Name == gitMergeBatchRefsParam && p.Value.Type == tektonv1beta1.ParamTypeString { + if p.Name == gitMergeBatchRefsParam && p.Value.Type == pipelinev1beta1.ParamTypeString { paramNames.batchedRefsParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } } diff --git a/pkg/keeper/pipelinerun_monitor.go b/pkg/keeper/pipelinerun_monitor.go index 23e7bcaaf..9f61317f9 100644 --- a/pkg/keeper/pipelinerun_monitor.go +++ b/pkg/keeper/pipelinerun_monitor.go @@ -41,7 +41,7 @@ var ( func rerunPipelineRunsWithRaceConditionFailure(tektonClient tektonclient.Interface, ns string, logger *logrus.Entry) error { // Get all PipelineRuns without the label indicating we've already rerun it. notRerunLabelSelector := fmt.Sprintf("!%s", labelFailedAndRerun) - runs, err := tektonClient.TektonV1beta1().PipelineRuns(ns).List(context.TODO(), metav1.ListOptions{ + runs, err := tektonClient.pipelinev1beta1().PipelineRuns(ns).List(context.TODO(), metav1.ListOptions{ LabelSelector: notRerunLabelSelector, }) if err != nil { @@ -73,7 +73,7 @@ func rerunPipelineRunsWithRaceConditionFailure(tektonClient tektonclient.Interfa // Launch a new otherwise identical PipelineRun to replace the failing one. r := run newRun := createReplacementPipelineRun(&r) - _, err := tektonClient.TektonV1beta1().PipelineRuns(ns).Create(context.TODO(), newRun, metav1.CreateOptions{}) + _, err := tektonClient.pipelinev1beta1().PipelineRuns(ns).Create(context.TODO(), newRun, metav1.CreateOptions{}) if err != nil { return errors.Wrapf(err, "creating new PipelineRun %s to replace failed PipelineRun %s", newRun.Name, run.Name) } @@ -123,7 +123,7 @@ func pipelineRunShouldRetry(msg string) bool { } func patchPipelineRun(tektonClient tektonclient.Interface, namespace string, newPr *pipelinev1beta1.PipelineRun, logger *logrus.Entry) error { - pr, err := tektonClient.TektonV1beta1().PipelineRuns(namespace).Get(context.TODO(), newPr.GetName(), metav1.GetOptions{}) + pr, err := tektonClient.pipelinev1beta1().PipelineRuns(namespace).Get(context.TODO(), newPr.GetName(), metav1.GetOptions{}) if err != nil { return errors.Wrapf(err, "getting PipelineRun/%s", newPr.GetName()) } @@ -147,14 +147,14 @@ func patchPipelineRun(tektonClient tektonclient.Interface, namespace string, new if logger != nil { logger.Infof("Created merge patch: %v", string(patch)) } - patched, err := tektonClient.TektonV1beta1().PipelineRuns(namespace).Patch(context.TODO(), pr.Name, types.MergePatchType, patch, metav1.PatchOptions{}, "") + patched, err := tektonClient.pipelinev1beta1().PipelineRuns(namespace).Patch(context.TODO(), pr.Name, types.MergePatchType, patch, metav1.PatchOptions{}, "") if err != nil { return errors.Wrapf(err, "applying merge patch for PipelineRun/%s", pr.Name) } if !reflect.DeepEqual(patched.ObjectMeta.Labels, newPr.ObjectMeta.Labels) || !reflect.DeepEqual(patched.ObjectMeta.Annotations, newPr.ObjectMeta.Annotations) { patched.ObjectMeta.Labels = newPr.ObjectMeta.Labels patched.ObjectMeta.Annotations = newPr.ObjectMeta.Annotations - _, err := tektonClient.TektonV1beta1().PipelineRuns(namespace).Update(context.TODO(), patched, metav1.UpdateOptions{}) + _, err := tektonClient.pipelinev1beta1().PipelineRuns(namespace).Update(context.TODO(), patched, metav1.UpdateOptions{}) if err != nil { return errors.Wrapf(err, "removing labels and annotations from PipelineRun/%s", pr.Name) } diff --git a/pkg/keeper/pipelinerun_monitor_test.go b/pkg/keeper/pipelinerun_monitor_test.go index a7dd671e3..9bc2b5dfe 100644 --- a/pkg/keeper/pipelinerun_monitor_test.go +++ b/pkg/keeper/pipelinerun_monitor_test.go @@ -116,7 +116,7 @@ func TestRerunPipelineRunsWithRaceConditionFailure(t *testing.T) { err := rerunPipelineRunsWithRaceConditionFailure(tektonClient, ns, nil) assert.NoError(t, err) - prList, err := tektonClient.TektonV1beta1().PipelineRuns(ns).List(context.TODO(), metav1.ListOptions{}) + prList, err := tektonClient.pipelinev1beta1().PipelineRuns(ns).List(context.TODO(), metav1.ListOptions{}) assert.NoError(t, err) if tc.shouldRerun { diff --git a/pkg/triggerconfig/inrepo/default_parameters.go b/pkg/triggerconfig/inrepo/default_parameters.go index e02d9c409..1fedf8b82 100644 --- a/pkg/triggerconfig/inrepo/default_parameters.go +++ b/pkg/triggerconfig/inrepo/default_parameters.go @@ -5,17 +5,17 @@ import ( "strings" "github.com/tektoncd/pipeline/pkg/apis/config" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "github.com/pkg/errors" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" corev1 "k8s.io/api/core/v1" ) var ( // defaultParameterSpecs the default Lighthouse Pipeline Parameters which can be injected by the // lighthouse tekton engine - defaultParameterSpecs = []v1beta1.ParamSpec{ + defaultParameterSpecs = []pipelinev1beta1.ParamSpec{ { Description: "the unique build number", Name: "BUILD_ID", @@ -50,8 +50,8 @@ var ( Description: "git pull request number", Name: "PULL_NUMBER", Type: "string", - Default: &v1beta1.ArrayOrString{ - Type: v1beta1.ParamTypeString, + Default: &pipelinev1beta1.ArrayOrString{ + Type: pipelinev1beta1.ParamTypeString, StringVal: "", }, }, @@ -59,8 +59,8 @@ var ( Description: "git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'", Name: "PULL_PULL_REF", Type: "string", - Default: &v1beta1.ArrayOrString{ - Type: v1beta1.ParamTypeString, + Default: &pipelinev1beta1.ArrayOrString{ + Type: pipelinev1beta1.ParamTypeString, StringVal: "", }, }, @@ -68,8 +68,8 @@ var ( Description: "git revision to checkout (branch, tag, sha, ref…)", Name: "PULL_PULL_SHA", Type: "string", - Default: &v1beta1.ArrayOrString{ - Type: v1beta1.ParamTypeString, + Default: &pipelinev1beta1.ArrayOrString{ + Type: pipelinev1beta1.ParamTypeString, StringVal: "", }, }, @@ -100,7 +100,7 @@ var ( // DefaultPipelineParameters defaults the parameter specs and parameter values from lighthouse onto // the PipelineRun and its nested PipelineSpec and Tasks -func DefaultPipelineParameters(prs *v1beta1.PipelineRun) (*v1beta1.PipelineRun, error) { +func DefaultPipelineParameters(prs *pipelinev1beta1.PipelineRun) (*pipelinev1beta1.PipelineRun, error) { if prs.Annotations != nil && prs.Annotations[DefaultParameters] == "false" { return prs, nil } @@ -119,7 +119,7 @@ func DefaultPipelineParameters(prs *v1beta1.PipelineRun) (*v1beta1.PipelineRun, // lets create a step template if its not already defined if task.TaskSpec.StepTemplate == nil { - task.TaskSpec.StepTemplate = &v1beta1.StepTemplate{} + task.TaskSpec.StepTemplate = &pipelinev1beta1.StepTemplate{} } stepTemplate := task.TaskSpec.StepTemplate stepTemplate.Env = addDefaultParameterEnvVars(stepTemplate.Env, defaultParameters) @@ -134,7 +134,7 @@ func DefaultPipelineParameters(prs *v1beta1.PipelineRun) (*v1beta1.PipelineRun, // lets create a step template if its not already defined if task.TaskSpec.StepTemplate == nil { - task.TaskSpec.StepTemplate = &v1beta1.StepTemplate{} + task.TaskSpec.StepTemplate = &pipelinev1beta1.StepTemplate{} } stepTemplate := task.TaskSpec.StepTemplate stepTemplate.Env = addDefaultParameterEnvVars(stepTemplate.Env, defaultParameters) @@ -182,7 +182,7 @@ func enableAlphaAPIFields(ctx context.Context) context.Context { return config.ToContext(ctx, cfg) } -func addDefaultParameterSpecs(params []v1beta1.ParamSpec, defaults []v1beta1.ParamSpec) []v1beta1.ParamSpec { +func addDefaultParameterSpecs(params []pipelinev1beta1.ParamSpec, defaults []pipelinev1beta1.ParamSpec) []pipelinev1beta1.ParamSpec { for _, dp := range defaults { found := false for i := range params { @@ -205,7 +205,7 @@ func addDefaultParameterSpecs(params []v1beta1.ParamSpec, defaults []v1beta1.Par return params } -func addDefaultParameters(params []v1beta1.Param, defaults []v1beta1.Param) []v1beta1.Param { +func addDefaultParameters(params []pipelinev1beta1.Param, defaults []pipelinev1beta1.Param) []pipelinev1beta1.Param { for _, dp := range defaults { found := false for i := range params { @@ -214,11 +214,11 @@ func addDefaultParameters(params []v1beta1.Param, defaults []v1beta1.Param) []v1 found = true if p.Value.Type == dp.Value.Type { switch p.Value.Type { - case v1beta1.ParamTypeString: + case pipelinev1beta1.ParamTypeString: if p.Value.StringVal == "" { p.Value.StringVal = dp.Value.StringVal } - case v1beta1.ParamTypeArray: + case pipelinev1beta1.ParamTypeArray: if len(p.Value.ArrayVal) == 0 { p.Value.ArrayVal = dp.Value.ArrayVal } @@ -234,7 +234,7 @@ func addDefaultParameters(params []v1beta1.Param, defaults []v1beta1.Param) []v1 return params } -func addDefaultParameterEnvVars(env []corev1.EnvVar, defaults []v1beta1.Param) []corev1.EnvVar { +func addDefaultParameterEnvVars(env []corev1.EnvVar, defaults []pipelinev1beta1.Param) []corev1.EnvVar { for _, dp := range defaults { name := dp.Name upperName := strings.ToUpper(name) diff --git a/pkg/triggerconfig/inrepo/default_parameters_test.go b/pkg/triggerconfig/inrepo/default_parameters_test.go index 95a7b4b89..2f267e755 100644 --- a/pkg/triggerconfig/inrepo/default_parameters_test.go +++ b/pkg/triggerconfig/inrepo/default_parameters_test.go @@ -6,18 +6,18 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/stretchr/testify/assert" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" ) func TestDefaultWorkspacesEmptyDir(t *testing.T) { - prs := &v1beta1.PipelineRun{ + prs := &pipelinev1beta1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "cheese", }, - Spec: v1beta1.PipelineRunSpec{ - PipelineSpec: &v1beta1.PipelineSpec{}, - Workspaces: []v1beta1.WorkspaceBinding{ + Spec: pipelinev1beta1.PipelineRunSpec{ + PipelineSpec: &pipelinev1beta1.PipelineSpec{}, + Workspaces: []pipelinev1beta1.WorkspaceBinding{ {Name: "foo"}, {Name: "bar"}, }, @@ -33,26 +33,26 @@ func TestDefaultWorkspacesEmptyDir(t *testing.T) { func TestDefaultFinallyParameters(t *testing.T) { - prs := &v1beta1.PipelineRun{ + prs := &pipelinev1beta1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "cheese", }, - Spec: v1beta1.PipelineRunSpec{ - PipelineSpec: &v1beta1.PipelineSpec{ - Tasks: []v1beta1.PipelineTask{{ + Spec: pipelinev1beta1.PipelineRunSpec{ + PipelineSpec: &pipelinev1beta1.PipelineSpec{ + Tasks: []pipelinev1beta1.PipelineTask{{ Name: "maintask", - TaskSpec: &v1beta1.EmbeddedTask{TaskSpec: v1beta1.TaskSpec{ - Steps: []v1beta1.Step{{ + TaskSpec: &pipelinev1beta1.EmbeddedTask{TaskSpec: pipelinev1beta1.TaskSpec{ + Steps: []pipelinev1beta1.Step{{ Name: "mystep", Image: "myimage", }}, }}, }}, - Finally: []v1beta1.PipelineTask{{ + Finally: []pipelinev1beta1.PipelineTask{{ Name: "i-should-have-parameters", - TaskSpec: &v1beta1.EmbeddedTask{TaskSpec: v1beta1.TaskSpec{ - Steps: []v1beta1.Step{{ + TaskSpec: &pipelinev1beta1.EmbeddedTask{TaskSpec: pipelinev1beta1.TaskSpec{ + Steps: []pipelinev1beta1.Step{{ Name: "finallystep", Image: "finallyimage", }}, diff --git a/pkg/triggerconfig/inrepo/load_pipelinerun.go b/pkg/triggerconfig/inrepo/load_pipelinerun.go index ff18b06e4..f2b8865ed 100644 --- a/pkg/triggerconfig/inrepo/load_pipelinerun.go +++ b/pkg/triggerconfig/inrepo/load_pipelinerun.go @@ -12,15 +12,14 @@ import ( "time" "github.com/pkg/errors" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" ) const ( // TektonAPIVersion the default tekton API version - TektonAPIVersion = "tekton.dev/v1beta1" + TektonAPIVersion = "tekton.dev/v1" // DefaultParameters the annotation used to disable default parameters DefaultParameters = "lighthouse.jenkins-x.io/defaultParameters" @@ -63,7 +62,7 @@ func NewDefaultValues() (*DefaultValues, error) { // LoadTektonResourceAsPipelineRun loads a PipelineRun, Pipeline, Task or TaskRun and convert it to a PipelineRun // if necessary -func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*tektonv1beta1.PipelineRun, error) { +func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipelinev1beta1.PipelineRun, error) { if resolver.DefaultValues == nil { var err error resolver.DefaultValues, err = NewDefaultValues() @@ -91,7 +90,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*tekt } switch kind { case "Pipeline": - pipeline := &tektonv1beta1.Pipeline{} + pipeline := &pipelinev1beta1.Pipeline{} err := yaml.Unmarshal(data, pipeline) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshal Pipeline YAML %s", message) @@ -117,7 +116,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*tekt return DefaultPipelineParameters(prs) case "PipelineRun": - prs := &tektonv1beta1.PipelineRun{} + prs := &pipelinev1beta1.PipelineRun{} err := yaml.Unmarshal(data, prs) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshal PipelineRun YAML %s", message) @@ -140,7 +139,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*tekt return DefaultPipelineParameters(prs) case "Task": - task := &tektonv1beta1.Task{} + task := &pipelinev1beta1.Task{} err := yaml.Unmarshal(data, task) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshal Task YAML %s", message) @@ -167,7 +166,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*tekt return DefaultPipelineParameters(prs) case "TaskRun": - tr := &tektonv1beta1.TaskRun{} + tr := &pipelinev1beta1.TaskRun{} err := yaml.Unmarshal(data, tr) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshal TaskRun YAML %s", message) @@ -198,7 +197,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*tekt } } -func defaultTaskName(prs *tektonv1beta1.PipelineRun) { +func defaultTaskName(prs *pipelinev1beta1.PipelineRun) { ps := prs.Spec.PipelineSpec if ps != nil && len(ps.Tasks) > 0 { t := ps.Tasks[0] @@ -209,7 +208,7 @@ func defaultTaskName(prs *tektonv1beta1.PipelineRun) { } // inheritTaskSteps allows Task steps to be prepended or appended if the annotations are present -func inheritTaskSteps(resolver *UsesResolver, prs *tektonv1beta1.PipelineRun) (*tektonv1beta1.PipelineRun, error) { +func inheritTaskSteps(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun) (*pipelinev1beta1.PipelineRun, error) { err := processUsesSteps(resolver, prs) if err != nil { return prs, errors.Wrap(err, "failed to process uses steps") @@ -224,8 +223,8 @@ func inheritTaskSteps(resolver *UsesResolver, prs *tektonv1beta1.PipelineRun) (* appendURL := prs.Annotations[AppendStepURL] prependURL := prs.Annotations[PrependStepURL] - var appendTask *tektonv1beta1.Task - var prependTask *tektonv1beta1.Task + var appendTask *pipelinev1beta1.Task + var prependTask *pipelinev1beta1.Task if appendURL != "" { appendTask, err = loadTaskByURL(appendURL) @@ -253,12 +252,12 @@ func inheritTaskSteps(resolver *UsesResolver, prs *tektonv1beta1.PipelineRun) (* } // processUsesSteps handles any step which has an image prefixed with "uses:" -func processUsesSteps(resolver *UsesResolver, prs *tektonv1beta1.PipelineRun) error { +func processUsesSteps(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun) error { ps := prs.Spec.PipelineSpec if ps == nil { return nil } - tasksAndFinally := [][]v1beta1.PipelineTask{ + tasksAndFinally := [][]pipelinev1beta1.PipelineTask{ ps.Tasks, ps.Finally, } @@ -271,13 +270,13 @@ func processUsesSteps(resolver *UsesResolver, prs *tektonv1beta1.PipelineRun) er return nil } -func processUsesStepsHelper(resolver *UsesResolver, prs *tektonv1beta1.PipelineRun, pipelineTasks []tektonv1beta1.PipelineTask) error { +func processUsesStepsHelper(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun, pipelineTasks []pipelinev1beta1.PipelineTask) error { for i := range pipelineTasks { pt := &pipelineTasks[i] if pt.TaskSpec != nil { ts := &pt.TaskSpec.TaskSpec clearStepTemplateImage := false - var steps []tektonv1beta1.Step + var steps []pipelinev1beta1.Step for j := range ts.Steps { step := ts.Steps[j] image := step.Image @@ -316,7 +315,7 @@ func processUsesStepsHelper(resolver *UsesResolver, prs *tektonv1beta1.PipelineR return nil } -func loadTaskByURL(uri string) (*tektonv1beta1.Task, error) { +func loadTaskByURL(uri string) (*pipelinev1beta1.Task, error) { resp, err := http.Get(uri) // #nosec if err != nil { return nil, errors.Wrapf(err, "failed to read URL %s", uri) @@ -328,7 +327,7 @@ func loadTaskByURL(uri string) (*tektonv1beta1.Task, error) { return nil, errors.Wrapf(err, "failed to read body from URL %s", uri) } - task := &tektonv1beta1.Task{} + task := &pipelinev1beta1.Task{} err = yaml.Unmarshal(data, &task) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshall YAML from URL %s", uri) @@ -338,7 +337,7 @@ func loadTaskByURL(uri string) (*tektonv1beta1.Task, error) { // loadTektonRefsFromFilesPattern returns a regular expression matching the Pipeline/Task references we should load // via the file system as separate local files -func loadTektonRefsFromFilesPattern(prs *tektonv1beta1.PipelineRun) (*regexp.Regexp, error) { +func loadTektonRefsFromFilesPattern(prs *pipelinev1beta1.PipelineRun) (*regexp.Regexp, error) { if prs.Annotations == nil { return nil, nil } @@ -353,7 +352,7 @@ func loadTektonRefsFromFilesPattern(prs *tektonv1beta1.PipelineRun) (*regexp.Reg return re, nil } -func loadPipelineRunRefs(resolver *UsesResolver, prs *tektonv1beta1.PipelineRun, dir, message string, re *regexp.Regexp) (*tektonv1beta1.PipelineRun, error) { +func loadPipelineRunRefs(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun, dir, message string, re *regexp.Regexp) (*pipelinev1beta1.PipelineRun, error) { // if we reference a local if prs.Spec.PipelineSpec == nil && prs.Spec.PipelineRef != nil && prs.Spec.PipelineRef.Name != "" && re.MatchString(prs.Spec.PipelineRef.Name) { pipelinePath := filepath.Join(dir, prs.Spec.PipelineRef.Name) @@ -367,7 +366,7 @@ func loadPipelineRunRefs(resolver *UsesResolver, prs *tektonv1beta1.PipelineRun, if len(data) == 0 { return prs, errors.Errorf("no YAML for path %s in PipelineRun", pipelinePath) } - p := &tektonv1beta1.Pipeline{} + p := &pipelinev1beta1.Pipeline{} err = yaml.Unmarshal(data, p) if err != nil { return prs, errors.Wrapf(err, "failed to unmarshal Pipeline YAML file %s %s", pipelinePath, message) @@ -385,7 +384,7 @@ func loadPipelineRunRefs(resolver *UsesResolver, prs *tektonv1beta1.PipelineRun, return prs, nil } -func loadTaskRefs(resolver *UsesResolver, pipelineSpec *tektonv1beta1.PipelineSpec, dir, message string, re *regexp.Regexp) error { +func loadTaskRefs(resolver *UsesResolver, pipelineSpec *pipelinev1beta1.PipelineSpec, dir, message string, re *regexp.Regexp) error { for i := range pipelineSpec.Tasks { t := &pipelineSpec.Tasks[i] if t.TaskSpec == nil && t.TaskRef != nil && t.TaskRef.Name != "" && re.MatchString(t.TaskRef.Name) { @@ -400,12 +399,12 @@ func loadTaskRefs(resolver *UsesResolver, pipelineSpec *tektonv1beta1.PipelineSp if len(data) == 0 { return errors.Errorf("no YAML for path %s in PipelineSpec", path) } - t2 := &tektonv1beta1.Task{} + t2 := &pipelinev1beta1.Task{} err = yaml.Unmarshal(data, t2) if err != nil { return errors.Wrapf(err, "failed to unmarshal Task YAML file %s %s", path, message) } - t.TaskSpec = &tektonv1beta1.EmbeddedTask{ + t.TaskSpec = &pipelinev1beta1.EmbeddedTask{ TaskSpec: t2.Spec, } t.TaskRef = nil @@ -415,8 +414,8 @@ func loadTaskRefs(resolver *UsesResolver, pipelineSpec *tektonv1beta1.PipelineSp } // ConvertPipelineToPipelineRun converts the Pipeline to a PipelineRun -func ConvertPipelineToPipelineRun(from *tektonv1beta1.Pipeline, message string, defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error) { - prs := &tektonv1beta1.PipelineRun{ +func ConvertPipelineToPipelineRun(from *pipelinev1beta1.Pipeline, message string, defaultValues *DefaultValues) (*pipelinev1beta1.PipelineRun, error) { + prs := &pipelinev1beta1.PipelineRun{ TypeMeta: metav1.TypeMeta{ Kind: "PipelineRun", APIVersion: TektonAPIVersion, @@ -432,8 +431,8 @@ func ConvertPipelineToPipelineRun(from *tektonv1beta1.Pipeline, message string, } // ConvertTaskToPipelineRun converts the Task to a PipelineRun -func ConvertTaskToPipelineRun(from *tektonv1beta1.Task, message string, defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error) { - prs := &tektonv1beta1.PipelineRun{ +func ConvertTaskToPipelineRun(from *pipelinev1beta1.Task, message string, defaultValues *DefaultValues) (*pipelinev1beta1.PipelineRun, error) { + prs := &pipelinev1beta1.PipelineRun{ TypeMeta: metav1.TypeMeta{ Kind: "PipelineRun", APIVersion: TektonAPIVersion, @@ -444,13 +443,13 @@ func ConvertTaskToPipelineRun(from *tektonv1beta1.Task, message string, defaultV prs.Labels = from.Labels fs := &from.Spec - pipelineSpec := &tektonv1beta1.PipelineSpec{ + pipelineSpec := &pipelinev1beta1.PipelineSpec{ Description: "", Resources: nil, - Tasks: []tektonv1beta1.PipelineTask{ + Tasks: []pipelinev1beta1.PipelineTask{ { Name: from.Name, - TaskSpec: &tektonv1beta1.EmbeddedTask{TaskSpec: *fs}, + TaskSpec: &pipelinev1beta1.EmbeddedTask{TaskSpec: *fs}, Resources: ToPipelineResources(fs.Resources), Params: ToParams(fs.Params), Workspaces: ToWorkspacePipelineTaskBindingsFromDeclarations(fs.Workspaces), @@ -479,8 +478,8 @@ func ConvertTaskToPipelineRun(from *tektonv1beta1.Task, message string, defaultV } // ConvertTaskRunToPipelineRun converts the TaskRun to a PipelineRun -func ConvertTaskRunToPipelineRun(from *tektonv1beta1.TaskRun, message string, defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error) { - prs := &tektonv1beta1.PipelineRun{ +func ConvertTaskRunToPipelineRun(from *pipelinev1beta1.TaskRun, message string, defaultValues *DefaultValues) (*pipelinev1beta1.PipelineRun, error) { + prs := &pipelinev1beta1.PipelineRun{ TypeMeta: metav1.TypeMeta{ Kind: "PipelineRun", APIVersion: TektonAPIVersion, @@ -492,7 +491,7 @@ func ConvertTaskRunToPipelineRun(from *tektonv1beta1.TaskRun, message string, de fs := &from.Spec params := fs.Params - var paramSpecs []tektonv1beta1.ParamSpec + var paramSpecs []pipelinev1beta1.ParamSpec if len(params) == 0 && fs.TaskSpec != nil { paramSpecs = fs.TaskSpec.Params if len(params) == 0 { @@ -502,14 +501,14 @@ func ConvertTaskRunToPipelineRun(from *tektonv1beta1.TaskRun, message string, de if len(paramSpecs) == 0 { paramSpecs = ToParamSpecs(params) } - pipelineSpec := &tektonv1beta1.PipelineSpec{ + pipelineSpec := &pipelinev1beta1.PipelineSpec{ Description: "", Resources: nil, - Tasks: []tektonv1beta1.PipelineTask{ + Tasks: []pipelinev1beta1.PipelineTask{ { Name: from.Name, TaskRef: fs.TaskRef, - TaskSpec: &tektonv1beta1.EmbeddedTask{TaskSpec: *fs.TaskSpec}, + TaskSpec: &pipelinev1beta1.EmbeddedTask{TaskSpec: *fs.TaskSpec}, //Resources: fs.Resources, Params: params, Workspaces: ToWorkspacePipelineTaskBindings(fs.Workspaces), @@ -530,7 +529,7 @@ func ConvertTaskRunToPipelineRun(from *tektonv1beta1.TaskRun, message string, de } // Apply adds any default values that are empty in the generated PipelineRun -func (v *DefaultValues) Apply(prs *tektonv1beta1.PipelineRun) { +func (v *DefaultValues) Apply(prs *pipelinev1beta1.PipelineRun) { if prs.Spec.ServiceAccountName == "" && v.ServiceAccountName != "" { prs.Spec.ServiceAccountName = v.ServiceAccountName } @@ -540,13 +539,13 @@ func (v *DefaultValues) Apply(prs *tektonv1beta1.PipelineRun) { } // ToParams converts the param specs to params -func ToParams(params []tektonv1beta1.ParamSpec) []tektonv1beta1.Param { - var answer []tektonv1beta1.Param +func ToParams(params []pipelinev1beta1.ParamSpec) []pipelinev1beta1.Param { + var answer []pipelinev1beta1.Param for _, p := range params { - answer = append(answer, tektonv1beta1.Param{ + answer = append(answer, pipelinev1beta1.Param{ Name: p.Name, - Value: tektonv1beta1.ArrayOrString{ - Type: tektonv1beta1.ParamTypeString, + Value: pipelinev1beta1.ArrayOrString{ + Type: pipelinev1beta1.ParamTypeString, StringVal: fmt.Sprintf("$(params.%s)", p.Name), }, }) @@ -555,13 +554,13 @@ func ToParams(params []tektonv1beta1.ParamSpec) []tektonv1beta1.Param { } // ToParamSpecs generates param specs from the params -func ToParamSpecs(params []tektonv1beta1.Param) []tektonv1beta1.ParamSpec { - var answer []tektonv1beta1.ParamSpec +func ToParamSpecs(params []pipelinev1beta1.Param) []pipelinev1beta1.ParamSpec { + var answer []pipelinev1beta1.ParamSpec for _, p := range params { - answer = append(answer, tektonv1beta1.ParamSpec{ + answer = append(answer, pipelinev1beta1.ParamSpec{ Name: p.Name, // lets assume strings for now - Type: tektonv1beta1.ParamTypeString, + Type: pipelinev1beta1.ParamTypeString, Description: "", Default: nil, }) @@ -570,19 +569,19 @@ func ToParamSpecs(params []tektonv1beta1.Param) []tektonv1beta1.ParamSpec { } // ToPipelineResources converts the task resources to piepline resources -func ToPipelineResources(resources *tektonv1beta1.TaskResources) *tektonv1beta1.PipelineTaskResources { +func ToPipelineResources(resources *pipelinev1beta1.TaskResources) *pipelinev1beta1.PipelineTaskResources { if resources == nil { return nil } - return &tektonv1beta1.PipelineTaskResources{ + return &pipelinev1beta1.PipelineTaskResources{ Inputs: ToPipelineInputs(resources.Inputs), Outputs: ToPipelineOutputs(resources.Inputs), } } // ToPipelineInputs converts the task resources into pipeline inputs -func ToPipelineInputs(inputs []tektonv1beta1.TaskResource) []tektonv1beta1.PipelineTaskInputResource { - var answer []tektonv1beta1.PipelineTaskInputResource +func ToPipelineInputs(inputs []pipelinev1beta1.TaskResource) []pipelinev1beta1.PipelineTaskInputResource { + var answer []pipelinev1beta1.PipelineTaskInputResource for _, from := range inputs { answer = append(answer, ToPipelineInput(from)) } @@ -590,8 +589,8 @@ func ToPipelineInputs(inputs []tektonv1beta1.TaskResource) []tektonv1beta1.Pipel } // ToPipelineOutputs converts the task resources into pipeline outputs -func ToPipelineOutputs(inputs []tektonv1beta1.TaskResource) []tektonv1beta1.PipelineTaskOutputResource { - var answer []tektonv1beta1.PipelineTaskOutputResource +func ToPipelineOutputs(inputs []pipelinev1beta1.TaskResource) []pipelinev1beta1.PipelineTaskOutputResource { + var answer []pipelinev1beta1.PipelineTaskOutputResource for _, from := range inputs { answer = append(answer, ToPipelineOutput(from)) } @@ -599,8 +598,8 @@ func ToPipelineOutputs(inputs []tektonv1beta1.TaskResource) []tektonv1beta1.Pipe } // ToPipelineInput converts the task resource into pipeline inputs -func ToPipelineInput(from tektonv1beta1.TaskResource) tektonv1beta1.PipelineTaskInputResource { - return tektonv1beta1.PipelineTaskInputResource{ +func ToPipelineInput(from pipelinev1beta1.TaskResource) pipelinev1beta1.PipelineTaskInputResource { + return pipelinev1beta1.PipelineTaskInputResource{ Name: from.Name, Resource: from.ResourceDeclaration.Name, From: nil, @@ -608,16 +607,16 @@ func ToPipelineInput(from tektonv1beta1.TaskResource) tektonv1beta1.PipelineTask } // ToPipelineOutput converts the task resource into pipeline outputs -func ToPipelineOutput(from tektonv1beta1.TaskResource) tektonv1beta1.PipelineTaskOutputResource { - return tektonv1beta1.PipelineTaskOutputResource{ +func ToPipelineOutput(from pipelinev1beta1.TaskResource) pipelinev1beta1.PipelineTaskOutputResource { + return pipelinev1beta1.PipelineTaskOutputResource{ Name: from.Name, Resource: from.ResourceDeclaration.Name, } } // ToWorkspaceBindings converts the workspace declarations to workspaces bindings -func ToWorkspaceBindings(workspaces []tektonv1beta1.WorkspaceDeclaration) []tektonv1beta1.WorkspaceBinding { - var answer []tektonv1beta1.WorkspaceBinding +func ToWorkspaceBindings(workspaces []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.WorkspaceBinding { + var answer []pipelinev1beta1.WorkspaceBinding for _, from := range workspaces { answer = append(answer, ToWorkspaceBinding(from)) } @@ -625,15 +624,15 @@ func ToWorkspaceBindings(workspaces []tektonv1beta1.WorkspaceDeclaration) []tekt } // ToWorkspaceBinding converts the workspace declaration to a workspaces binding -func ToWorkspaceBinding(from tektonv1beta1.WorkspaceDeclaration) tektonv1beta1.WorkspaceBinding { - return tektonv1beta1.WorkspaceBinding{ +func ToWorkspaceBinding(from pipelinev1beta1.WorkspaceDeclaration) pipelinev1beta1.WorkspaceBinding { + return pipelinev1beta1.WorkspaceBinding{ Name: from.Name, } } // ToWorkspacePipelineTaskBindings converts the workspace bindings to pipeline task bindings -func ToWorkspacePipelineTaskBindings(workspaces []tektonv1beta1.WorkspaceBinding) []tektonv1beta1.WorkspacePipelineTaskBinding { - var answer []tektonv1beta1.WorkspacePipelineTaskBinding +func ToWorkspacePipelineTaskBindings(workspaces []pipelinev1beta1.WorkspaceBinding) []pipelinev1beta1.WorkspacePipelineTaskBinding { + var answer []pipelinev1beta1.WorkspacePipelineTaskBinding for _, from := range workspaces { answer = append(answer, ToWorkspacePipelineTaskBinding(from)) } @@ -641,8 +640,8 @@ func ToWorkspacePipelineTaskBindings(workspaces []tektonv1beta1.WorkspaceBinding } // ToWorkspacePipelineTaskBinding converts the workspace binding to a pipeline task binding -func ToWorkspacePipelineTaskBinding(from tektonv1beta1.WorkspaceBinding) tektonv1beta1.WorkspacePipelineTaskBinding { - return tektonv1beta1.WorkspacePipelineTaskBinding{ +func ToWorkspacePipelineTaskBinding(from pipelinev1beta1.WorkspaceBinding) pipelinev1beta1.WorkspacePipelineTaskBinding { + return pipelinev1beta1.WorkspacePipelineTaskBinding{ Name: from.Name, Workspace: from.Name, SubPath: from.SubPath, @@ -650,8 +649,8 @@ func ToWorkspacePipelineTaskBinding(from tektonv1beta1.WorkspaceBinding) tektonv } // ToWorkspacePipelineTaskBindingsFromDeclarations converts the workspace declarations to pipeline task bindings -func ToWorkspacePipelineTaskBindingsFromDeclarations(workspaces []tektonv1beta1.WorkspaceDeclaration) []tektonv1beta1.WorkspacePipelineTaskBinding { - var answer []tektonv1beta1.WorkspacePipelineTaskBinding +func ToWorkspacePipelineTaskBindingsFromDeclarations(workspaces []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.WorkspacePipelineTaskBinding { + var answer []pipelinev1beta1.WorkspacePipelineTaskBinding for _, from := range workspaces { answer = append(answer, ToWorkspacePipelineTaskBindingsFromDeclaration(from)) } @@ -659,8 +658,8 @@ func ToWorkspacePipelineTaskBindingsFromDeclarations(workspaces []tektonv1beta1. } // ToWorkspacePipelineTaskBindingsFromDeclaration converts the workspace declaration to a pipeline task binding -func ToWorkspacePipelineTaskBindingsFromDeclaration(from tektonv1beta1.WorkspaceDeclaration) tektonv1beta1.WorkspacePipelineTaskBinding { - return tektonv1beta1.WorkspacePipelineTaskBinding{ +func ToWorkspacePipelineTaskBindingsFromDeclaration(from pipelinev1beta1.WorkspaceDeclaration) pipelinev1beta1.WorkspacePipelineTaskBinding { + return pipelinev1beta1.WorkspacePipelineTaskBinding{ Name: from.Name, Workspace: from.Name, SubPath: "", @@ -668,8 +667,8 @@ func ToWorkspacePipelineTaskBindingsFromDeclaration(from tektonv1beta1.Workspace } // ToPipelineWorkspaceDeclarations converts the workspace declarations to pipeline workspace declarations -func ToPipelineWorkspaceDeclarations(workspaces []tektonv1beta1.WorkspaceDeclaration) []tektonv1beta1.PipelineWorkspaceDeclaration { - var answer []tektonv1beta1.PipelineWorkspaceDeclaration +func ToPipelineWorkspaceDeclarations(workspaces []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.PipelineWorkspaceDeclaration { + var answer []pipelinev1beta1.PipelineWorkspaceDeclaration for _, from := range workspaces { answer = append(answer, ToPipelineWorkspaceDeclaration(from)) } @@ -677,8 +676,8 @@ func ToPipelineWorkspaceDeclarations(workspaces []tektonv1beta1.WorkspaceDeclara } // ToPipelineWorkspaceDeclaration converts the workspace declaration to a pipeline workspace declaration -func ToPipelineWorkspaceDeclaration(from tektonv1beta1.WorkspaceDeclaration) tektonv1beta1.PipelineWorkspaceDeclaration { - return tektonv1beta1.PipelineWorkspaceDeclaration{ +func ToPipelineWorkspaceDeclaration(from pipelinev1beta1.WorkspaceDeclaration) pipelinev1beta1.PipelineWorkspaceDeclaration { + return pipelinev1beta1.PipelineWorkspaceDeclaration{ Name: from.Name, Description: from.Description, } diff --git a/pkg/triggerconfig/inrepo/overrides.go b/pkg/triggerconfig/inrepo/overrides.go index 6e3e26125..923be6766 100644 --- a/pkg/triggerconfig/inrepo/overrides.go +++ b/pkg/triggerconfig/inrepo/overrides.go @@ -1,15 +1,15 @@ package inrepo import ( - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" v1 "k8s.io/api/core/v1" ) // OverrideTaskSpec lets reuse any TaskSpec resources from the used task -func OverrideTaskSpec(ts *tektonv1beta1.TaskSpec, override *tektonv1beta1.TaskSpec) { +func OverrideTaskSpec(ts *pipelinev1beta1.TaskSpec, override *pipelinev1beta1.TaskSpec) { if override.StepTemplate != nil { if ts.StepTemplate == nil { - ts.StepTemplate = &tektonv1beta1.StepTemplate{} + ts.StepTemplate = &pipelinev1beta1.StepTemplate{} } OverrideTemplateWithTemplate(ts.StepTemplate, override.StepTemplate, true) if override.StepTemplate.Image != "" { @@ -20,7 +20,7 @@ func OverrideTaskSpec(ts *tektonv1beta1.TaskSpec, override *tektonv1beta1.TaskSp } // OverrideStep overrides the step with the given overrides -func OverrideStep(step *tektonv1beta1.Step, override *tektonv1beta1.Step) { +func OverrideStep(step *pipelinev1beta1.Step, override *pipelinev1beta1.Step) { if len(override.Command) > 0 { step.Script = override.Script step.Command = override.Command @@ -38,7 +38,7 @@ func OverrideStep(step *tektonv1beta1.Step, override *tektonv1beta1.Step) { } // OverrideTemplateWithStep overrides the container properties -func OverrideTemplateWithTemplate(c *tektonv1beta1.StepTemplate, override *tektonv1beta1.StepTemplate, modify bool) { +func OverrideTemplateWithTemplate(c *pipelinev1beta1.StepTemplate, override *pipelinev1beta1.StepTemplate, modify bool) { c.Env = OverrideEnv(c.Env, override.Env, modify) c.EnvFrom = OverrideEnvFrom(c.EnvFrom, override.EnvFrom, modify) if string(override.ImagePullPolicy) != "" && (modify || string(c.ImagePullPolicy) == "") { @@ -55,7 +55,7 @@ func OverrideTemplateWithTemplate(c *tektonv1beta1.StepTemplate, override *tekto } // OverrideTemplateWithStep overrides the container properties -func OverrideStepWithStep(c *tektonv1beta1.Step, override *tektonv1beta1.Step, modify bool) { +func OverrideStepWithStep(c *pipelinev1beta1.Step, override *pipelinev1beta1.Step, modify bool) { c.Env = OverrideEnv(c.Env, override.Env, modify) c.EnvFrom = OverrideEnvFrom(c.EnvFrom, override.EnvFrom, modify) if string(override.ImagePullPolicy) != "" && (modify || string(c.ImagePullPolicy) == "") { diff --git a/pkg/triggerconfig/inrepo/params.go b/pkg/triggerconfig/inrepo/params.go index 626934f2a..f320fb6d3 100644 --- a/pkg/triggerconfig/inrepo/params.go +++ b/pkg/triggerconfig/inrepo/params.go @@ -5,19 +5,19 @@ import ( "fmt" "strings" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" corev1 "k8s.io/api/core/v1" ) // UseLocation defines the location where we are using one or more steps where we may need to modify // the parameters, results and workspaces type UseLocation struct { - PipelineRunSpec *v1beta1.PipelineRunSpec - PipelineSpec *v1beta1.PipelineSpec - PipelineTask *v1beta1.PipelineTask + PipelineRunSpec *pipelinev1beta1.PipelineRunSpec + PipelineSpec *pipelinev1beta1.PipelineSpec + PipelineTask *pipelinev1beta1.PipelineTask TaskName string - TaskRunSpec *v1beta1.TaskRunSpec - TaskSpec *v1beta1.TaskSpec + TaskRunSpec *pipelinev1beta1.TaskRunSpec + TaskSpec *pipelinev1beta1.TaskSpec } func getParamsFromTasksResults(loc *UseLocation) map[string]bool { @@ -37,7 +37,7 @@ func getParamsFromTasksResults(loc *UseLocation) map[string]bool { } // UseParametersAndResults adds the parameters from the used Task to the PipelineSpec if specified and the PipelineTask -func UseParametersAndResults(ctx context.Context, loc *UseLocation, uses *v1beta1.TaskSpec) { +func UseParametersAndResults(ctx context.Context, loc *UseLocation, uses *pipelinev1beta1.TaskSpec) { parameterSpecs := uses.Params parameters := ToParams(parameterSpecs) results := uses.Results @@ -74,7 +74,7 @@ func UseParametersAndResults(ctx context.Context, loc *UseLocation, uses *v1beta stepTemplate := ts.StepTemplate created := false if stepTemplate == nil { - stepTemplate = &v1beta1.StepTemplate{} + stepTemplate = &pipelinev1beta1.StepTemplate{} created = true } stepTemplate.Env = useParameterEnvVars(stepTemplate.Env, parameters) @@ -86,18 +86,18 @@ func UseParametersAndResults(ctx context.Context, loc *UseLocation, uses *v1beta } // ToDefaultParams converts the param specs to default params -func ToDefaultParams(params []v1beta1.ParamSpec) []v1beta1.Param { - var answer []v1beta1.Param +func ToDefaultParams(params []pipelinev1beta1.ParamSpec) []pipelinev1beta1.Param { + var answer []pipelinev1beta1.Param for _, p := range params { - value := v1beta1.ArrayOrString{ - Type: v1beta1.ParamTypeString, + value := pipelinev1beta1.ArrayOrString{ + Type: pipelinev1beta1.ParamTypeString, } d := p.Default if d != nil { value.StringVal = d.StringVal value.ArrayVal = d.ArrayVal } - answer = append(answer, v1beta1.Param{ + answer = append(answer, pipelinev1beta1.Param{ Name: p.Name, Value: value, }) @@ -105,7 +105,7 @@ func ToDefaultParams(params []v1beta1.ParamSpec) []v1beta1.Param { return answer } -func useParameterSpecs(ctx context.Context, params []v1beta1.ParamSpec, uses []v1beta1.ParamSpec, areParamsFromTasksResults map[string]bool) []v1beta1.ParamSpec { +func useParameterSpecs(ctx context.Context, params []pipelinev1beta1.ParamSpec, uses []pipelinev1beta1.ParamSpec, areParamsFromTasksResults map[string]bool) []pipelinev1beta1.ParamSpec { for _, u := range uses { found := false for i := range params { @@ -129,7 +129,7 @@ func useParameterSpecs(ctx context.Context, params []v1beta1.ParamSpec, uses []v return params } -func useParameters(params []v1beta1.Param, uses []v1beta1.Param, areParamsFromTasksResults map[string]bool) []v1beta1.Param { +func useParameters(params []pipelinev1beta1.Param, uses []pipelinev1beta1.Param, areParamsFromTasksResults map[string]bool) []pipelinev1beta1.Param { for _, u := range uses { found := false for i := range params { @@ -138,11 +138,11 @@ func useParameters(params []v1beta1.Param, uses []v1beta1.Param, areParamsFromTa found = true if p.Value.Type == u.Value.Type { switch p.Value.Type { - case v1beta1.ParamTypeString: + case pipelinev1beta1.ParamTypeString: if p.Value.StringVal == "" { p.Value.StringVal = u.Value.StringVal } - case v1beta1.ParamTypeArray: + case pipelinev1beta1.ParamTypeArray: if len(p.Value.ArrayVal) == 0 { p.Value.ArrayVal = u.Value.ArrayVal } @@ -160,7 +160,7 @@ func useParameters(params []v1beta1.Param, uses []v1beta1.Param, areParamsFromTa return params } -func useParameterEnvVars(env []corev1.EnvVar, uses []v1beta1.Param) []corev1.EnvVar { +func useParameterEnvVars(env []corev1.EnvVar, uses []pipelinev1beta1.Param) []corev1.EnvVar { for _, u := range uses { name := u.Name upperName := strings.ToUpper(name) @@ -190,7 +190,7 @@ func useParameterEnvVars(env []corev1.EnvVar, uses []v1beta1.Param) []corev1.Env return env } -func usePipelineResults(results []v1beta1.PipelineResult, uses []v1beta1.TaskResult, taskName string) []v1beta1.PipelineResult { +func usePipelineResults(results []pipelinev1beta1.PipelineResult, uses []pipelinev1beta1.TaskResult, taskName string) []pipelinev1beta1.PipelineResult { for _, u := range uses { found := false for i := range results { @@ -204,17 +204,17 @@ func usePipelineResults(results []v1beta1.PipelineResult, uses []v1beta1.TaskRes } } if !found { - results = append(results, v1beta1.PipelineResult{ + results = append(results, pipelinev1beta1.PipelineResult{ Name: u.Name, Description: u.Description, - Value: *v1beta1.NewStructuredValues(fmt.Sprintf("$(tasks.%s.results.%s)", taskName, u.Name)), + Value: *pipelinev1beta1.NewStructuredValues(fmt.Sprintf("$(tasks.%s.results.%s)", taskName, u.Name)), }) } } return results } -func useResults(results []v1beta1.TaskResult, uses []v1beta1.TaskResult) []v1beta1.TaskResult { +func useResults(results []pipelinev1beta1.TaskResult, uses []pipelinev1beta1.TaskResult) []pipelinev1beta1.TaskResult { for _, u := range uses { found := false for i := range results { @@ -234,7 +234,7 @@ func useResults(results []v1beta1.TaskResult, uses []v1beta1.TaskResult) []v1bet return results } -func useWorkspaceTaskBindings(ws []v1beta1.WorkspacePipelineTaskBinding, uses []v1beta1.WorkspacePipelineTaskBinding) []v1beta1.WorkspacePipelineTaskBinding { +func useWorkspaceTaskBindings(ws []pipelinev1beta1.WorkspacePipelineTaskBinding, uses []pipelinev1beta1.WorkspacePipelineTaskBinding) []pipelinev1beta1.WorkspacePipelineTaskBinding { for _, u := range uses { found := false for i := range ws { @@ -251,7 +251,7 @@ func useWorkspaceTaskBindings(ws []v1beta1.WorkspacePipelineTaskBinding, uses [] return ws } -func usePipelineWorkspaces(ws []v1beta1.PipelineWorkspaceDeclaration, uses []v1beta1.WorkspaceDeclaration) []v1beta1.PipelineWorkspaceDeclaration { +func usePipelineWorkspaces(ws []pipelinev1beta1.PipelineWorkspaceDeclaration, uses []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.PipelineWorkspaceDeclaration { for _, u := range uses { found := false for i := range ws { @@ -265,7 +265,7 @@ func usePipelineWorkspaces(ws []v1beta1.PipelineWorkspaceDeclaration, uses []v1b } } if !found { - ws = append(ws, v1beta1.PipelineWorkspaceDeclaration{ + ws = append(ws, pipelinev1beta1.PipelineWorkspaceDeclaration{ Name: u.Name, Description: u.Description, Optional: u.Optional, @@ -275,7 +275,7 @@ func usePipelineWorkspaces(ws []v1beta1.PipelineWorkspaceDeclaration, uses []v1b return ws } -func useSidecars(ws []v1beta1.Sidecar, uses []v1beta1.Sidecar) []v1beta1.Sidecar { +func useSidecars(ws []pipelinev1beta1.Sidecar, uses []pipelinev1beta1.Sidecar) []pipelinev1beta1.Sidecar { for _, u := range uses { found := false for i := range ws { @@ -292,7 +292,7 @@ func useSidecars(ws []v1beta1.Sidecar, uses []v1beta1.Sidecar) []v1beta1.Sidecar return ws } -func useWorkspaces(ws []v1beta1.WorkspaceDeclaration, uses []v1beta1.WorkspaceDeclaration) []v1beta1.WorkspaceDeclaration { +func useWorkspaces(ws []pipelinev1beta1.WorkspaceDeclaration, uses []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.WorkspaceDeclaration { for _, u := range uses { found := false for i := range ws { @@ -312,7 +312,7 @@ func useWorkspaces(ws []v1beta1.WorkspaceDeclaration, uses []v1beta1.WorkspaceDe return ws } -func useWorkspaceBindings(ws []v1beta1.WorkspaceBinding, uses []v1beta1.WorkspaceBinding) []v1beta1.WorkspaceBinding { +func useWorkspaceBindings(ws []pipelinev1beta1.WorkspaceBinding, uses []pipelinev1beta1.WorkspaceBinding) []pipelinev1beta1.WorkspaceBinding { for _, u := range uses { found := false for i := range ws { diff --git a/pkg/triggerconfig/inrepo/resolver_cache.go b/pkg/triggerconfig/inrepo/resolver_cache.go index fc6a4b686..1cba830bb 100644 --- a/pkg/triggerconfig/inrepo/resolver_cache.go +++ b/pkg/triggerconfig/inrepo/resolver_cache.go @@ -3,7 +3,7 @@ package inrepo import ( "sync" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" ) const DELIMIER = "#" @@ -12,14 +12,14 @@ const DELIMIER = "#" // the git cloning with in repo configurations type ResolverCache struct { lock sync.RWMutex - pipelineCache map[string]*tektonv1beta1.PipelineRun + pipelineCache map[string]*pipelinev1beta1.PipelineRun dataCache map[string][]byte } // NewResolverCache creates a new resolver cache func NewResolverCache() *ResolverCache { return &ResolverCache{ - pipelineCache: map[string]*tektonv1beta1.PipelineRun{}, + pipelineCache: map[string]*pipelinev1beta1.PipelineRun{}, dataCache: map[string][]byte{}, } } @@ -47,11 +47,11 @@ func (c *ResolverCache) SetData(sourceURI, ref string, value []byte) { } // GetPipelineRun gets the PipelineRun from the cache if available or returns nil -func (c *ResolverCache) GetPipelineRun(sourceURI, ref string) *tektonv1beta1.PipelineRun { +func (c *ResolverCache) GetPipelineRun(sourceURI, ref string) *pipelinev1beta1.PipelineRun { if c == nil || sourceURI == "" { return nil } - var answer *tektonv1beta1.PipelineRun + var answer *pipelinev1beta1.PipelineRun c.lock.Lock() answer = c.pipelineCache[sourceURI+DELIMIER+ref] c.lock.Unlock() @@ -59,7 +59,7 @@ func (c *ResolverCache) GetPipelineRun(sourceURI, ref string) *tektonv1beta1.Pip } // SetPipelineRun updates the cache -func (c *ResolverCache) SetPipelineRun(sourceURI string, ref string, value *tektonv1beta1.PipelineRun) { +func (c *ResolverCache) SetPipelineRun(sourceURI string, ref string, value *pipelinev1beta1.PipelineRun) { if c == nil || value == nil { return } diff --git a/pkg/triggerconfig/inrepo/uses_resolver.go b/pkg/triggerconfig/inrepo/uses_resolver.go index d8de27b48..571aa166e 100644 --- a/pkg/triggerconfig/inrepo/uses_resolver.go +++ b/pkg/triggerconfig/inrepo/uses_resolver.go @@ -13,7 +13,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/filebrowser" "github.com/jenkins-x/lighthouse/pkg/util" "github.com/pkg/errors" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" ) // UsesResolver resolves the `uses:` URI syntax @@ -40,7 +40,7 @@ var ( // UsesSteps lets resolve the sourceURI to a PipelineRun and find the step or steps // for the given task name and/or step name then lets apply any overrides from the step -func (r *UsesResolver) UsesSteps(sourceURI string, taskName string, step tektonv1beta1.Step, ts *tektonv1beta1.TaskSpec, loc *UseLocation) ([]tektonv1beta1.Step, error) { +func (r *UsesResolver) UsesSteps(sourceURI string, taskName string, step pipelinev1beta1.Step, ts *pipelinev1beta1.TaskSpec, loc *UseLocation) ([]pipelinev1beta1.Step, error) { pr := r.Cache.GetPipelineRun(sourceURI, r.SHA) if pr == nil || ignoreUsesCache { data, err := r.GetData(sourceURI, false) @@ -183,7 +183,7 @@ func VersionStreamEnvVar(owner string, repo string) string { return envVar } -func (r *UsesResolver) findSteps(sourceURI string, pr *tektonv1beta1.PipelineRun, taskName string, step tektonv1beta1.Step) (*tektonv1beta1.TaskSpec, error) { +func (r *UsesResolver) findSteps(sourceURI string, pr *pipelinev1beta1.PipelineRun, taskName string, step pipelinev1beta1.Step) (*pipelinev1beta1.TaskSpec, error) { if pr.Spec.PipelineSpec == nil { return nil, errors.Errorf("source URI %s has no spec.pipelineSpec", sourceURI) } @@ -204,7 +204,7 @@ func (r *UsesResolver) findSteps(sourceURI string, pr *tektonv1beta1.PipelineRun } } -func (r *UsesResolver) findTaskStep(sourceURI string, task tektonv1beta1.PipelineTask, step tektonv1beta1.Step) (*tektonv1beta1.TaskSpec, error) { +func (r *UsesResolver) findTaskStep(sourceURI string, task pipelinev1beta1.PipelineTask, step pipelinev1beta1.Step) (*pipelinev1beta1.TaskSpec, error) { ts := task.TaskSpec if ts == nil { return nil, errors.Errorf("source URI %s has no task spec for task %s", sourceURI, task.Name) @@ -230,7 +230,7 @@ func (r *UsesResolver) findTaskStep(sourceURI string, task tektonv1beta1.Pipelin if suffix != "" { replaceStep.Name = name + "-" + suffix } - taskSpec.Steps = []tektonv1beta1.Step{replaceStep} + taskSpec.Steps = []pipelinev1beta1.Step{replaceStep} return &taskSpec, nil } } diff --git a/test/e2e/tekton/tekton_test.go b/test/e2e/tekton/tekton_test.go index c536b69b9..ebd5c6b73 100644 --- a/test/e2e/tekton/tekton_test.go +++ b/test/e2e/tekton/tekton_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" "github.com/pkg/errors" "github.com/sirupsen/logrus" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" ) @@ -283,13 +283,13 @@ func ChatOpsTests() bool { }) } -func generatePipelineRunSpec() *tektonv1beta1.PipelineRunSpec { - return &tektonv1beta1.PipelineRunSpec{ - PipelineRef: &tektonv1beta1.PipelineRef{ +func generatePipelineRunSpec() *pipelinev1beta1.PipelineRunSpec { + return &pipelinev1beta1.PipelineRunSpec{ + PipelineRef: &pipelinev1beta1.PipelineRef{ Name: "lh-test-pipeline", }, ServiceAccountName: "tekton-bot", - Workspaces: []tektonv1beta1.WorkspaceBinding{{ + Workspaces: []pipelinev1beta1.WorkspaceBinding{{ Name: "shared-data", VolumeClaimTemplate: &corev1.PersistentVolumeClaim{ Spec: corev1.PersistentVolumeClaimSpec{ From 52bb26dec9c248fb807e6828b0c18b8840b83ee8 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 5 Dec 2024 11:27:12 +0100 Subject: [PATCH 03/23] chore: use tektoncd/pipeline/pkg/apis/pipeline/v1 --- cmd/tektoncontroller/main.go | 4 +- pkg/apis/lighthouse/v1alpha1/breakpoint.go | 6 +- .../lighthouse/v1alpha1/breakpoint_test.go | 12 +- pkg/apis/lighthouse/v1alpha1/types.go | 4 +- pkg/config/job/base.go | 4 +- pkg/engines/tekton/activity.go | 4 +- pkg/engines/tekton/activity_test.go | 6 +- pkg/engines/tekton/controller.go | 12 +- pkg/engines/tekton/controller_test.go | 14 +- .../tekton/pipelinerun_rerun_controller.go | 12 +- pkg/engines/tekton/utils.go | 28 ++-- pkg/keeper/pipelinerun_monitor.go | 20 +-- pkg/keeper/pipelinerun_monitor_test.go | 18 +-- .../inrepo/default_parameters.go | 32 ++-- .../inrepo/default_parameters_test.go | 28 ++-- pkg/triggerconfig/inrepo/load_pipelinerun.go | 142 +++++++++--------- pkg/triggerconfig/inrepo/overrides.go | 12 +- pkg/triggerconfig/inrepo/params.go | 56 +++---- pkg/triggerconfig/inrepo/resolver_cache.go | 12 +- pkg/triggerconfig/inrepo/uses_resolver.go | 10 +- test/e2e/tekton/tekton_test.go | 10 +- 21 files changed, 223 insertions(+), 223 deletions(-) diff --git a/cmd/tektoncontroller/main.go b/cmd/tektoncontroller/main.go index 65a034803..2adbc016f 100644 --- a/cmd/tektoncontroller/main.go +++ b/cmd/tektoncontroller/main.go @@ -10,7 +10,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/interrupts" "github.com/jenkins-x/lighthouse/pkg/logrusutil" "github.com/sirupsen/logrus" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" @@ -49,7 +49,7 @@ func main() { if err := lighthousev1alpha1.AddToScheme(scheme); err != nil { logrus.WithError(err).Fatal("Failed to register scheme") } - if err := pipelinev1beta1.AddToScheme(scheme); err != nil { + if err := pipelinev1.AddToScheme(scheme); err != nil { logrus.WithError(err).Fatal("Failed to register scheme") } diff --git a/pkg/apis/lighthouse/v1alpha1/breakpoint.go b/pkg/apis/lighthouse/v1alpha1/breakpoint.go index 97d03110e..9323f33fc 100644 --- a/pkg/apis/lighthouse/v1alpha1/breakpoint.go +++ b/pkg/apis/lighthouse/v1alpha1/breakpoint.go @@ -2,7 +2,7 @@ package v1alpha1 import ( "github.com/jenkins-x/lighthouse/pkg/config/job" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -36,7 +36,7 @@ type LighthouseBreakpointSpec struct { Filter LighthousePipelineFilter `json:"filter,omitempty"` // Debug the debug configuration to apply - Debug pipelinev1beta1.TaskRunDebug `json:"debug,omitempty"` + Debug pipelinev1.TaskRunDebug `json:"debug,omitempty"` } // LighthousePipelineFilter defines the filter to use to apply breakpoints to new breakpoints @@ -82,7 +82,7 @@ func (f *LighthousePipelineFilter) Matches(o *LighthousePipelineFilter) bool { } // ResolveDebug resolves the debug breakpoint -func (f *LighthousePipelineFilter) ResolveDebug(breakpoints []*LighthouseBreakpoint) *pipelinev1beta1.TaskRunDebug { +func (f *LighthousePipelineFilter) ResolveDebug(breakpoints []*LighthouseBreakpoint) *pipelinev1.TaskRunDebug { // lets match the first breakpoint for _, bp := range breakpoints { if bp.Spec.Filter.Matches(f) { diff --git a/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go b/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go index c657d222a..3bd28c830 100644 --- a/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go +++ b/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go @@ -3,7 +3,7 @@ package v1alpha1_test import ( "testing" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "github.com/google/go-cmp/cmp" "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" @@ -21,7 +21,7 @@ func TestBreakpointResolveDebug(t *testing.T) { Context: "myctx", Task: "sometask", }, - Debug: pipelinev1beta1.TaskRunDebug{ + Debug: pipelinev1.TaskRunDebug{ Breakpoint: []string{"onFailure"}, }, }, @@ -31,7 +31,7 @@ func TestBreakpointResolveDebug(t *testing.T) { Filter: v1alpha1.LighthousePipelineFilter{ Task: "special-task", }, - Debug: pipelinev1beta1.TaskRunDebug{ + Debug: pipelinev1.TaskRunDebug{ Breakpoint: []string{"something"}, }, }, @@ -41,7 +41,7 @@ func TestBreakpointResolveDebug(t *testing.T) { tests := []struct { name string filterValues v1alpha1.LighthousePipelineFilter - expected *pipelinev1beta1.TaskRunDebug + expected *pipelinev1.TaskRunDebug }{ { name: "matches-all-values", @@ -53,7 +53,7 @@ func TestBreakpointResolveDebug(t *testing.T) { Context: "myctx", Task: "sometask", }, - expected: &pipelinev1beta1.TaskRunDebug{ + expected: &pipelinev1.TaskRunDebug{ Breakpoint: []string{"onFailure"}, }, }, @@ -89,7 +89,7 @@ func TestBreakpointResolveDebug(t *testing.T) { Context: "whatever", Task: "special-task", }, - expected: &pipelinev1beta1.TaskRunDebug{ + expected: &pipelinev1.TaskRunDebug{ Breakpoint: []string{"something"}, }, }, diff --git a/pkg/apis/lighthouse/v1alpha1/types.go b/pkg/apis/lighthouse/v1alpha1/types.go index 8d0c1ac2b..44f0dafde 100644 --- a/pkg/apis/lighthouse/v1alpha1/types.go +++ b/pkg/apis/lighthouse/v1alpha1/types.go @@ -8,7 +8,7 @@ import ( "time" "github.com/jenkins-x/lighthouse/pkg/config/job" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -146,7 +146,7 @@ type LighthouseJobSpec struct { MaxConcurrency int `json:"max_concurrency,omitempty"` // PipelineRunSpec provides the basis for running the test as a Tekton Pipeline // https://github.com/tektoncd/pipeline - PipelineRunSpec *pipelinev1beta1.PipelineRunSpec `json:"pipeline_run_spec,omitempty"` + PipelineRunSpec *pipelinev1.PipelineRunSpec `json:"pipeline_run_spec,omitempty"` // PipelineRunParams are the params used by the pipeline run PipelineRunParams []job.PipelineRunParam `json:"pipeline_run_params,omitempty"` // PodSpec provides the basis for running the test under a Kubernetes agent diff --git a/pkg/config/job/base.go b/pkg/config/job/base.go index 409949076..65f4b92f7 100644 --- a/pkg/config/job/base.go +++ b/pkg/config/job/base.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" ) @@ -67,7 +67,7 @@ type Base struct { // Spec is the Kubernetes pod spec used if Agent is kubernetes. Spec *v1.PodSpec `json:"spec,omitempty"` // PipelineRunSpec is the Tekton PipelineRun spec used if agent is tekton-pipeline - PipelineRunSpec *pipelinev1beta1.PipelineRunSpec `json:"pipeline_run_spec,omitempty"` + PipelineRunSpec *pipelinev1.PipelineRunSpec `json:"pipeline_run_spec,omitempty"` // PipelineRunParams are the params used by the pipeline run PipelineRunParams []PipelineRunParam `json:"pipeline_run_params,omitempty"` // lets us register a loader diff --git a/pkg/engines/tekton/activity.go b/pkg/engines/tekton/activity.go index 899e30a1c..26c8c247a 100644 --- a/pkg/engines/tekton/activity.go +++ b/pkg/engines/tekton/activity.go @@ -8,14 +8,14 @@ import ( "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" "github.com/jenkins-x/lighthouse/pkg/config/job" "github.com/jenkins-x/lighthouse/pkg/util" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" ) // ConvertPipelineRun translates a PipelineRun into an ActivityRecord -func ConvertPipelineRun(pr *pipelinev1beta1.PipelineRun) *v1alpha1.ActivityRecord { +func ConvertPipelineRun(pr *pipelinev1.PipelineRun) *v1alpha1.ActivityRecord { if pr == nil { return nil } diff --git a/pkg/engines/tekton/activity_test.go b/pkg/engines/tekton/activity_test.go index 66a880cae..00dc8ca75 100644 --- a/pkg/engines/tekton/activity_test.go +++ b/pkg/engines/tekton/activity_test.go @@ -10,7 +10,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/engines/tekton" "github.com/jenkins-x/lighthouse/pkg/util" "github.com/stretchr/testify/assert" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "sigs.k8s.io/yaml" ) @@ -51,10 +51,10 @@ func TestConvertPipelineRun(t *testing.T) { } } -func loadPipelineRun(t *testing.T, dir string) *pipelinev1beta1.PipelineRun { +func loadPipelineRun(t *testing.T, dir string) *pipelinev1.PipelineRun { fileName := filepath.Join(dir, "pr.yaml") if assertFileExists(t, fileName) { - pr := &pipelinev1beta1.PipelineRun{} + pr := &pipelinev1.PipelineRun{} data, err := os.ReadFile(fileName) if assert.NoError(t, err, "Failed to load file %s", fileName) { err = yaml.Unmarshal(data, pr) diff --git a/pkg/engines/tekton/controller.go b/pkg/engines/tekton/controller.go index 97c5b7b6d..6fd05c5c6 100644 --- a/pkg/engines/tekton/controller.go +++ b/pkg/engines/tekton/controller.go @@ -12,7 +12,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" @@ -57,7 +57,7 @@ func NewLighthouseJobReconciler(client client.Client, apiReader client.Reader, s // SetupWithManager sets up the reconcilier with it's manager func (r *LighthouseJobReconciler) SetupWithManager(mgr ctrl.Manager) error { indexFunc := func(rawObj client.Object) []string { - obj := rawObj.(*pipelinev1beta1.PipelineRun) + obj := rawObj.(*pipelinev1.PipelineRun) owner := metav1.GetControllerOf(obj) // TODO: would be nice to get kind from the type rather than a hard coded string if owner == nil || owner.APIVersion != apiGVStr || owner.Kind != "LighthouseJob" { @@ -65,14 +65,14 @@ func (r *LighthouseJobReconciler) SetupWithManager(mgr ctrl.Manager) error { } return []string{owner.Name} } - if err := mgr.GetFieldIndexer().IndexField(context.TODO(), &pipelinev1beta1.PipelineRun{}, jobOwnerKey, indexFunc); err != nil { + if err := mgr.GetFieldIndexer().IndexField(context.TODO(), &pipelinev1.PipelineRun{}, jobOwnerKey, indexFunc); err != nil { return err } return ctrl.NewControllerManagedBy(mgr). For(&lighthousev1alpha1.LighthouseJob{}). WithEventFilter(predicate.ResourceVersionChangedPredicate{}). - Owns(&pipelinev1beta1.PipelineRun{}). + Owns(&pipelinev1.PipelineRun{}). Complete(r) } @@ -100,7 +100,7 @@ func (r *LighthouseJobReconciler) Reconcile(ctx context.Context, req ctrl.Reques } // get job's pipeline runs - var pipelineRunList pipelinev1beta1.PipelineRunList + var pipelineRunList pipelinev1.PipelineRunList if err := r.client.List(ctx, &pipelineRunList, client.InNamespace(req.Namespace), client.MatchingFields{jobOwnerKey: req.Name}); err != nil { r.logger.Errorf("Failed list pipeline runs: %s", err) return ctrl.Result{}, err @@ -196,7 +196,7 @@ func (r *LighthouseJobReconciler) Reconcile(ctx context.Context, req ctrl.Reques return ctrl.Result{}, nil } -func (r *LighthouseJobReconciler) getPipelingetPipelineTargetURLeTargetURL(pipelineRun pipelinev1beta1.PipelineRun) string { +func (r *LighthouseJobReconciler) getPipelingetPipelineTargetURLeTargetURL(pipelineRun pipelinev1.PipelineRun) string { if r.dashboardTemplate == "" { return fmt.Sprintf("%s/#/namespaces/%s/pipelineruns/%s", trimDashboardURL(r.dashboardURL), r.namespace, pipelineRun.Name) } diff --git a/pkg/engines/tekton/controller_test.go b/pkg/engines/tekton/controller_test.go index 8a0acc7af..c5d030fec 100644 --- a/pkg/engines/tekton/controller_test.go +++ b/pkg/engines/tekton/controller_test.go @@ -16,7 +16,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/util" "github.com/stretchr/testify/assert" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -86,7 +86,7 @@ func TestReconcile(t *testing.T) { scheme := runtime.NewScheme() err = lighthousev1alpha1.AddToScheme(scheme) assert.NoError(t, err) - err = pipelinev1beta1.AddToScheme(scheme) + err = pipelinev1.AddToScheme(scheme) assert.NoError(t, err) c := fake.NewClientBuilder().WithScheme(scheme).WithObjects(state...).Build() @@ -105,7 +105,7 @@ func TestReconcile(t *testing.T) { // assert observed state matches expected state if expectedPR != nil || generateTestOutput { - var pipelineRunList pipelinev1beta1.PipelineRunList + var pipelineRunList pipelinev1.PipelineRunList err := c.List(context.TODO(), &pipelineRunList, client.InNamespace(ns)) assert.NoError(t, err) assert.Len(t, pipelineRunList.Items, 1) @@ -175,7 +175,7 @@ func loadLighthouseJob(isObserved bool, dir string) (*v1alpha1.LighthouseJob, st return nil, fileName, nil } -func loadControllerPipelineRun(isObserved bool, dir string) (*pipelinev1beta1.PipelineRun, string, error) { +func loadControllerPipelineRun(isObserved bool, dir string) (*pipelinev1.PipelineRun, string, error) { var baseFn string if isObserved { baseFn = "observed-pr.yml" @@ -188,7 +188,7 @@ func loadControllerPipelineRun(isObserved bool, dir string) (*pipelinev1beta1.Pi return nil, fileName, err } if exists { - pr := &pipelinev1beta1.PipelineRun{} + pr := &pipelinev1.PipelineRun{} data, err := os.ReadFile(fileName) if err != nil { return nil, fileName, err @@ -202,14 +202,14 @@ func loadControllerPipelineRun(isObserved bool, dir string) (*pipelinev1beta1.Pi return nil, fileName, nil } -func loadObservedPipeline(dir string) (*pipelinev1beta1.Pipeline, error) { +func loadObservedPipeline(dir string) (*pipelinev1.Pipeline, error) { fileName := filepath.Join(dir, "observed-pipeline.yml") exists, err := util.FileExists(fileName) if err != nil { return nil, err } if exists { - p := &pipelinev1beta1.Pipeline{} + p := &pipelinev1.Pipeline{} data, err := os.ReadFile(fileName) if err != nil { return nil, err diff --git a/pkg/engines/tekton/pipelinerun_rerun_controller.go b/pkg/engines/tekton/pipelinerun_rerun_controller.go index a58d81b45..fb9cd6734 100644 --- a/pkg/engines/tekton/pipelinerun_rerun_controller.go +++ b/pkg/engines/tekton/pipelinerun_rerun_controller.go @@ -10,7 +10,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -39,7 +39,7 @@ func NewRerunPipelineRunReconciler(client client.Client, scheme *runtime.Scheme) // SetupWithManager sets up the controller with the Manager. func (r *RerunPipelineRunReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). - For(&pipelinev1beta1.PipelineRun{}). + For(&pipelinev1.PipelineRun{}). WithEventFilter(predicate.NewPredicateFuncs(func(object client.Object) bool { labels := object.GetLabels() _, exists := labels[util.DashboardTektonRerun] @@ -53,7 +53,7 @@ func (r *RerunPipelineRunReconciler) Reconcile(ctx context.Context, req ctrl.Req r.logger.Infof("Reconciling rerun PipelineRun %s", req.NamespacedName) // Fetch the Rerun PipelineRun instance - var rerunPipelineRun pipelinev1beta1.PipelineRun + var rerunPipelineRun pipelinev1.PipelineRun if err := r.client.Get(ctx, req.NamespacedName, &rerunPipelineRun); err != nil { r.logger.Errorf("Failed to get rerun PipelineRun: %s", err) return ctrl.Result{}, client.IgnoreNotFound(err) @@ -72,7 +72,7 @@ func (r *RerunPipelineRunReconciler) Reconcile(ctx context.Context, req ctrl.Req } // Get Rerun PipelineRun parent PipelineRun - var rerunPipelineRunParent pipelinev1beta1.PipelineRun + var rerunPipelineRunParent pipelinev1.PipelineRun if err := r.client.Get(ctx, types.NamespacedName{Namespace: req.Namespace, Name: rerunPipelineRunParentName}, &rerunPipelineRunParent); err != nil { r.logger.Warningf("Unable to get Rerun Parent PipelineRun %s: %v", rerunPipelineRunParentName, err) // we'll ignore not-found errors, since they can't be fixed by an immediate @@ -130,7 +130,7 @@ func (r *RerunPipelineRunReconciler) Reconcile(ctx context.Context, req ctrl.Req rerunPipelineRun.OwnerReferences = append(rerunPipelineRun.OwnerReferences, ownerReference) // update ownerReference of rerun PipelineRun - f := func(job *pipelinev1beta1.PipelineRun) error { + f := func(job *pipelinev1.PipelineRun) error { // Patch the PipelineRun with the new ownerReference if err := r.client.Update(ctx, &rerunPipelineRun); err != nil { return errors.Wrapf(err, "failed to update PipelineRun with ownerReference") @@ -148,7 +148,7 @@ func (r *RerunPipelineRunReconciler) Reconcile(ctx context.Context, req ctrl.Req } // retryModifyPipelineRun tries to modify the PipelineRun, retrying if it fails -func (r *RerunPipelineRunReconciler) retryModifyPipelineRun(ctx context.Context, ns client.ObjectKey, pipelineRun *pipelinev1beta1.PipelineRun, f func(pipelineRun *pipelinev1beta1.PipelineRun) error) error { +func (r *RerunPipelineRunReconciler) retryModifyPipelineRun(ctx context.Context, ns client.ObjectKey, pipelineRun *pipelinev1.PipelineRun, f func(pipelineRun *pipelinev1.PipelineRun) error) error { const retryCount = 5 i := 0 diff --git a/pkg/engines/tekton/utils.go b/pkg/engines/tekton/utils.go index 39b89b942..f77499ec7 100644 --- a/pkg/engines/tekton/utils.go +++ b/pkg/engines/tekton/utils.go @@ -12,7 +12,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/jobutil" "github.com/pkg/errors" "github.com/sirupsen/logrus" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "sigs.k8s.io/controller-runtime/pkg/client" @@ -44,7 +44,7 @@ func trimDashboardURL(base string) string { // makePipeline creates a PipelineRun and substitutes LighthouseJob managed pipeline resources with ResourceSpec instead of ResourceRef // so that we don't have to take care of potentially dangling created pipeline resources. -func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace string, logger *logrus.Entry, idGen buildIDGenerator, c client.Reader) (*pipelinev1beta1.PipelineRun, error) { +func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace string, logger *logrus.Entry, idGen buildIDGenerator, c client.Reader) (*pipelinev1.PipelineRun, error) { // First validate. if lj.Spec.PipelineRunSpec == nil { return nil, errors.New("no PipelineSpec defined") @@ -58,7 +58,7 @@ func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace s prLabels, annotations := jobutil.LabelsAndAnnotationsForJob(lj, buildID) specCopy := lj.Spec.PipelineRunSpec.DeepCopy() generateName := jobutil.GenerateName(&lj.Spec) - p := pipelinev1beta1.PipelineRun{ + p := pipelinev1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Annotations: annotations, GenerateName: generateName, @@ -126,8 +126,8 @@ func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace s } } for _, key := range sets.StringKeySet(env).List() { - val := pipelinev1beta1.ArrayOrString{ - Type: pipelinev1beta1.ParamTypeString, + val := pipelinev1.ArrayOrString{ + Type: pipelinev1.ParamTypeString, StringVal: env[key], } new_param := true @@ -141,7 +141,7 @@ func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace s } // append if new param if new_param { - p.Spec.Params = append(p.Spec.Params, pipelinev1beta1.Param{ + p.Spec.Params = append(p.Spec.Params, pipelinev1.Param{ Name: key, Value: val, }) @@ -157,7 +157,7 @@ type gitTaskParamNames struct { baseRevisionParam string } -func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *pipelinev1beta1.PipelineRun, c client.Reader) (*gitTaskParamNames, error) { +func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *pipelinev1.PipelineRun, c client.Reader) (*gitTaskParamNames, error) { if pr == nil { return nil, errors.New("provided PipelineRun is nil") } @@ -165,14 +165,14 @@ func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *pipelinev1beta1 if pr.Spec.PipelineSpec == nil && pr.Spec.PipelineRef == nil { return nil, errors.New("neither PipelineSpec nor PipelineRef specified for PipelineRun") } - var pipelineSpec *pipelinev1beta1.PipelineSpec + var pipelineSpec *pipelinev1.PipelineSpec if pr.Spec.PipelineSpec != nil { pipelineSpec = pr.Spec.PipelineSpec } else if pr.Spec.PipelineRef.Name == "" { return nil, nil } else { - pipeline := pipelinev1beta1.Pipeline{ObjectMeta: metav1.ObjectMeta{Name: pr.Spec.PipelineRef.Name, Namespace: pr.Namespace}} + pipeline := pipelinev1.Pipeline{ObjectMeta: metav1.ObjectMeta{Name: pr.Spec.PipelineRef.Name, Namespace: pr.Namespace}} key := client.ObjectKeyFromObject(&pipeline) err := c.Get(ctx, key, &pipeline) if err != nil { @@ -187,10 +187,10 @@ func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *pipelinev1beta1 if task.TaskRef != nil { if task.TaskRef.Name == gitCloneCatalogTaskName { for _, p := range task.Params { - if p.Name == gitCloneURLParam && p.Value.Type == pipelinev1beta1.ParamTypeString { + if p.Name == gitCloneURLParam && p.Value.Type == pipelinev1.ParamTypeString { paramNames.urlParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } - if p.Name == gitCloneRevisionParam && p.Value.Type == pipelinev1beta1.ParamTypeString { + if p.Name == gitCloneRevisionParam && p.Value.Type == pipelinev1.ParamTypeString { paramNames.revParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } } @@ -201,13 +201,13 @@ func determineGitCloneOrMergeTaskParams(ctx context.Context, pr *pipelinev1beta1 } if task.TaskRef.Name == gitMergeCatalogTaskName { for _, p := range task.Params { - if p.Name == gitCloneURLParam && p.Value.Type == pipelinev1beta1.ParamTypeString { + if p.Name == gitCloneURLParam && p.Value.Type == pipelinev1.ParamTypeString { paramNames.urlParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } - if p.Name == gitCloneRevisionParam && p.Value.Type == pipelinev1beta1.ParamTypeString { + if p.Name == gitCloneRevisionParam && p.Value.Type == pipelinev1.ParamTypeString { paramNames.baseRevisionParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } - if p.Name == gitMergeBatchRefsParam && p.Value.Type == pipelinev1beta1.ParamTypeString { + if p.Name == gitMergeBatchRefsParam && p.Value.Type == pipelinev1.ParamTypeString { paramNames.batchedRefsParam = extractPipelineParamFromTaskParamValue(p.Value.StringVal) } } diff --git a/pkg/keeper/pipelinerun_monitor.go b/pkg/keeper/pipelinerun_monitor.go index 9f61317f9..7950c9352 100644 --- a/pkg/keeper/pipelinerun_monitor.go +++ b/pkg/keeper/pipelinerun_monitor.go @@ -7,7 +7,7 @@ import ( "reflect" "strings" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" @@ -23,7 +23,7 @@ import ( const ( // tektonAPIVersion the APIVersion for using Tekton - tektonAPIVersion = "tekton.dev/v1beta1" + tektonAPIVersion = "tekton.dev/v1" // labelFailedAndRerun is added to PipelineRuns to replace their existing labels when the run fails for rerunnable reasons labelFailedAndRerun = "lighthouse-failed-and-rerun" @@ -41,7 +41,7 @@ var ( func rerunPipelineRunsWithRaceConditionFailure(tektonClient tektonclient.Interface, ns string, logger *logrus.Entry) error { // Get all PipelineRuns without the label indicating we've already rerun it. notRerunLabelSelector := fmt.Sprintf("!%s", labelFailedAndRerun) - runs, err := tektonClient.pipelinev1beta1().PipelineRuns(ns).List(context.TODO(), metav1.ListOptions{ + runs, err := tektonClient.TektonV1().PipelineRuns(ns).List(context.TODO(), metav1.ListOptions{ LabelSelector: notRerunLabelSelector, }) if err != nil { @@ -73,7 +73,7 @@ func rerunPipelineRunsWithRaceConditionFailure(tektonClient tektonclient.Interfa // Launch a new otherwise identical PipelineRun to replace the failing one. r := run newRun := createReplacementPipelineRun(&r) - _, err := tektonClient.pipelinev1beta1().PipelineRuns(ns).Create(context.TODO(), newRun, metav1.CreateOptions{}) + _, err := tektonClient.TektonV1().PipelineRuns(ns).Create(context.TODO(), newRun, metav1.CreateOptions{}) if err != nil { return errors.Wrapf(err, "creating new PipelineRun %s to replace failed PipelineRun %s", newRun.Name, run.Name) } @@ -87,7 +87,7 @@ func rerunPipelineRunsWithRaceConditionFailure(tektonClient tektonclient.Interfa return nil } -func createReplacementPipelineRun(originalRun *pipelinev1beta1.PipelineRun) *pipelinev1beta1.PipelineRun { +func createReplacementPipelineRun(originalRun *pipelinev1.PipelineRun) *pipelinev1.PipelineRun { // Fall back on appending a random string to the original name, but preferably use the name of run's Pipeline with an appended random string newRunName := originalRun.Name + "-" + rand.String(5) if originalRun.Spec.PipelineRef.Name != "" { @@ -99,7 +99,7 @@ func createReplacementPipelineRun(originalRun *pipelinev1beta1.PipelineRun) *pip newRunLabels[k] = v } - return &pipelinev1beta1.PipelineRun{ + return &pipelinev1.PipelineRun{ TypeMeta: metav1.TypeMeta{ APIVersion: tektonAPIVersion, Kind: "PipelineRun", @@ -122,8 +122,8 @@ func pipelineRunShouldRetry(msg string) bool { return false } -func patchPipelineRun(tektonClient tektonclient.Interface, namespace string, newPr *pipelinev1beta1.PipelineRun, logger *logrus.Entry) error { - pr, err := tektonClient.pipelinev1beta1().PipelineRuns(namespace).Get(context.TODO(), newPr.GetName(), metav1.GetOptions{}) +func patchPipelineRun(tektonClient tektonclient.Interface, namespace string, newPr *pipelinev1.PipelineRun, logger *logrus.Entry) error { + pr, err := tektonClient.TektonV1().PipelineRuns(namespace).Get(context.TODO(), newPr.GetName(), metav1.GetOptions{}) if err != nil { return errors.Wrapf(err, "getting PipelineRun/%s", newPr.GetName()) } @@ -147,14 +147,14 @@ func patchPipelineRun(tektonClient tektonclient.Interface, namespace string, new if logger != nil { logger.Infof("Created merge patch: %v", string(patch)) } - patched, err := tektonClient.pipelinev1beta1().PipelineRuns(namespace).Patch(context.TODO(), pr.Name, types.MergePatchType, patch, metav1.PatchOptions{}, "") + patched, err := tektonClient.TektonV1().PipelineRuns(namespace).Patch(context.TODO(), pr.Name, types.MergePatchType, patch, metav1.PatchOptions{}, "") if err != nil { return errors.Wrapf(err, "applying merge patch for PipelineRun/%s", pr.Name) } if !reflect.DeepEqual(patched.ObjectMeta.Labels, newPr.ObjectMeta.Labels) || !reflect.DeepEqual(patched.ObjectMeta.Annotations, newPr.ObjectMeta.Annotations) { patched.ObjectMeta.Labels = newPr.ObjectMeta.Labels patched.ObjectMeta.Annotations = newPr.ObjectMeta.Annotations - _, err := tektonClient.pipelinev1beta1().PipelineRuns(namespace).Update(context.TODO(), patched, metav1.UpdateOptions{}) + _, err := tektonClient.TektonV1().PipelineRuns(namespace).Update(context.TODO(), patched, metav1.UpdateOptions{}) if err != nil { return errors.Wrapf(err, "removing labels and annotations from PipelineRun/%s", pr.Name) } diff --git a/pkg/keeper/pipelinerun_monitor_test.go b/pkg/keeper/pipelinerun_monitor_test.go index 9bc2b5dfe..52a3e72e6 100644 --- a/pkg/keeper/pipelinerun_monitor_test.go +++ b/pkg/keeper/pipelinerun_monitor_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" @@ -116,12 +116,12 @@ func TestRerunPipelineRunsWithRaceConditionFailure(t *testing.T) { err := rerunPipelineRunsWithRaceConditionFailure(tektonClient, ns, nil) assert.NoError(t, err) - prList, err := tektonClient.pipelinev1beta1().PipelineRuns(ns).List(context.TODO(), metav1.ListOptions{}) + prList, err := tektonClient.TektonV1().PipelineRuns(ns).List(context.TODO(), metav1.ListOptions{}) assert.NoError(t, err) if tc.shouldRerun { - var updatedRun *pipelinev1beta1.PipelineRun - var rerunRun *pipelinev1beta1.PipelineRun + var updatedRun *pipelinev1.PipelineRun + var rerunRun *pipelinev1.PipelineRun if len(prList.Items) != 2 { t.Fatalf("Expected 2 PipelineRuns, but there are %d", len(prList.Items)) } @@ -170,8 +170,8 @@ func TestRerunPipelineRunsWithRaceConditionFailure(t *testing.T) { } } -func makeTestPipelineRun(condition *kpgapis.Condition, baseRunName string, pipelineName string, sa string, namespace string, alreadyRerun bool) *pipelinev1beta1.PipelineRun { - pr := &pipelinev1beta1.PipelineRun{ +func makeTestPipelineRun(condition *kpgapis.Condition, baseRunName string, pipelineName string, sa string, namespace string, alreadyRerun bool) *pipelinev1.PipelineRun { + pr := &pipelinev1.PipelineRun{ TypeMeta: metav1.TypeMeta{ APIVersion: tektonAPIVersion, Kind: "PipelineRun", @@ -181,14 +181,14 @@ func makeTestPipelineRun(condition *kpgapis.Condition, baseRunName string, pipel Namespace: namespace, ResourceVersion: "12345678", }, - Spec: pipelinev1beta1.PipelineRunSpec{ - PipelineRef: &pipelinev1beta1.PipelineRef{ + Spec: pipelinev1.PipelineRunSpec{ + PipelineRef: &pipelinev1.PipelineRef{ APIVersion: tektonAPIVersion, Name: pipelineName, }, ServiceAccountName: sa, }, - Status: pipelinev1beta1.PipelineRunStatus{}, + Status: pipelinev1.PipelineRunStatus{}, } if alreadyRerun { diff --git a/pkg/triggerconfig/inrepo/default_parameters.go b/pkg/triggerconfig/inrepo/default_parameters.go index 1fedf8b82..0e6776e32 100644 --- a/pkg/triggerconfig/inrepo/default_parameters.go +++ b/pkg/triggerconfig/inrepo/default_parameters.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/tektoncd/pipeline/pkg/apis/config" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "github.com/pkg/errors" @@ -15,7 +15,7 @@ import ( var ( // defaultParameterSpecs the default Lighthouse Pipeline Parameters which can be injected by the // lighthouse tekton engine - defaultParameterSpecs = []pipelinev1beta1.ParamSpec{ + defaultParameterSpecs = []pipelinev1.ParamSpec{ { Description: "the unique build number", Name: "BUILD_ID", @@ -50,8 +50,8 @@ var ( Description: "git pull request number", Name: "PULL_NUMBER", Type: "string", - Default: &pipelinev1beta1.ArrayOrString{ - Type: pipelinev1beta1.ParamTypeString, + Default: &pipelinev1.ArrayOrString{ + Type: pipelinev1.ParamTypeString, StringVal: "", }, }, @@ -59,8 +59,8 @@ var ( Description: "git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'", Name: "PULL_PULL_REF", Type: "string", - Default: &pipelinev1beta1.ArrayOrString{ - Type: pipelinev1beta1.ParamTypeString, + Default: &pipelinev1.ArrayOrString{ + Type: pipelinev1.ParamTypeString, StringVal: "", }, }, @@ -68,8 +68,8 @@ var ( Description: "git revision to checkout (branch, tag, sha, ref…)", Name: "PULL_PULL_SHA", Type: "string", - Default: &pipelinev1beta1.ArrayOrString{ - Type: pipelinev1beta1.ParamTypeString, + Default: &pipelinev1.ArrayOrString{ + Type: pipelinev1.ParamTypeString, StringVal: "", }, }, @@ -100,7 +100,7 @@ var ( // DefaultPipelineParameters defaults the parameter specs and parameter values from lighthouse onto // the PipelineRun and its nested PipelineSpec and Tasks -func DefaultPipelineParameters(prs *pipelinev1beta1.PipelineRun) (*pipelinev1beta1.PipelineRun, error) { +func DefaultPipelineParameters(prs *pipelinev1.PipelineRun) (*pipelinev1.PipelineRun, error) { if prs.Annotations != nil && prs.Annotations[DefaultParameters] == "false" { return prs, nil } @@ -119,7 +119,7 @@ func DefaultPipelineParameters(prs *pipelinev1beta1.PipelineRun) (*pipelinev1bet // lets create a step template if its not already defined if task.TaskSpec.StepTemplate == nil { - task.TaskSpec.StepTemplate = &pipelinev1beta1.StepTemplate{} + task.TaskSpec.StepTemplate = &pipelinev1.StepTemplate{} } stepTemplate := task.TaskSpec.StepTemplate stepTemplate.Env = addDefaultParameterEnvVars(stepTemplate.Env, defaultParameters) @@ -134,7 +134,7 @@ func DefaultPipelineParameters(prs *pipelinev1beta1.PipelineRun) (*pipelinev1bet // lets create a step template if its not already defined if task.TaskSpec.StepTemplate == nil { - task.TaskSpec.StepTemplate = &pipelinev1beta1.StepTemplate{} + task.TaskSpec.StepTemplate = &pipelinev1.StepTemplate{} } stepTemplate := task.TaskSpec.StepTemplate stepTemplate.Env = addDefaultParameterEnvVars(stepTemplate.Env, defaultParameters) @@ -182,7 +182,7 @@ func enableAlphaAPIFields(ctx context.Context) context.Context { return config.ToContext(ctx, cfg) } -func addDefaultParameterSpecs(params []pipelinev1beta1.ParamSpec, defaults []pipelinev1beta1.ParamSpec) []pipelinev1beta1.ParamSpec { +func addDefaultParameterSpecs(params []pipelinev1.ParamSpec, defaults []pipelinev1.ParamSpec) []pipelinev1.ParamSpec { for _, dp := range defaults { found := false for i := range params { @@ -205,7 +205,7 @@ func addDefaultParameterSpecs(params []pipelinev1beta1.ParamSpec, defaults []pip return params } -func addDefaultParameters(params []pipelinev1beta1.Param, defaults []pipelinev1beta1.Param) []pipelinev1beta1.Param { +func addDefaultParameters(params []pipelinev1.Param, defaults []pipelinev1.Param) []pipelinev1.Param { for _, dp := range defaults { found := false for i := range params { @@ -214,11 +214,11 @@ func addDefaultParameters(params []pipelinev1beta1.Param, defaults []pipelinev1b found = true if p.Value.Type == dp.Value.Type { switch p.Value.Type { - case pipelinev1beta1.ParamTypeString: + case pipelinev1.ParamTypeString: if p.Value.StringVal == "" { p.Value.StringVal = dp.Value.StringVal } - case pipelinev1beta1.ParamTypeArray: + case pipelinev1.ParamTypeArray: if len(p.Value.ArrayVal) == 0 { p.Value.ArrayVal = dp.Value.ArrayVal } @@ -234,7 +234,7 @@ func addDefaultParameters(params []pipelinev1beta1.Param, defaults []pipelinev1b return params } -func addDefaultParameterEnvVars(env []corev1.EnvVar, defaults []pipelinev1beta1.Param) []corev1.EnvVar { +func addDefaultParameterEnvVars(env []corev1.EnvVar, defaults []pipelinev1.Param) []corev1.EnvVar { for _, dp := range defaults { name := dp.Name upperName := strings.ToUpper(name) diff --git a/pkg/triggerconfig/inrepo/default_parameters_test.go b/pkg/triggerconfig/inrepo/default_parameters_test.go index 2f267e755..63b8ff056 100644 --- a/pkg/triggerconfig/inrepo/default_parameters_test.go +++ b/pkg/triggerconfig/inrepo/default_parameters_test.go @@ -6,18 +6,18 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/stretchr/testify/assert" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" ) func TestDefaultWorkspacesEmptyDir(t *testing.T) { - prs := &pipelinev1beta1.PipelineRun{ + prs := &pipelinev1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "cheese", }, - Spec: pipelinev1beta1.PipelineRunSpec{ - PipelineSpec: &pipelinev1beta1.PipelineSpec{}, - Workspaces: []pipelinev1beta1.WorkspaceBinding{ + Spec: pipelinev1.PipelineRunSpec{ + PipelineSpec: &pipelinev1.PipelineSpec{}, + Workspaces: []pipelinev1.WorkspaceBinding{ {Name: "foo"}, {Name: "bar"}, }, @@ -33,26 +33,26 @@ func TestDefaultWorkspacesEmptyDir(t *testing.T) { func TestDefaultFinallyParameters(t *testing.T) { - prs := &pipelinev1beta1.PipelineRun{ + prs := &pipelinev1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "cheese", }, - Spec: pipelinev1beta1.PipelineRunSpec{ - PipelineSpec: &pipelinev1beta1.PipelineSpec{ - Tasks: []pipelinev1beta1.PipelineTask{{ + Spec: pipelinev1.PipelineRunSpec{ + PipelineSpec: &pipelinev1.PipelineSpec{ + Tasks: []pipelinev1.PipelineTask{{ Name: "maintask", - TaskSpec: &pipelinev1beta1.EmbeddedTask{TaskSpec: pipelinev1beta1.TaskSpec{ - Steps: []pipelinev1beta1.Step{{ + TaskSpec: &pipelinev1.EmbeddedTask{TaskSpec: pipelinev1.TaskSpec{ + Steps: []pipelinev1.Step{{ Name: "mystep", Image: "myimage", }}, }}, }}, - Finally: []pipelinev1beta1.PipelineTask{{ + Finally: []pipelinev1.PipelineTask{{ Name: "i-should-have-parameters", - TaskSpec: &pipelinev1beta1.EmbeddedTask{TaskSpec: pipelinev1beta1.TaskSpec{ - Steps: []pipelinev1beta1.Step{{ + TaskSpec: &pipelinev1.EmbeddedTask{TaskSpec: pipelinev1.TaskSpec{ + Steps: []pipelinev1.Step{{ Name: "finallystep", Image: "finallyimage", }}, diff --git a/pkg/triggerconfig/inrepo/load_pipelinerun.go b/pkg/triggerconfig/inrepo/load_pipelinerun.go index f2b8865ed..5d9453617 100644 --- a/pkg/triggerconfig/inrepo/load_pipelinerun.go +++ b/pkg/triggerconfig/inrepo/load_pipelinerun.go @@ -12,7 +12,7 @@ import ( "time" "github.com/pkg/errors" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" ) @@ -62,7 +62,7 @@ func NewDefaultValues() (*DefaultValues, error) { // LoadTektonResourceAsPipelineRun loads a PipelineRun, Pipeline, Task or TaskRun and convert it to a PipelineRun // if necessary -func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipelinev1beta1.PipelineRun, error) { +func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipelinev1.PipelineRun, error) { if resolver.DefaultValues == nil { var err error resolver.DefaultValues, err = NewDefaultValues() @@ -90,7 +90,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe } switch kind { case "Pipeline": - pipeline := &pipelinev1beta1.Pipeline{} + pipeline := &pipelinev1.Pipeline{} err := yaml.Unmarshal(data, pipeline) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshal Pipeline YAML %s", message) @@ -116,7 +116,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe return DefaultPipelineParameters(prs) case "PipelineRun": - prs := &pipelinev1beta1.PipelineRun{} + prs := &pipelinev1.PipelineRun{} err := yaml.Unmarshal(data, prs) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshal PipelineRun YAML %s", message) @@ -139,7 +139,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe return DefaultPipelineParameters(prs) case "Task": - task := &pipelinev1beta1.Task{} + task := &pipelinev1.Task{} err := yaml.Unmarshal(data, task) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshal Task YAML %s", message) @@ -166,7 +166,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe return DefaultPipelineParameters(prs) case "TaskRun": - tr := &pipelinev1beta1.TaskRun{} + tr := &pipelinev1.TaskRun{} err := yaml.Unmarshal(data, tr) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshal TaskRun YAML %s", message) @@ -197,7 +197,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe } } -func defaultTaskName(prs *pipelinev1beta1.PipelineRun) { +func defaultTaskName(prs *pipelinev1.PipelineRun) { ps := prs.Spec.PipelineSpec if ps != nil && len(ps.Tasks) > 0 { t := ps.Tasks[0] @@ -208,7 +208,7 @@ func defaultTaskName(prs *pipelinev1beta1.PipelineRun) { } // inheritTaskSteps allows Task steps to be prepended or appended if the annotations are present -func inheritTaskSteps(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun) (*pipelinev1beta1.PipelineRun, error) { +func inheritTaskSteps(resolver *UsesResolver, prs *pipelinev1.PipelineRun) (*pipelinev1.PipelineRun, error) { err := processUsesSteps(resolver, prs) if err != nil { return prs, errors.Wrap(err, "failed to process uses steps") @@ -223,8 +223,8 @@ func inheritTaskSteps(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun) appendURL := prs.Annotations[AppendStepURL] prependURL := prs.Annotations[PrependStepURL] - var appendTask *pipelinev1beta1.Task - var prependTask *pipelinev1beta1.Task + var appendTask *pipelinev1.Task + var prependTask *pipelinev1.Task if appendURL != "" { appendTask, err = loadTaskByURL(appendURL) @@ -252,12 +252,12 @@ func inheritTaskSteps(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun) } // processUsesSteps handles any step which has an image prefixed with "uses:" -func processUsesSteps(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun) error { +func processUsesSteps(resolver *UsesResolver, prs *pipelinev1.PipelineRun) error { ps := prs.Spec.PipelineSpec if ps == nil { return nil } - tasksAndFinally := [][]pipelinev1beta1.PipelineTask{ + tasksAndFinally := [][]pipelinev1.PipelineTask{ ps.Tasks, ps.Finally, } @@ -270,13 +270,13 @@ func processUsesSteps(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun) return nil } -func processUsesStepsHelper(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun, pipelineTasks []pipelinev1beta1.PipelineTask) error { +func processUsesStepsHelper(resolver *UsesResolver, prs *pipelinev1.PipelineRun, pipelineTasks []pipelinev1.PipelineTask) error { for i := range pipelineTasks { pt := &pipelineTasks[i] if pt.TaskSpec != nil { ts := &pt.TaskSpec.TaskSpec clearStepTemplateImage := false - var steps []pipelinev1beta1.Step + var steps []pipelinev1.Step for j := range ts.Steps { step := ts.Steps[j] image := step.Image @@ -315,7 +315,7 @@ func processUsesStepsHelper(resolver *UsesResolver, prs *pipelinev1beta1.Pipelin return nil } -func loadTaskByURL(uri string) (*pipelinev1beta1.Task, error) { +func loadTaskByURL(uri string) (*pipelinev1.Task, error) { resp, err := http.Get(uri) // #nosec if err != nil { return nil, errors.Wrapf(err, "failed to read URL %s", uri) @@ -327,7 +327,7 @@ func loadTaskByURL(uri string) (*pipelinev1beta1.Task, error) { return nil, errors.Wrapf(err, "failed to read body from URL %s", uri) } - task := &pipelinev1beta1.Task{} + task := &pipelinev1.Task{} err = yaml.Unmarshal(data, &task) if err != nil { return nil, errors.Wrapf(err, "failed to unmarshall YAML from URL %s", uri) @@ -337,7 +337,7 @@ func loadTaskByURL(uri string) (*pipelinev1beta1.Task, error) { // loadTektonRefsFromFilesPattern returns a regular expression matching the Pipeline/Task references we should load // via the file system as separate local files -func loadTektonRefsFromFilesPattern(prs *pipelinev1beta1.PipelineRun) (*regexp.Regexp, error) { +func loadTektonRefsFromFilesPattern(prs *pipelinev1.PipelineRun) (*regexp.Regexp, error) { if prs.Annotations == nil { return nil, nil } @@ -352,7 +352,7 @@ func loadTektonRefsFromFilesPattern(prs *pipelinev1beta1.PipelineRun) (*regexp.R return re, nil } -func loadPipelineRunRefs(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRun, dir, message string, re *regexp.Regexp) (*pipelinev1beta1.PipelineRun, error) { +func loadPipelineRunRefs(resolver *UsesResolver, prs *pipelinev1.PipelineRun, dir, message string, re *regexp.Regexp) (*pipelinev1.PipelineRun, error) { // if we reference a local if prs.Spec.PipelineSpec == nil && prs.Spec.PipelineRef != nil && prs.Spec.PipelineRef.Name != "" && re.MatchString(prs.Spec.PipelineRef.Name) { pipelinePath := filepath.Join(dir, prs.Spec.PipelineRef.Name) @@ -366,7 +366,7 @@ func loadPipelineRunRefs(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRu if len(data) == 0 { return prs, errors.Errorf("no YAML for path %s in PipelineRun", pipelinePath) } - p := &pipelinev1beta1.Pipeline{} + p := &pipelinev1.Pipeline{} err = yaml.Unmarshal(data, p) if err != nil { return prs, errors.Wrapf(err, "failed to unmarshal Pipeline YAML file %s %s", pipelinePath, message) @@ -384,7 +384,7 @@ func loadPipelineRunRefs(resolver *UsesResolver, prs *pipelinev1beta1.PipelineRu return prs, nil } -func loadTaskRefs(resolver *UsesResolver, pipelineSpec *pipelinev1beta1.PipelineSpec, dir, message string, re *regexp.Regexp) error { +func loadTaskRefs(resolver *UsesResolver, pipelineSpec *pipelinev1.PipelineSpec, dir, message string, re *regexp.Regexp) error { for i := range pipelineSpec.Tasks { t := &pipelineSpec.Tasks[i] if t.TaskSpec == nil && t.TaskRef != nil && t.TaskRef.Name != "" && re.MatchString(t.TaskRef.Name) { @@ -399,12 +399,12 @@ func loadTaskRefs(resolver *UsesResolver, pipelineSpec *pipelinev1beta1.Pipeline if len(data) == 0 { return errors.Errorf("no YAML for path %s in PipelineSpec", path) } - t2 := &pipelinev1beta1.Task{} + t2 := &pipelinev1.Task{} err = yaml.Unmarshal(data, t2) if err != nil { return errors.Wrapf(err, "failed to unmarshal Task YAML file %s %s", path, message) } - t.TaskSpec = &pipelinev1beta1.EmbeddedTask{ + t.TaskSpec = &pipelinev1.EmbeddedTask{ TaskSpec: t2.Spec, } t.TaskRef = nil @@ -414,8 +414,8 @@ func loadTaskRefs(resolver *UsesResolver, pipelineSpec *pipelinev1beta1.Pipeline } // ConvertPipelineToPipelineRun converts the Pipeline to a PipelineRun -func ConvertPipelineToPipelineRun(from *pipelinev1beta1.Pipeline, message string, defaultValues *DefaultValues) (*pipelinev1beta1.PipelineRun, error) { - prs := &pipelinev1beta1.PipelineRun{ +func ConvertPipelineToPipelineRun(from *pipelinev1.Pipeline, message string, defaultValues *DefaultValues) (*pipelinev1.PipelineRun, error) { + prs := &pipelinev1.PipelineRun{ TypeMeta: metav1.TypeMeta{ Kind: "PipelineRun", APIVersion: TektonAPIVersion, @@ -431,8 +431,8 @@ func ConvertPipelineToPipelineRun(from *pipelinev1beta1.Pipeline, message string } // ConvertTaskToPipelineRun converts the Task to a PipelineRun -func ConvertTaskToPipelineRun(from *pipelinev1beta1.Task, message string, defaultValues *DefaultValues) (*pipelinev1beta1.PipelineRun, error) { - prs := &pipelinev1beta1.PipelineRun{ +func ConvertTaskToPipelineRun(from *pipelinev1.Task, message string, defaultValues *DefaultValues) (*pipelinev1.PipelineRun, error) { + prs := &pipelinev1.PipelineRun{ TypeMeta: metav1.TypeMeta{ Kind: "PipelineRun", APIVersion: TektonAPIVersion, @@ -443,13 +443,13 @@ func ConvertTaskToPipelineRun(from *pipelinev1beta1.Task, message string, defaul prs.Labels = from.Labels fs := &from.Spec - pipelineSpec := &pipelinev1beta1.PipelineSpec{ + pipelineSpec := &pipelinev1.PipelineSpec{ Description: "", Resources: nil, - Tasks: []pipelinev1beta1.PipelineTask{ + Tasks: []pipelinev1.PipelineTask{ { Name: from.Name, - TaskSpec: &pipelinev1beta1.EmbeddedTask{TaskSpec: *fs}, + TaskSpec: &pipelinev1.EmbeddedTask{TaskSpec: *fs}, Resources: ToPipelineResources(fs.Resources), Params: ToParams(fs.Params), Workspaces: ToWorkspacePipelineTaskBindingsFromDeclarations(fs.Workspaces), @@ -478,8 +478,8 @@ func ConvertTaskToPipelineRun(from *pipelinev1beta1.Task, message string, defaul } // ConvertTaskRunToPipelineRun converts the TaskRun to a PipelineRun -func ConvertTaskRunToPipelineRun(from *pipelinev1beta1.TaskRun, message string, defaultValues *DefaultValues) (*pipelinev1beta1.PipelineRun, error) { - prs := &pipelinev1beta1.PipelineRun{ +func ConvertTaskRunToPipelineRun(from *pipelinev1.TaskRun, message string, defaultValues *DefaultValues) (*pipelinev1.PipelineRun, error) { + prs := &pipelinev1.PipelineRun{ TypeMeta: metav1.TypeMeta{ Kind: "PipelineRun", APIVersion: TektonAPIVersion, @@ -491,7 +491,7 @@ func ConvertTaskRunToPipelineRun(from *pipelinev1beta1.TaskRun, message string, fs := &from.Spec params := fs.Params - var paramSpecs []pipelinev1beta1.ParamSpec + var paramSpecs []pipelinev1.ParamSpec if len(params) == 0 && fs.TaskSpec != nil { paramSpecs = fs.TaskSpec.Params if len(params) == 0 { @@ -501,14 +501,14 @@ func ConvertTaskRunToPipelineRun(from *pipelinev1beta1.TaskRun, message string, if len(paramSpecs) == 0 { paramSpecs = ToParamSpecs(params) } - pipelineSpec := &pipelinev1beta1.PipelineSpec{ + pipelineSpec := &pipelinev1.PipelineSpec{ Description: "", Resources: nil, - Tasks: []pipelinev1beta1.PipelineTask{ + Tasks: []pipelinev1.PipelineTask{ { Name: from.Name, TaskRef: fs.TaskRef, - TaskSpec: &pipelinev1beta1.EmbeddedTask{TaskSpec: *fs.TaskSpec}, + TaskSpec: &pipelinev1.EmbeddedTask{TaskSpec: *fs.TaskSpec}, //Resources: fs.Resources, Params: params, Workspaces: ToWorkspacePipelineTaskBindings(fs.Workspaces), @@ -529,7 +529,7 @@ func ConvertTaskRunToPipelineRun(from *pipelinev1beta1.TaskRun, message string, } // Apply adds any default values that are empty in the generated PipelineRun -func (v *DefaultValues) Apply(prs *pipelinev1beta1.PipelineRun) { +func (v *DefaultValues) Apply(prs *pipelinev1.PipelineRun) { if prs.Spec.ServiceAccountName == "" && v.ServiceAccountName != "" { prs.Spec.ServiceAccountName = v.ServiceAccountName } @@ -539,13 +539,13 @@ func (v *DefaultValues) Apply(prs *pipelinev1beta1.PipelineRun) { } // ToParams converts the param specs to params -func ToParams(params []pipelinev1beta1.ParamSpec) []pipelinev1beta1.Param { - var answer []pipelinev1beta1.Param +func ToParams(params []pipelinev1.ParamSpec) []pipelinev1.Param { + var answer []pipelinev1.Param for _, p := range params { - answer = append(answer, pipelinev1beta1.Param{ + answer = append(answer, pipelinev1.Param{ Name: p.Name, - Value: pipelinev1beta1.ArrayOrString{ - Type: pipelinev1beta1.ParamTypeString, + Value: pipelinev1.ArrayOrString{ + Type: pipelinev1.ParamTypeString, StringVal: fmt.Sprintf("$(params.%s)", p.Name), }, }) @@ -554,13 +554,13 @@ func ToParams(params []pipelinev1beta1.ParamSpec) []pipelinev1beta1.Param { } // ToParamSpecs generates param specs from the params -func ToParamSpecs(params []pipelinev1beta1.Param) []pipelinev1beta1.ParamSpec { - var answer []pipelinev1beta1.ParamSpec +func ToParamSpecs(params []pipelinev1.Param) []pipelinev1.ParamSpec { + var answer []pipelinev1.ParamSpec for _, p := range params { - answer = append(answer, pipelinev1beta1.ParamSpec{ + answer = append(answer, pipelinev1.ParamSpec{ Name: p.Name, // lets assume strings for now - Type: pipelinev1beta1.ParamTypeString, + Type: pipelinev1.ParamTypeString, Description: "", Default: nil, }) @@ -569,19 +569,19 @@ func ToParamSpecs(params []pipelinev1beta1.Param) []pipelinev1beta1.ParamSpec { } // ToPipelineResources converts the task resources to piepline resources -func ToPipelineResources(resources *pipelinev1beta1.TaskResources) *pipelinev1beta1.PipelineTaskResources { +func ToPipelineResources(resources *pipelinev1.TaskResources) *pipelinev1.PipelineTaskResources { if resources == nil { return nil } - return &pipelinev1beta1.PipelineTaskResources{ + return &pipelinev1.PipelineTaskResources{ Inputs: ToPipelineInputs(resources.Inputs), Outputs: ToPipelineOutputs(resources.Inputs), } } // ToPipelineInputs converts the task resources into pipeline inputs -func ToPipelineInputs(inputs []pipelinev1beta1.TaskResource) []pipelinev1beta1.PipelineTaskInputResource { - var answer []pipelinev1beta1.PipelineTaskInputResource +func ToPipelineInputs(inputs []pipelinev1.TaskResource) []pipelinev1.PipelineTaskInputResource { + var answer []pipelinev1.PipelineTaskInputResource for _, from := range inputs { answer = append(answer, ToPipelineInput(from)) } @@ -589,8 +589,8 @@ func ToPipelineInputs(inputs []pipelinev1beta1.TaskResource) []pipelinev1beta1.P } // ToPipelineOutputs converts the task resources into pipeline outputs -func ToPipelineOutputs(inputs []pipelinev1beta1.TaskResource) []pipelinev1beta1.PipelineTaskOutputResource { - var answer []pipelinev1beta1.PipelineTaskOutputResource +func ToPipelineOutputs(inputs []pipelinev1.TaskResource) []pipelinev1.PipelineTaskOutputResource { + var answer []pipelinev1.PipelineTaskOutputResource for _, from := range inputs { answer = append(answer, ToPipelineOutput(from)) } @@ -598,8 +598,8 @@ func ToPipelineOutputs(inputs []pipelinev1beta1.TaskResource) []pipelinev1beta1. } // ToPipelineInput converts the task resource into pipeline inputs -func ToPipelineInput(from pipelinev1beta1.TaskResource) pipelinev1beta1.PipelineTaskInputResource { - return pipelinev1beta1.PipelineTaskInputResource{ +func ToPipelineInput(from pipelinev1.TaskResource) pipelinev1.PipelineTaskInputResource { + return pipelinev1.PipelineTaskInputResource{ Name: from.Name, Resource: from.ResourceDeclaration.Name, From: nil, @@ -607,16 +607,16 @@ func ToPipelineInput(from pipelinev1beta1.TaskResource) pipelinev1beta1.Pipeline } // ToPipelineOutput converts the task resource into pipeline outputs -func ToPipelineOutput(from pipelinev1beta1.TaskResource) pipelinev1beta1.PipelineTaskOutputResource { - return pipelinev1beta1.PipelineTaskOutputResource{ +func ToPipelineOutput(from pipelinev1.TaskResource) pipelinev1.PipelineTaskOutputResource { + return pipelinev1.PipelineTaskOutputResource{ Name: from.Name, Resource: from.ResourceDeclaration.Name, } } // ToWorkspaceBindings converts the workspace declarations to workspaces bindings -func ToWorkspaceBindings(workspaces []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.WorkspaceBinding { - var answer []pipelinev1beta1.WorkspaceBinding +func ToWorkspaceBindings(workspaces []pipelinev1.WorkspaceDeclaration) []pipelinev1.WorkspaceBinding { + var answer []pipelinev1.WorkspaceBinding for _, from := range workspaces { answer = append(answer, ToWorkspaceBinding(from)) } @@ -624,15 +624,15 @@ func ToWorkspaceBindings(workspaces []pipelinev1beta1.WorkspaceDeclaration) []pi } // ToWorkspaceBinding converts the workspace declaration to a workspaces binding -func ToWorkspaceBinding(from pipelinev1beta1.WorkspaceDeclaration) pipelinev1beta1.WorkspaceBinding { - return pipelinev1beta1.WorkspaceBinding{ +func ToWorkspaceBinding(from pipelinev1.WorkspaceDeclaration) pipelinev1.WorkspaceBinding { + return pipelinev1.WorkspaceBinding{ Name: from.Name, } } // ToWorkspacePipelineTaskBindings converts the workspace bindings to pipeline task bindings -func ToWorkspacePipelineTaskBindings(workspaces []pipelinev1beta1.WorkspaceBinding) []pipelinev1beta1.WorkspacePipelineTaskBinding { - var answer []pipelinev1beta1.WorkspacePipelineTaskBinding +func ToWorkspacePipelineTaskBindings(workspaces []pipelinev1.WorkspaceBinding) []pipelinev1.WorkspacePipelineTaskBinding { + var answer []pipelinev1.WorkspacePipelineTaskBinding for _, from := range workspaces { answer = append(answer, ToWorkspacePipelineTaskBinding(from)) } @@ -640,8 +640,8 @@ func ToWorkspacePipelineTaskBindings(workspaces []pipelinev1beta1.WorkspaceBindi } // ToWorkspacePipelineTaskBinding converts the workspace binding to a pipeline task binding -func ToWorkspacePipelineTaskBinding(from pipelinev1beta1.WorkspaceBinding) pipelinev1beta1.WorkspacePipelineTaskBinding { - return pipelinev1beta1.WorkspacePipelineTaskBinding{ +func ToWorkspacePipelineTaskBinding(from pipelinev1.WorkspaceBinding) pipelinev1.WorkspacePipelineTaskBinding { + return pipelinev1.WorkspacePipelineTaskBinding{ Name: from.Name, Workspace: from.Name, SubPath: from.SubPath, @@ -649,8 +649,8 @@ func ToWorkspacePipelineTaskBinding(from pipelinev1beta1.WorkspaceBinding) pipel } // ToWorkspacePipelineTaskBindingsFromDeclarations converts the workspace declarations to pipeline task bindings -func ToWorkspacePipelineTaskBindingsFromDeclarations(workspaces []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.WorkspacePipelineTaskBinding { - var answer []pipelinev1beta1.WorkspacePipelineTaskBinding +func ToWorkspacePipelineTaskBindingsFromDeclarations(workspaces []pipelinev1.WorkspaceDeclaration) []pipelinev1.WorkspacePipelineTaskBinding { + var answer []pipelinev1.WorkspacePipelineTaskBinding for _, from := range workspaces { answer = append(answer, ToWorkspacePipelineTaskBindingsFromDeclaration(from)) } @@ -658,8 +658,8 @@ func ToWorkspacePipelineTaskBindingsFromDeclarations(workspaces []pipelinev1beta } // ToWorkspacePipelineTaskBindingsFromDeclaration converts the workspace declaration to a pipeline task binding -func ToWorkspacePipelineTaskBindingsFromDeclaration(from pipelinev1beta1.WorkspaceDeclaration) pipelinev1beta1.WorkspacePipelineTaskBinding { - return pipelinev1beta1.WorkspacePipelineTaskBinding{ +func ToWorkspacePipelineTaskBindingsFromDeclaration(from pipelinev1.WorkspaceDeclaration) pipelinev1.WorkspacePipelineTaskBinding { + return pipelinev1.WorkspacePipelineTaskBinding{ Name: from.Name, Workspace: from.Name, SubPath: "", @@ -667,8 +667,8 @@ func ToWorkspacePipelineTaskBindingsFromDeclaration(from pipelinev1beta1.Workspa } // ToPipelineWorkspaceDeclarations converts the workspace declarations to pipeline workspace declarations -func ToPipelineWorkspaceDeclarations(workspaces []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.PipelineWorkspaceDeclaration { - var answer []pipelinev1beta1.PipelineWorkspaceDeclaration +func ToPipelineWorkspaceDeclarations(workspaces []pipelinev1.WorkspaceDeclaration) []pipelinev1.PipelineWorkspaceDeclaration { + var answer []pipelinev1.PipelineWorkspaceDeclaration for _, from := range workspaces { answer = append(answer, ToPipelineWorkspaceDeclaration(from)) } @@ -676,8 +676,8 @@ func ToPipelineWorkspaceDeclarations(workspaces []pipelinev1beta1.WorkspaceDecla } // ToPipelineWorkspaceDeclaration converts the workspace declaration to a pipeline workspace declaration -func ToPipelineWorkspaceDeclaration(from pipelinev1beta1.WorkspaceDeclaration) pipelinev1beta1.PipelineWorkspaceDeclaration { - return pipelinev1beta1.PipelineWorkspaceDeclaration{ +func ToPipelineWorkspaceDeclaration(from pipelinev1.WorkspaceDeclaration) pipelinev1.PipelineWorkspaceDeclaration { + return pipelinev1.PipelineWorkspaceDeclaration{ Name: from.Name, Description: from.Description, } diff --git a/pkg/triggerconfig/inrepo/overrides.go b/pkg/triggerconfig/inrepo/overrides.go index 923be6766..0a9a418df 100644 --- a/pkg/triggerconfig/inrepo/overrides.go +++ b/pkg/triggerconfig/inrepo/overrides.go @@ -1,15 +1,15 @@ package inrepo import ( - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" v1 "k8s.io/api/core/v1" ) // OverrideTaskSpec lets reuse any TaskSpec resources from the used task -func OverrideTaskSpec(ts *pipelinev1beta1.TaskSpec, override *pipelinev1beta1.TaskSpec) { +func OverrideTaskSpec(ts *pipelinev1.TaskSpec, override *pipelinev1.TaskSpec) { if override.StepTemplate != nil { if ts.StepTemplate == nil { - ts.StepTemplate = &pipelinev1beta1.StepTemplate{} + ts.StepTemplate = &pipelinev1.StepTemplate{} } OverrideTemplateWithTemplate(ts.StepTemplate, override.StepTemplate, true) if override.StepTemplate.Image != "" { @@ -20,7 +20,7 @@ func OverrideTaskSpec(ts *pipelinev1beta1.TaskSpec, override *pipelinev1beta1.Ta } // OverrideStep overrides the step with the given overrides -func OverrideStep(step *pipelinev1beta1.Step, override *pipelinev1beta1.Step) { +func OverrideStep(step *pipelinev1.Step, override *pipelinev1.Step) { if len(override.Command) > 0 { step.Script = override.Script step.Command = override.Command @@ -38,7 +38,7 @@ func OverrideStep(step *pipelinev1beta1.Step, override *pipelinev1beta1.Step) { } // OverrideTemplateWithStep overrides the container properties -func OverrideTemplateWithTemplate(c *pipelinev1beta1.StepTemplate, override *pipelinev1beta1.StepTemplate, modify bool) { +func OverrideTemplateWithTemplate(c *pipelinev1.StepTemplate, override *pipelinev1.StepTemplate, modify bool) { c.Env = OverrideEnv(c.Env, override.Env, modify) c.EnvFrom = OverrideEnvFrom(c.EnvFrom, override.EnvFrom, modify) if string(override.ImagePullPolicy) != "" && (modify || string(c.ImagePullPolicy) == "") { @@ -55,7 +55,7 @@ func OverrideTemplateWithTemplate(c *pipelinev1beta1.StepTemplate, override *pip } // OverrideTemplateWithStep overrides the container properties -func OverrideStepWithStep(c *pipelinev1beta1.Step, override *pipelinev1beta1.Step, modify bool) { +func OverrideStepWithStep(c *pipelinev1.Step, override *pipelinev1.Step, modify bool) { c.Env = OverrideEnv(c.Env, override.Env, modify) c.EnvFrom = OverrideEnvFrom(c.EnvFrom, override.EnvFrom, modify) if string(override.ImagePullPolicy) != "" && (modify || string(c.ImagePullPolicy) == "") { diff --git a/pkg/triggerconfig/inrepo/params.go b/pkg/triggerconfig/inrepo/params.go index f320fb6d3..76acb1c61 100644 --- a/pkg/triggerconfig/inrepo/params.go +++ b/pkg/triggerconfig/inrepo/params.go @@ -5,19 +5,19 @@ import ( "fmt" "strings" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" ) // UseLocation defines the location where we are using one or more steps where we may need to modify // the parameters, results and workspaces type UseLocation struct { - PipelineRunSpec *pipelinev1beta1.PipelineRunSpec - PipelineSpec *pipelinev1beta1.PipelineSpec - PipelineTask *pipelinev1beta1.PipelineTask + PipelineRunSpec *pipelinev1.PipelineRunSpec + PipelineSpec *pipelinev1.PipelineSpec + PipelineTask *pipelinev1.PipelineTask TaskName string - TaskRunSpec *pipelinev1beta1.TaskRunSpec - TaskSpec *pipelinev1beta1.TaskSpec + TaskRunSpec *pipelinev1.TaskRunSpec + TaskSpec *pipelinev1.TaskSpec } func getParamsFromTasksResults(loc *UseLocation) map[string]bool { @@ -37,7 +37,7 @@ func getParamsFromTasksResults(loc *UseLocation) map[string]bool { } // UseParametersAndResults adds the parameters from the used Task to the PipelineSpec if specified and the PipelineTask -func UseParametersAndResults(ctx context.Context, loc *UseLocation, uses *pipelinev1beta1.TaskSpec) { +func UseParametersAndResults(ctx context.Context, loc *UseLocation, uses *pipelinev1.TaskSpec) { parameterSpecs := uses.Params parameters := ToParams(parameterSpecs) results := uses.Results @@ -74,7 +74,7 @@ func UseParametersAndResults(ctx context.Context, loc *UseLocation, uses *pipeli stepTemplate := ts.StepTemplate created := false if stepTemplate == nil { - stepTemplate = &pipelinev1beta1.StepTemplate{} + stepTemplate = &pipelinev1.StepTemplate{} created = true } stepTemplate.Env = useParameterEnvVars(stepTemplate.Env, parameters) @@ -86,18 +86,18 @@ func UseParametersAndResults(ctx context.Context, loc *UseLocation, uses *pipeli } // ToDefaultParams converts the param specs to default params -func ToDefaultParams(params []pipelinev1beta1.ParamSpec) []pipelinev1beta1.Param { - var answer []pipelinev1beta1.Param +func ToDefaultParams(params []pipelinev1.ParamSpec) []pipelinev1.Param { + var answer []pipelinev1.Param for _, p := range params { - value := pipelinev1beta1.ArrayOrString{ - Type: pipelinev1beta1.ParamTypeString, + value := pipelinev1.ArrayOrString{ + Type: pipelinev1.ParamTypeString, } d := p.Default if d != nil { value.StringVal = d.StringVal value.ArrayVal = d.ArrayVal } - answer = append(answer, pipelinev1beta1.Param{ + answer = append(answer, pipelinev1.Param{ Name: p.Name, Value: value, }) @@ -105,7 +105,7 @@ func ToDefaultParams(params []pipelinev1beta1.ParamSpec) []pipelinev1beta1.Param return answer } -func useParameterSpecs(ctx context.Context, params []pipelinev1beta1.ParamSpec, uses []pipelinev1beta1.ParamSpec, areParamsFromTasksResults map[string]bool) []pipelinev1beta1.ParamSpec { +func useParameterSpecs(ctx context.Context, params []pipelinev1.ParamSpec, uses []pipelinev1.ParamSpec, areParamsFromTasksResults map[string]bool) []pipelinev1.ParamSpec { for _, u := range uses { found := false for i := range params { @@ -129,7 +129,7 @@ func useParameterSpecs(ctx context.Context, params []pipelinev1beta1.ParamSpec, return params } -func useParameters(params []pipelinev1beta1.Param, uses []pipelinev1beta1.Param, areParamsFromTasksResults map[string]bool) []pipelinev1beta1.Param { +func useParameters(params []pipelinev1.Param, uses []pipelinev1.Param, areParamsFromTasksResults map[string]bool) []pipelinev1.Param { for _, u := range uses { found := false for i := range params { @@ -138,11 +138,11 @@ func useParameters(params []pipelinev1beta1.Param, uses []pipelinev1beta1.Param, found = true if p.Value.Type == u.Value.Type { switch p.Value.Type { - case pipelinev1beta1.ParamTypeString: + case pipelinev1.ParamTypeString: if p.Value.StringVal == "" { p.Value.StringVal = u.Value.StringVal } - case pipelinev1beta1.ParamTypeArray: + case pipelinev1.ParamTypeArray: if len(p.Value.ArrayVal) == 0 { p.Value.ArrayVal = u.Value.ArrayVal } @@ -160,7 +160,7 @@ func useParameters(params []pipelinev1beta1.Param, uses []pipelinev1beta1.Param, return params } -func useParameterEnvVars(env []corev1.EnvVar, uses []pipelinev1beta1.Param) []corev1.EnvVar { +func useParameterEnvVars(env []corev1.EnvVar, uses []pipelinev1.Param) []corev1.EnvVar { for _, u := range uses { name := u.Name upperName := strings.ToUpper(name) @@ -190,7 +190,7 @@ func useParameterEnvVars(env []corev1.EnvVar, uses []pipelinev1beta1.Param) []co return env } -func usePipelineResults(results []pipelinev1beta1.PipelineResult, uses []pipelinev1beta1.TaskResult, taskName string) []pipelinev1beta1.PipelineResult { +func usePipelineResults(results []pipelinev1.PipelineResult, uses []pipelinev1.TaskResult, taskName string) []pipelinev1.PipelineResult { for _, u := range uses { found := false for i := range results { @@ -204,17 +204,17 @@ func usePipelineResults(results []pipelinev1beta1.PipelineResult, uses []pipelin } } if !found { - results = append(results, pipelinev1beta1.PipelineResult{ + results = append(results, pipelinev1.PipelineResult{ Name: u.Name, Description: u.Description, - Value: *pipelinev1beta1.NewStructuredValues(fmt.Sprintf("$(tasks.%s.results.%s)", taskName, u.Name)), + Value: *pipelinev1.NewStructuredValues(fmt.Sprintf("$(tasks.%s.results.%s)", taskName, u.Name)), }) } } return results } -func useResults(results []pipelinev1beta1.TaskResult, uses []pipelinev1beta1.TaskResult) []pipelinev1beta1.TaskResult { +func useResults(results []pipelinev1.TaskResult, uses []pipelinev1.TaskResult) []pipelinev1.TaskResult { for _, u := range uses { found := false for i := range results { @@ -234,7 +234,7 @@ func useResults(results []pipelinev1beta1.TaskResult, uses []pipelinev1beta1.Tas return results } -func useWorkspaceTaskBindings(ws []pipelinev1beta1.WorkspacePipelineTaskBinding, uses []pipelinev1beta1.WorkspacePipelineTaskBinding) []pipelinev1beta1.WorkspacePipelineTaskBinding { +func useWorkspaceTaskBindings(ws []pipelinev1.WorkspacePipelineTaskBinding, uses []pipelinev1.WorkspacePipelineTaskBinding) []pipelinev1.WorkspacePipelineTaskBinding { for _, u := range uses { found := false for i := range ws { @@ -251,7 +251,7 @@ func useWorkspaceTaskBindings(ws []pipelinev1beta1.WorkspacePipelineTaskBinding, return ws } -func usePipelineWorkspaces(ws []pipelinev1beta1.PipelineWorkspaceDeclaration, uses []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.PipelineWorkspaceDeclaration { +func usePipelineWorkspaces(ws []pipelinev1.PipelineWorkspaceDeclaration, uses []pipelinev1.WorkspaceDeclaration) []pipelinev1.PipelineWorkspaceDeclaration { for _, u := range uses { found := false for i := range ws { @@ -265,7 +265,7 @@ func usePipelineWorkspaces(ws []pipelinev1beta1.PipelineWorkspaceDeclaration, us } } if !found { - ws = append(ws, pipelinev1beta1.PipelineWorkspaceDeclaration{ + ws = append(ws, pipelinev1.PipelineWorkspaceDeclaration{ Name: u.Name, Description: u.Description, Optional: u.Optional, @@ -275,7 +275,7 @@ func usePipelineWorkspaces(ws []pipelinev1beta1.PipelineWorkspaceDeclaration, us return ws } -func useSidecars(ws []pipelinev1beta1.Sidecar, uses []pipelinev1beta1.Sidecar) []pipelinev1beta1.Sidecar { +func useSidecars(ws []pipelinev1.Sidecar, uses []pipelinev1.Sidecar) []pipelinev1.Sidecar { for _, u := range uses { found := false for i := range ws { @@ -292,7 +292,7 @@ func useSidecars(ws []pipelinev1beta1.Sidecar, uses []pipelinev1beta1.Sidecar) [ return ws } -func useWorkspaces(ws []pipelinev1beta1.WorkspaceDeclaration, uses []pipelinev1beta1.WorkspaceDeclaration) []pipelinev1beta1.WorkspaceDeclaration { +func useWorkspaces(ws []pipelinev1.WorkspaceDeclaration, uses []pipelinev1.WorkspaceDeclaration) []pipelinev1.WorkspaceDeclaration { for _, u := range uses { found := false for i := range ws { @@ -312,7 +312,7 @@ func useWorkspaces(ws []pipelinev1beta1.WorkspaceDeclaration, uses []pipelinev1b return ws } -func useWorkspaceBindings(ws []pipelinev1beta1.WorkspaceBinding, uses []pipelinev1beta1.WorkspaceBinding) []pipelinev1beta1.WorkspaceBinding { +func useWorkspaceBindings(ws []pipelinev1.WorkspaceBinding, uses []pipelinev1.WorkspaceBinding) []pipelinev1.WorkspaceBinding { for _, u := range uses { found := false for i := range ws { diff --git a/pkg/triggerconfig/inrepo/resolver_cache.go b/pkg/triggerconfig/inrepo/resolver_cache.go index 1cba830bb..60ca0e7d8 100644 --- a/pkg/triggerconfig/inrepo/resolver_cache.go +++ b/pkg/triggerconfig/inrepo/resolver_cache.go @@ -3,7 +3,7 @@ package inrepo import ( "sync" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" ) const DELIMIER = "#" @@ -12,14 +12,14 @@ const DELIMIER = "#" // the git cloning with in repo configurations type ResolverCache struct { lock sync.RWMutex - pipelineCache map[string]*pipelinev1beta1.PipelineRun + pipelineCache map[string]*pipelinev1.PipelineRun dataCache map[string][]byte } // NewResolverCache creates a new resolver cache func NewResolverCache() *ResolverCache { return &ResolverCache{ - pipelineCache: map[string]*pipelinev1beta1.PipelineRun{}, + pipelineCache: map[string]*pipelinev1.PipelineRun{}, dataCache: map[string][]byte{}, } } @@ -47,11 +47,11 @@ func (c *ResolverCache) SetData(sourceURI, ref string, value []byte) { } // GetPipelineRun gets the PipelineRun from the cache if available or returns nil -func (c *ResolverCache) GetPipelineRun(sourceURI, ref string) *pipelinev1beta1.PipelineRun { +func (c *ResolverCache) GetPipelineRun(sourceURI, ref string) *pipelinev1.PipelineRun { if c == nil || sourceURI == "" { return nil } - var answer *pipelinev1beta1.PipelineRun + var answer *pipelinev1.PipelineRun c.lock.Lock() answer = c.pipelineCache[sourceURI+DELIMIER+ref] c.lock.Unlock() @@ -59,7 +59,7 @@ func (c *ResolverCache) GetPipelineRun(sourceURI, ref string) *pipelinev1beta1.P } // SetPipelineRun updates the cache -func (c *ResolverCache) SetPipelineRun(sourceURI string, ref string, value *pipelinev1beta1.PipelineRun) { +func (c *ResolverCache) SetPipelineRun(sourceURI string, ref string, value *pipelinev1.PipelineRun) { if c == nil || value == nil { return } diff --git a/pkg/triggerconfig/inrepo/uses_resolver.go b/pkg/triggerconfig/inrepo/uses_resolver.go index 571aa166e..f63b99b6c 100644 --- a/pkg/triggerconfig/inrepo/uses_resolver.go +++ b/pkg/triggerconfig/inrepo/uses_resolver.go @@ -13,7 +13,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/filebrowser" "github.com/jenkins-x/lighthouse/pkg/util" "github.com/pkg/errors" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" ) // UsesResolver resolves the `uses:` URI syntax @@ -40,7 +40,7 @@ var ( // UsesSteps lets resolve the sourceURI to a PipelineRun and find the step or steps // for the given task name and/or step name then lets apply any overrides from the step -func (r *UsesResolver) UsesSteps(sourceURI string, taskName string, step pipelinev1beta1.Step, ts *pipelinev1beta1.TaskSpec, loc *UseLocation) ([]pipelinev1beta1.Step, error) { +func (r *UsesResolver) UsesSteps(sourceURI string, taskName string, step pipelinev1.Step, ts *pipelinev1.TaskSpec, loc *UseLocation) ([]pipelinev1.Step, error) { pr := r.Cache.GetPipelineRun(sourceURI, r.SHA) if pr == nil || ignoreUsesCache { data, err := r.GetData(sourceURI, false) @@ -183,7 +183,7 @@ func VersionStreamEnvVar(owner string, repo string) string { return envVar } -func (r *UsesResolver) findSteps(sourceURI string, pr *pipelinev1beta1.PipelineRun, taskName string, step pipelinev1beta1.Step) (*pipelinev1beta1.TaskSpec, error) { +func (r *UsesResolver) findSteps(sourceURI string, pr *pipelinev1.PipelineRun, taskName string, step pipelinev1.Step) (*pipelinev1.TaskSpec, error) { if pr.Spec.PipelineSpec == nil { return nil, errors.Errorf("source URI %s has no spec.pipelineSpec", sourceURI) } @@ -204,7 +204,7 @@ func (r *UsesResolver) findSteps(sourceURI string, pr *pipelinev1beta1.PipelineR } } -func (r *UsesResolver) findTaskStep(sourceURI string, task pipelinev1beta1.PipelineTask, step pipelinev1beta1.Step) (*pipelinev1beta1.TaskSpec, error) { +func (r *UsesResolver) findTaskStep(sourceURI string, task pipelinev1.PipelineTask, step pipelinev1.Step) (*pipelinev1.TaskSpec, error) { ts := task.TaskSpec if ts == nil { return nil, errors.Errorf("source URI %s has no task spec for task %s", sourceURI, task.Name) @@ -230,7 +230,7 @@ func (r *UsesResolver) findTaskStep(sourceURI string, task pipelinev1beta1.Pipel if suffix != "" { replaceStep.Name = name + "-" + suffix } - taskSpec.Steps = []pipelinev1beta1.Step{replaceStep} + taskSpec.Steps = []pipelinev1.Step{replaceStep} return &taskSpec, nil } } diff --git a/test/e2e/tekton/tekton_test.go b/test/e2e/tekton/tekton_test.go index ebd5c6b73..238ba9ee9 100644 --- a/test/e2e/tekton/tekton_test.go +++ b/test/e2e/tekton/tekton_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" "github.com/pkg/errors" "github.com/sirupsen/logrus" - pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" ) @@ -283,13 +283,13 @@ func ChatOpsTests() bool { }) } -func generatePipelineRunSpec() *pipelinev1beta1.PipelineRunSpec { - return &pipelinev1beta1.PipelineRunSpec{ - PipelineRef: &pipelinev1beta1.PipelineRef{ +func generatePipelineRunSpec() *pipelinev1.PipelineRunSpec { + return &pipelinev1.PipelineRunSpec{ + PipelineRef: &pipelinev1.PipelineRef{ Name: "lh-test-pipeline", }, ServiceAccountName: "tekton-bot", - Workspaces: []pipelinev1beta1.WorkspaceBinding{{ + Workspaces: []pipelinev1.WorkspaceBinding{{ Name: "shared-data", VolumeClaimTemplate: &corev1.PersistentVolumeClaim{ Spec: corev1.PersistentVolumeClaimSpec{ From 6c0782f2d9f3e0d646090f77672b459be8aa8641 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 5 Dec 2024 11:35:17 +0100 Subject: [PATCH 04/23] chore: regenerate crds with make crd-manifests --- Makefile | 2 +- ...ouse.jenkins.io_lighthousebreakpoints.yaml | 24 +- .../lighthouse.jenkins.io_lighthousejobs.yaml | 8986 +++++++++-------- 3 files changed, 5001 insertions(+), 4011 deletions(-) diff --git a/Makefile b/Makefile index 61bcc47ac..5046a8e5d 100644 --- a/Makefile +++ b/Makefile @@ -179,7 +179,7 @@ verify-code-unchanged: CONTROLLER_GEN := $(GOPATH)/bin/controller-gen $(CONTROLLER_GEN): - $(GO) install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 + $(GO) install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5 crd-manifests: $(CONTROLLER_GEN) $(CONTROLLER_GEN) crd:maxDescLen=0 paths="./pkg/apis/lighthouse/v1alpha1/..." output:crd:artifacts:config=crds diff --git a/crds/lighthouse.jenkins.io_lighthousebreakpoints.yaml b/crds/lighthouse.jenkins.io_lighthousebreakpoints.yaml index f78d75ce6..70f15f2fa 100644 --- a/crds/lighthouse.jenkins.io_lighthousebreakpoints.yaml +++ b/crds/lighthouse.jenkins.io_lighthousebreakpoints.yaml @@ -1,11 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.16.5 name: lighthousebreakpoints.lighthouse.jenkins.io spec: group: lighthouse.jenkins.io @@ -32,10 +30,16 @@ spec: properties: debug: properties: - breakpoint: - items: - type: string - type: array + breakpoints: + properties: + beforeSteps: + items: + type: string + type: array + x-kubernetes-list-type: atomic + onFailure: + type: string + type: object type: object filter: properties: @@ -56,9 +60,3 @@ spec: type: object served: true storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/crds/lighthouse.jenkins.io_lighthousejobs.yaml b/crds/lighthouse.jenkins.io_lighthousejobs.yaml index 25dee3295..b60c238fe 100644 --- a/crds/lighthouse.jenkins.io_lighthousejobs.yaml +++ b/crds/lighthouse.jenkins.io_lighthousejobs.yaml @@ -1,11 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.16.5 name: lighthousejobs.lighthouse.jenkins.io spec: group: lighthouse.jenkins.io @@ -115,7 +113,7 @@ spec: name: type: string value: - type: Any + type: object required: - name - value @@ -125,116 +123,137 @@ spec: properties: apiVersion: type: string - bundle: - type: string name: type: string + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + resolver: + type: string type: object pipelineSpec: properties: description: type: string + displayName: + type: string finally: items: properties: - conditions: - items: - properties: - conditionRef: - type: string - params: - items: - properties: - name: - type: string - value: - type: Any - required: - - name - - value - type: object - type: array - resources: - items: - properties: - from: - items: - type: string - type: array - name: - type: string - resource: - type: string - required: - - name - - resource - type: object - type: array - required: - - conditionRef - type: object - type: array + description: + type: string + displayName: + type: string + matrix: + properties: + include: + items: + properties: + name: + type: string + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + type: object + type: array + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + type: object name: type: string + onError: + type: string params: items: properties: name: type: string value: - type: Any + type: object required: - name - value type: object type: array - resources: + pipelineRef: properties: - inputs: - items: - properties: - from: - items: - type: string - type: array - name: - type: string - resource: - type: string - required: - - name - - resource - type: object - type: array - outputs: + apiVersion: + type: string + name: + type: string + params: items: properties: name: type: string - resource: - type: string + value: + type: object required: - name - - resource + - value type: object type: array + resolver: + type: string type: object + pipelineSpec: {} retries: type: integer runAfter: items: type: string type: array + x-kubernetes-list-type: atomic taskRef: properties: apiVersion: type: string - bundle: - type: string kind: type: string name: type: string + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + resolver: + type: string type: object taskSpec: properties: @@ -242,6 +261,8 @@ spec: type: string description: type: string + displayName: + type: string kind: type: string metadata: @@ -259,56 +280,28 @@ spec: items: properties: default: - type: Any + type: object description: type: string + enum: + items: + type: string + type: array name: type: string + properties: + additionalProperties: + properties: + type: + type: string + type: object + type: object type: type: string required: - name type: object type: array - resources: - properties: - inputs: - items: - properties: - description: - type: string - name: - type: string - optional: - type: boolean - targetPath: - type: string - type: - type: string - required: - - name - - type - type: object - type: array - outputs: - items: - properties: - description: - type: string - name: - type: string - optional: - type: boolean - targetPath: - type: string - type: - type: string - required: - - name - - type - type: object - type: array - type: object results: items: properties: @@ -316,10 +309,22 @@ spec: type: string name: type: string + properties: + additionalProperties: + properties: + type: + type: string + type: object + type: object + type: + type: string + value: + type: object required: - name type: object type: array + x-kubernetes-list-type: atomic sidecars: items: properties: @@ -327,10 +332,45 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic + computeResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object env: items: properties: @@ -345,12 +385,14 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -360,6 +402,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -375,43 +418,52 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name type: object type: array + x-kubernetes-list-type: atomic envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -426,6 +478,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -443,6 +496,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -455,6 +509,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -476,6 +538,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -493,6 +556,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -505,6 +569,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -527,10 +599,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -547,6 +631,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -603,6 +688,7 @@ spec: name: type: string protocol: + default: TCP type: string required: - containerPort @@ -620,10 +706,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -640,6 +738,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -680,41 +779,35 @@ spec: format: int32 type: integer type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object + restartPolicy: + type: string script: type: string securityContext: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -770,10 +863,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -790,6 +895,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -852,6 +958,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -863,6 +970,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -872,6 +981,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic workingDir: type: string workspaces: @@ -886,27 +996,65 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic required: - name type: object type: array + x-kubernetes-list-type: atomic spec: type: object + x-kubernetes-preserve-unknown-fields: true stepTemplate: properties: args: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array - env: - items: - properties: - name: - type: string + x-kubernetes-list-type: atomic + computeResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + env: + items: + properties: + name: + type: string value: type: string valueFrom: @@ -916,12 +1064,14 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -931,6 +1081,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -946,344 +1097,81 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name type: object type: array + x-kubernetes-list-type: atomic envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: + securityContext: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: + localhostProfile: type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: + type: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + - type type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -1331,84 +1219,6 @@ spec: type: string type: object type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean volumeDevices: items: properties: @@ -1421,6 +1231,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -1432,6 +1243,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -1441,10 +1254,9 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic workingDir: type: string - required: - - name type: object steps: items: @@ -1453,10 +1265,45 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic + computeResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object env: items: properties: @@ -1471,12 +1318,14 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1486,6 +1335,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1501,368 +1351,159 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name type: object type: array + x-kubernetes-list-type: atomic envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: type: string - lifecycle: + name: + type: string + onError: + type: string + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + ref: properties: - postStart: + name: + type: string + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + resolver: + type: string + type: object + results: + items: + properties: + description: + type: string + name: + type: string properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: + additionalProperties: properties: - host: + type: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port type: object - type: object - preStop: + type: object + type: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + script: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object + localhostProfile: + type: string + type: + type: string + required: + - type type: object - type: object - livenessProbe: - properties: - exec: + capabilities: properties: - command: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object - failureThreshold: - format: int32 + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 type: integer - httpGet: + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - host: + level: type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - onError: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - script: - type: string - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: + role: type: string type: type: string @@ -1890,86 +1531,18 @@ spec: type: string type: object type: object - startupProbe: + stderrConfig: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer + path: + type: string + type: object + stdoutConfig: + properties: + path: + type: string type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string timeout: type: string - tty: - type: boolean volumeDevices: items: properties: @@ -1982,6 +1555,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -1993,6 +1567,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -2002,6 +1578,23 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic + when: + items: + properties: + cel: + type: string + input: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + type: array workingDir: type: string workspaces: @@ -2016,10 +1609,12 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic required: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -2046,10 +1641,12 @@ spec: diskURI: type: string fsType: + default: ext4 type: string kind: type: string readOnly: + default: false type: boolean required: - diskName @@ -2073,6 +1670,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -2082,8 +1680,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic user: type: string required: @@ -2098,8 +1698,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic volumeID: type: string required: @@ -2125,11 +1727,14 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic csi: properties: driver: @@ -2139,8 +1744,10 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic readOnly: type: boolean volumeAttributes: @@ -2167,6 +1774,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -2187,10 +1795,12 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -2215,6 +1825,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -2227,6 +1838,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: properties: apiGroup: @@ -2235,6 +1847,8 @@ spec: type: string name: type: string + namespace: + type: string required: - kind - name @@ -2271,18 +1885,23 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -2305,10 +1924,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -2325,8 +1946,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic required: - driver type: object @@ -2383,6 +2006,13 @@ spec: required: - path type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object iscsi: properties: chapAuthDiscovery: @@ -2396,6 +2026,7 @@ spec: iqn: type: string iscsiInterface: + default: default type: string lun: format: int32 @@ -2404,13 +2035,16 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic targetPortal: type: string required: @@ -2469,6 +2103,45 @@ spec: sources: items: properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object configMap: properties: items: @@ -2486,11 +2159,14 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic downwardAPI: properties: items: @@ -2505,6 +2181,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -2525,10 +2202,12 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -2547,11 +2226,14 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic serviceAccountToken: properties: audience: @@ -2566,6 +2248,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -2592,21 +2275,27 @@ spec: image: type: string keyring: + default: /etc/ceph/keyring type: string monitors: items: type: string type: array + x-kubernetes-list-type: atomic pool: + default: rbd type: string readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic user: + default: admin type: string required: - image @@ -2615,6 +2304,7 @@ spec: scaleIO: properties: fsType: + default: xfs type: string gateway: type: string @@ -2625,11 +2315,14 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic sslEnabled: type: boolean storageMode: + default: ThinProvisioned type: string storagePool: type: string @@ -2662,6 +2355,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -2676,8 +2370,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic volumeName: type: string volumeNamespace: @@ -2700,6 +2396,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic workspaces: items: properties: @@ -2717,12 +2414,15 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object timeout: type: string when: items: properties: + cel: + type: string input: type: string operator: @@ -2731,10 +2431,7 @@ spec: items: type: string type: array - required: - - input - - operator - - values + x-kubernetes-list-type: atomic type: object type: array workspaces: @@ -2748,40 +2445,38 @@ spec: type: string required: - name - - workspace type: object type: array + x-kubernetes-list-type: atomic type: object type: array + x-kubernetes-list-type: atomic params: items: properties: default: - type: Any + type: object description: type: string + enum: + items: + type: string + type: array name: type: string + properties: + additionalProperties: + properties: + type: + type: string + type: object + type: object type: type: string required: - name type: object type: array - resources: - items: - properties: - name: - type: string - optional: - type: boolean - type: - type: string - required: - - name - - type - type: object - type: array results: items: properties: @@ -2789,114 +2484,124 @@ spec: type: string name: type: string - value: + type: type: string + value: + type: object required: - name - value type: object type: array + x-kubernetes-list-type: atomic tasks: items: properties: - conditions: - items: - properties: - conditionRef: - type: string - params: - items: - properties: - name: - type: string - value: - type: Any - required: - - name - - value - type: object - type: array - resources: - items: - properties: - from: - items: - type: string - type: array - name: - type: string - resource: - type: string - required: - - name - - resource - type: object - type: array - required: - - conditionRef - type: object - type: array + description: + type: string + displayName: + type: string + matrix: + properties: + include: + items: + properties: + name: + type: string + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + type: object + type: array + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + type: object name: type: string + onError: + type: string params: items: properties: name: type: string value: - type: Any + type: object required: - name - value type: object type: array - resources: + pipelineRef: properties: - inputs: - items: - properties: - from: - items: - type: string - type: array - name: - type: string - resource: - type: string - required: - - name - - resource - type: object - type: array - outputs: + apiVersion: + type: string + name: + type: string + params: items: properties: name: type: string - resource: - type: string + value: + type: object required: - name - - resource + - value type: object type: array + resolver: + type: string type: object + pipelineSpec: {} retries: type: integer runAfter: items: type: string type: array + x-kubernetes-list-type: atomic taskRef: properties: apiVersion: type: string - bundle: - type: string kind: type: string name: type: string + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + resolver: + type: string type: object taskSpec: properties: @@ -2904,6 +2609,8 @@ spec: type: string description: type: string + displayName: + type: string kind: type: string metadata: @@ -2921,56 +2628,28 @@ spec: items: properties: default: - type: Any + type: object description: type: string + enum: + items: + type: string + type: array name: type: string + properties: + additionalProperties: + properties: + type: + type: string + type: object + type: object type: type: string required: - name type: object type: array - resources: - properties: - inputs: - items: - properties: - description: - type: string - name: - type: string - optional: - type: boolean - targetPath: - type: string - type: - type: string - required: - - name - - type - type: object - type: array - outputs: - items: - properties: - description: - type: string - name: - type: string - optional: - type: boolean - targetPath: - type: string - type: - type: string - required: - - name - - type - type: object - type: array - type: object results: items: properties: @@ -2978,10 +2657,22 @@ spec: type: string name: type: string + properties: + additionalProperties: + properties: + type: + type: string + type: object + type: object + type: + type: string + value: + type: object required: - name type: object type: array + x-kubernetes-list-type: atomic sidecars: items: properties: @@ -2989,30 +2680,67 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: + x-kubernetes-list-type: atomic + computeResources: + properties: + claims: + items: properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3022,6 +2750,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3037,43 +2766,52 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name type: object type: array + x-kubernetes-list-type: atomic envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -3088,6 +2826,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -3105,6 +2844,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3117,6 +2857,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -3138,6 +2886,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -3155,6 +2904,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3167,6 +2917,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -3189,10 +2947,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -3209,6 +2979,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3265,6 +3036,7 @@ spec: name: type: string protocol: + default: TCP type: string required: - containerPort @@ -3282,10 +3054,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -3302,6 +3086,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3342,41 +3127,35 @@ spec: format: int32 type: integer type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object + restartPolicy: + type: string script: type: string securityContext: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -3432,10 +3211,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -3452,6 +3243,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3514,6 +3306,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -3525,6 +3318,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -3534,6 +3329,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic workingDir: type: string workspaces: @@ -3548,22 +3344,60 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic required: - name type: object type: array + x-kubernetes-list-type: atomic spec: type: object + x-kubernetes-preserve-unknown-fields: true stepTemplate: properties: args: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic + computeResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object env: items: properties: @@ -3578,12 +3412,14 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3593,6 +3429,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3608,378 +3445,115 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name type: object type: array + x-kubernetes-list-type: atomic envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: type: string - lifecycle: + securityContext: properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object + localhostProfile: + type: string + type: + type: string + required: + - type type: object - type: object - livenessProbe: - properties: - exec: + capabilities: properties: - command: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object - failureThreshold: - format: int32 + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 type: integer - httpGet: + seLinuxOptions: properties: - host: + level: type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: + role: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: + type: + type: string + user: type: string - required: - - port type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: + seccompProfile: properties: - host: + localhostProfile: + type: string + type: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type + - type type: object windowsOptions: properties: @@ -3993,84 +3567,6 @@ spec: type: string type: object type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean volumeDevices: items: properties: @@ -4083,6 +3579,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic volumeMounts: items: properties: @@ -4094,6 +3591,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -4103,10 +3602,9 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic workingDir: type: string - required: - - name type: object steps: items: @@ -4115,10 +3613,45 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic + computeResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object env: items: properties: @@ -4133,12 +3666,14 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4148,6 +3683,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4163,505 +3699,248 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name type: object type: array + x-kubernetes-list-type: atomic envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: type: string - lifecycle: + name: + type: string + onError: + type: string + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + ref: properties: - postStart: + name: + type: string + params: + items: + properties: + name: + type: string + value: + type: object + required: + - name + - value + type: object + type: array + resolver: + type: string + type: object + results: + items: + properties: + description: + type: string + name: + type: string properties: - exec: + additionalProperties: properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: + type: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port type: object - type: object - preStop: + type: object + type: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + script: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object + localhostProfile: + type: string + type: + type: string + required: + - type type: object - type: object - livenessProbe: - properties: - exec: + capabilities: properties: - command: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object - failureThreshold: - format: int32 + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 type: integer - httpGet: + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - host: + level: type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: + role: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: + type: + type: string + user: type: string - required: - - port type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: + seccompProfile: properties: - host: + localhostProfile: + type: string + type: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true required: - - port + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer type: object - name: - type: string - onError: + stderrConfig: + properties: + path: + type: string + type: object + stdoutConfig: + properties: + path: + type: string + type: object + timeout: type: string - ports: + volumeDevices: items: properties: - containerPort: - format: int32 - type: integer - hostIP: + devicePath: type: string - hostPort: - format: int32 - type: integer name: type: string - protocol: + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: type: string required: - - containerPort + - mountPath + - name type: object type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - script: - type: string - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - timeout: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: + x-kubernetes-list-type: atomic + when: items: properties: - mountPath: - type: string - mountPropagation: + cel: type: string - name: - type: string - readOnly: - type: boolean - subPath: + input: type: string - subPathExpr: + operator: type: string - required: - - mountPath - - name + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic type: object type: array workingDir: @@ -4678,10 +3957,12 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic required: - name type: object type: array + x-kubernetes-list-type: atomic volumes: items: properties: @@ -4708,10 +3989,12 @@ spec: diskURI: type: string fsType: + default: ext4 type: string kind: type: string readOnly: + default: false type: boolean required: - diskName @@ -4735,6 +4018,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -4744,8 +4028,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic user: type: string required: @@ -4760,8 +4046,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic volumeID: type: string required: @@ -4787,11 +4075,14 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic csi: properties: driver: @@ -4801,8 +4092,10 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic readOnly: type: boolean volumeAttributes: @@ -4829,6 +4122,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -4849,10 +4143,12 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -4877,6 +4173,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -4889,6 +4186,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: properties: apiGroup: @@ -4897,6 +4195,8 @@ spec: type: string name: type: string + namespace: + type: string required: - kind - name @@ -4933,18 +4233,23 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -4967,10 +4272,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -4987,8 +4294,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic required: - driver type: object @@ -5045,7 +4354,14 @@ spec: required: - path type: object - iscsi: + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object + iscsi: properties: chapAuthDiscovery: type: boolean @@ -5058,6 +4374,7 @@ spec: iqn: type: string iscsiInterface: + default: default type: string lun: format: int32 @@ -5066,13 +4383,16 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic targetPortal: type: string required: @@ -5131,6 +4451,45 @@ spec: sources: items: properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object configMap: properties: items: @@ -5148,11 +4507,14 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic downwardAPI: properties: items: @@ -5167,6 +4529,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -5187,10 +4550,12 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -5209,11 +4574,14 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic serviceAccountToken: properties: audience: @@ -5228,6 +4596,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -5254,21 +4623,27 @@ spec: image: type: string keyring: + default: /etc/ceph/keyring type: string monitors: items: type: string type: array + x-kubernetes-list-type: atomic pool: + default: rbd type: string readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic user: + default: admin type: string required: - image @@ -5277,6 +4652,7 @@ spec: scaleIO: properties: fsType: + default: xfs type: string gateway: type: string @@ -5287,11 +4663,14 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic sslEnabled: type: boolean storageMode: + default: ThinProvisioned type: string storagePool: type: string @@ -5324,6 +4703,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -5338,8 +4718,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic volumeName: type: string volumeNamespace: @@ -5362,6 +4744,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic workspaces: items: properties: @@ -5379,12 +4762,15 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object timeout: type: string when: items: properties: + cel: + type: string input: type: string operator: @@ -5393,10 +4779,7 @@ spec: items: type: string type: array - required: - - input - - operator - - values + x-kubernetes-list-type: atomic type: object type: array workspaces: @@ -5410,11 +4793,12 @@ spec: type: string required: - name - - workspace type: object type: array + x-kubernetes-list-type: atomic type: object type: array + x-kubernetes-list-type: atomic workspaces: items: properties: @@ -5428,1827 +4812,1503 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object - podTemplate: - properties: - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + status: + type: string + taskRunSpecs: + items: + properties: + computeResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + pipelineTaskName: + type: string + podTemplate: + properties: + affinity: + properties: + nodeAffinity: properties: - preference: - properties: - matchExpressions: - items: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: properties: - key: - type: string - operator: - type: string - values: + matchExpressions: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: + x-kubernetes-list-type: atomic + matchFields: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator + x-kubernetes-list-type: atomic type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: properties: - matchExpressions: + nodeSelectorTerms: items: properties: - key: - type: string - operator: - type: string - values: + matchExpressions: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: + x-kubernetes-list-type: atomic + matchFields: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator + x-kubernetes-list-type: atomic type: object + x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + x-kubernetes-map-type: atomic + type: object + podAffinity: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: properties: - key: - type: string - operator: - type: string - values: + matchExpressions: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: properties: - key: - type: string - operator: - type: string - values: + matchExpressions: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: + x-kubernetes-map-type: atomic + namespaces: items: type: string type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string required: - - key - - operator + - topologyKey type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: properties: - key: - type: string - operator: - type: string - values: + matchExpressions: items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object - type: array - matchLabels: - additionalProperties: + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: type: string - type: object - type: object - namespaces: - items: - type: string + required: + - topologyKey + type: object type: array - topologyKey: - type: string - required: - - topologyKey + x-kubernetes-list-type: atomic type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + podAntiAffinity: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: properties: - key: - type: string - operator: - type: string - values: + matchExpressions: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: properties: - key: - type: string - operator: - type: string - values: + matchExpressions: items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: items: type: string type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string required: - - key - - operator + - topologyKey type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: properties: - key: - type: string - operator: - type: string - values: + matchExpressions: items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object - type: array - matchLabels: - additionalProperties: + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: type: string - type: object - type: object - namespaces: - items: - type: string + required: + - topologyKey + type: object type: array - topologyKey: - type: string - required: - - topologyKey + x-kubernetes-list-type: atomic type: object - type: array - type: object - type: object - automountServiceAccountToken: - type: boolean - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: + type: object + automountServiceAccountToken: + type: boolean + dnsConfig: properties: - name: - type: string - value: - type: string + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic type: object - type: array - searches: - items: + dnsPolicy: type: string - type: array - type: object - dnsPolicy: - type: string - enableServiceLinks: - type: boolean - hostAliases: - items: - properties: - hostnames: + enableServiceLinks: + type: boolean + env: items: - type: string + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object type: array - ip: - type: string - type: object - type: array - hostNetwork: - type: boolean - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - nodeSelector: - additionalProperties: - type: string - type: object - priorityClassName: - type: string - runtimeClassName: - type: string - schedulerName: - type: string - securityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: + x-kubernetes-list-type: atomic + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + x-kubernetes-list-type: atomic + hostNetwork: + type: boolean + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + nodeSelector: + additionalProperties: type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - tolerations: - items: - properties: - effect: - type: string - key: + priorityClassName: type: string - operator: + runtimeClassName: type: string - tolerationSeconds: - format: int64 - type: integer - value: + schedulerName: type: string - type: object - type: array - volumes: - items: - properties: - awsElasticBlockStore: + securityContext: properties: - fsType: - type: string - partition: - format: int32 + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: + fsGroupChangePolicy: type: string - readOnly: + runAsGroup: + format: int64 + type: integer + runAsNonRoot: type: boolean - secretFile: - type: string - secretRef: + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - name: + level: + type: string + role: + type: string + type: + type: string + user: type: string type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: + seccompProfile: properties: - name: + localhostProfile: type: string + type: + type: string + required: + - type type: object - volumeID: + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: + sysctls: items: properties: - key: + name: type: string - mode: - format: int32 - type: integer - path: + value: type: string required: - - key - - path + - name + - value type: object type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: + x-kubernetes-list-type: atomic + windowsOptions: properties: - name: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: type: string type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + topologySpreadConstraints: + items: + properties: + labelSelector: properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string type: object - required: - - path type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + default: ext4 + type: string + kind: + type: string + readOnly: + default: false + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: properties: - apiGroup: - type: string - kind: + key: type: string - name: + mode: + format: int32 + type: integer + path: type: string required: - - kind - - name + - key + - path type: object - resources: + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource type: object + x-kubernetes-map-type: atomic + required: + - path type: object - selector: - properties: - matchExpressions: - items: + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: properties: - key: + apiGroup: type: string - operator: + kind: + type: string + name: type: string - values: - items: - type: string - type: array required: - - key - - operator + - kind + - name type: object - type: array - matchLabels: - additionalProperties: + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: type: string - type: object - type: object - storageClassName: - type: string - volumeMode: + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: type: string - volumeName: + type: array + x-kubernetes-list-type: atomic + wwids: + items: type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: properties: - configMap: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array name: + default: "" type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path type: object + x-kubernetes-map-type: atomic + required: + - driver type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: + flocker: properties: - key: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: type: string - mode: + partition: format: int32 type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string path: type: string + readOnly: + type: boolean required: - - key + - endpoints - path type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - resources: - items: - properties: - name: - type: string - resourceRef: - properties: - apiVersion: - type: string - name: - type: string - type: object - resourceSpec: - properties: - description: - type: string - params: - items: - properties: + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + default: default + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object name: type: string - value: - type: string - required: - - name - - value - type: object - type: array - secrets: - items: - properties: - fieldName: - type: string - secretKey: - type: string - secretName: - type: string - required: - - fieldName - - secretKey - - secretName - type: object - type: array - type: - type: string - required: - - params - - type - type: object - type: object - type: array - serviceAccountName: - type: string - serviceAccountNames: - items: - properties: - serviceAccountName: - type: string - taskName: - type: string - type: object - type: array - status: - type: string - taskRunSpecs: - items: - properties: - pipelineTaskName: - type: string - taskPodTemplate: - properties: - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: properties: - key: - type: string - operator: - type: string - values: + matchExpressions: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - type: array - required: - - key - - operator + type: object type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: items: - properties: - key: - type: string - operator: - type: string - values: - items: + items: + properties: + key: type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: + mode: + format: int32 + type: integer + path: type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string + required: + - key + - path type: object - type: object - namespaces: - items: + type: array + x-kubernetes-list-type: atomic + name: + default: "" type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: + resourceFieldRef: + properties: + containerName: type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: + type: array + x-kubernetes-list-type: atomic + type: object + secret: + properties: items: - properties: - key: - type: string - operator: - type: string - values: - items: + items: + properties: + key: type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: + mode: + format: int32 + type: integer + path: type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - automountServiceAccountToken: - type: boolean - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: properties: - name: + group: type: string - value: + readOnly: + type: boolean + registry: type: string - type: object - type: array - searches: - items: - type: string - type: array - type: object - dnsPolicy: - type: string - enableServiceLinks: - type: boolean - hostAliases: - items: - properties: - hostnames: - items: - type: string - type: array - ip: - type: string - type: object - type: array - hostNetwork: - type: boolean - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - nodeSelector: - additionalProperties: - type: string - type: object - priorityClassName: - type: string - runtimeClassName: - type: string - schedulerName: - type: string - securityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: + tenant: type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - volumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: + user: type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: + volume: type: string required: - - volumeID + - registry + - volume type: object - azureDisk: + rbd: properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string fsType: type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: + image: type: string - shareName: + keyring: + default: /etc/ceph/keyring type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: monitors: items: type: string type: array - path: + x-kubernetes-list-type: atomic + pool: + default: rbd type: string readOnly: type: boolean - secretFile: - type: string secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic user: + default: admin type: string required: + - image - monitors type: object - cinder: + scaleIO: properties: fsType: + default: xfs + type: string + gateway: + type: string + protectionDomain: type: string readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object - volumeID: + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + default: ThinProvisioned + type: string + storagePool: + type: string + system: + type: string + volumeName: type: string required: - - volumeID + - gateway + - secretRef + - system type: object - configMap: + secret: properties: defaultMode: format: int32 @@ -7268,588 +6328,1653 @@ spec: - path type: object type: array - name: - type: string + x-kubernetes-list-type: atomic optional: type: boolean + secretName: + type: string type: object - csi: + storageos: properties: - driver: - type: string fsType: type: string - nodePublishSecretRef: + readOnly: + type: boolean + secretRef: properties: name: + default: "" type: string type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string type: object - downwardAPI: + vsphereVolume: properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: + fsType: type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + serviceAccountName: + type: string + sidecarSpecs: + items: + properties: + computeResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + name: + type: string + required: + - computeResources + - name + type: object + type: array + x-kubernetes-list-type: atomic + stepSpecs: + items: + properties: + computeResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + name: + type: string + required: + - computeResources + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + taskRunTemplate: + properties: + podTemplate: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: properties: - apiGroup: - type: string - kind: + key: type: string - name: + operator: type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - - kind - - name + - key + - operator type: object - dataSourceRef: + type: array + x-kubernetes-list-type: atomic + matchFields: + items: properties: - apiGroup: - type: string - kind: + key: type: string - name: + operator: type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - - kind - - name + - key + - operator type: object - resources: + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator type: object - selector: + type: array + x-kubernetes-list-type: atomic + matchFields: + items: properties: - matchExpressions: + key: + type: string + operator: + type: string + values: items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: type: string - type: object + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: properties: - configMap: + labelSelector: properties: - items: + matchExpressions: items: properties: key: type: string - mode: - format: int32 - type: integer - path: + operator: type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path + - operator type: object type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object - secret: + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: properties: - items: + matchExpressions: items: properties: key: type: string - mode: - format: int32 - type: integer - path: + operator: type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - key - - path + - operator type: object type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + automountServiceAccountToken: + type: boolean + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + x-kubernetes-list-type: atomic + hostNetwork: + type: boolean + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + nodeSelector: + additionalProperties: + type: string + type: object + priorityClassName: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - keyring: + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + default: ext4 + type: string + kind: + type: string + readOnly: + default: false + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: type: string - monitors: - items: + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" type: string - type: array - pool: + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: type: string - readOnly: - type: boolean - secretRef: + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: properties: - name: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path type: object - user: + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: + type: array + x-kubernetes-list-type: atomic + wwids: + items: type: string - gateway: + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: type: string - protectionDomain: + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + default: default + type: string + lun: + format: int32 + type: integer + portals: + items: type: string - readOnly: - type: boolean - secretRef: + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: properties: - name: - type: string + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + default: /etc/ceph/keyring + type: string + monitors: items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: type: string - readOnly: - type: boolean - secretRef: + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + default: admin + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + default: xfs + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + default: ThinProvisioned + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: properties: - name: + key: + type: string + mode: + format: int32 + type: integer + path: type: string + required: + - key + - path type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - taskServiceAccountName: - type: string - type: object - type: array - timeout: - type: string + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + serviceAccountName: + type: string + type: object timeouts: properties: finally: @@ -7882,11 +8007,36 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object emptyDir: properties: medium: @@ -7909,6 +8059,161 @@ spec: required: - claimName type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object secret: properties: defaultMode: @@ -7929,6 +8234,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -7950,6 +8256,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -7962,6 +8269,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: properties: apiGroup: @@ -7970,6 +8278,8 @@ spec: type: string name: type: string + namespace: + type: string required: - kind - name @@ -8006,18 +8316,23 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -8029,6 +8344,20 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object capacity: additionalProperties: anyOf: @@ -8059,6 +8388,20 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object phase: type: string type: object @@ -8067,6 +8410,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object pod_spec: properties: @@ -8093,11 +8437,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -8109,12 +8455,15 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object + x-kubernetes-map-type: atomic weight: format: int32 type: integer @@ -8123,6 +8472,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -8139,11 +8489,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -8155,16 +8507,21 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object + x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object + x-kubernetes-map-type: atomic type: object podAffinity: properties: @@ -8186,16 +8543,29 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -8209,20 +8579,24 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -8236,6 +8610,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -8252,16 +8627,29 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -8275,26 +8663,31 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -8316,16 +8709,29 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -8339,20 +8745,24 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -8366,6 +8776,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -8382,16 +8793,29 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -8405,26 +8829,31 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic namespaces: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object automountServiceAccountToken: @@ -8436,10 +8865,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -8454,12 +8885,14 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8469,6 +8902,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8484,43 +8918,54 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -8535,6 +8980,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -8552,6 +8998,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8564,6 +9011,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -8585,6 +9040,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -8602,6 +9058,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8614,6 +9071,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -8636,10 +9101,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -8656,6 +9133,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8712,6 +9190,7 @@ spec: name: type: string protocol: + default: TCP type: string required: - containerPort @@ -8729,10 +9208,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -8749,6 +9240,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8789,8 +9281,35 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -8808,20 +9327,33 @@ spec: x-kubernetes-int-or-string: true type: object type: object + restartPolicy: + type: string securityContext: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -8877,10 +9409,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -8897,6 +9441,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8959,6 +9504,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -8970,6 +9518,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -8979,18 +9529,25 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map dnsConfig: properties: nameservers: items: type: string type: array + x-kubernetes-list-type: atomic options: items: properties: @@ -9000,10 +9557,12 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic searches: items: type: string type: array + x-kubernetes-list-type: atomic type: object dnsPolicy: type: string @@ -9016,10 +9575,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -9034,12 +9595,14 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -9049,6 +9612,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -9064,43 +9628,54 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -9115,6 +9690,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -9132,6 +9708,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9144,6 +9721,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -9165,6 +9750,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -9182,6 +9768,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9194,6 +9781,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -9216,10 +9811,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -9236,6 +9843,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9292,11 +9900,16 @@ spec: name: type: string protocol: + default: TCP type: string required: - containerPort type: object type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map readinessProbe: properties: exec: @@ -9305,10 +9918,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -9325,6 +9950,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9365,8 +9991,35 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -9384,20 +10037,33 @@ spec: x-kubernetes-int-or-string: true type: object type: object + restartPolicy: + type: string securityContext: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -9453,10 +10119,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -9473,6 +10151,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9537,6 +10216,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -9548,6 +10230,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -9557,12 +10241,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map hostAliases: items: properties: @@ -9570,25 +10260,38 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic ip: type: string + required: + - ip type: object type: array + x-kubernetes-list-map-keys: + - ip + x-kubernetes-list-type: map hostIPC: type: boolean hostNetwork: type: boolean hostPID: type: boolean + hostUsers: + type: boolean hostname: type: string imagePullSecrets: items: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map initContainers: items: properties: @@ -9596,10 +10299,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -9614,12 +10319,14 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -9629,6 +10336,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -9644,43 +10352,54 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: type: string name: + default: "" type: string optional: type: boolean required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic prefix: type: string secretRef: properties: name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -9695,6 +10414,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -9712,6 +10432,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9724,6 +10445,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -9745,6 +10474,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -9762,6 +10492,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9774,6 +10505,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -9796,10 +10535,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -9816,6 +10567,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9872,6 +10624,7 @@ spec: name: type: string protocol: + default: TCP type: string required: - containerPort @@ -9889,10 +10642,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -9909,6 +10674,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9949,8 +10715,35 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -9968,20 +10761,33 @@ spec: x-kubernetes-int-or-string: true type: object type: object + restartPolicy: + type: string securityContext: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -10037,10 +10843,22 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object httpGet: properties: host: @@ -10057,6 +10875,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -10119,6 +10938,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -10130,6 +10952,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -10139,12 +10963,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map nodeName: type: string nodeSelector: @@ -10152,6 +10982,13 @@ spec: type: string type: object x-kubernetes-map-type: atomic + os: + properties: + name: + type: string + required: + - name + type: object overhead: additionalProperties: anyOf: @@ -10176,14 +11013,52 @@ spec: - conditionType type: object type: array + x-kubernetes-list-type: atomic + resourceClaims: + items: + properties: + name: + type: string + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map restartPolicy: type: string runtimeClassName: type: string schedulerName: type: string + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map securityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -10222,6 +11097,9 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string sysctls: items: properties: @@ -10234,6 +11112,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -10275,6 +11154,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic topologySpreadConstraints: items: properties: @@ -10291,19 +11171,34 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic maxSkew: format: int32 type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string topologyKey: type: string whenUnsatisfiable: @@ -10344,10 +11239,12 @@ spec: diskURI: type: string fsType: + default: ext4 type: string kind: type: string readOnly: + default: false type: boolean required: - diskName @@ -10371,6 +11268,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -10380,8 +11278,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic user: type: string required: @@ -10396,8 +11296,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic volumeID: type: string required: @@ -10423,11 +11325,14 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic csi: properties: driver: @@ -10437,8 +11342,10 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic readOnly: type: boolean volumeAttributes: @@ -10465,6 +11372,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -10485,10 +11393,12 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -10513,6 +11423,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -10525,6 +11436,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: properties: apiGroup: @@ -10533,6 +11445,8 @@ spec: type: string name: type: string + namespace: + type: string required: - kind - name @@ -10569,18 +11483,23 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string type: object type: object + x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -10603,10 +11522,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -10623,8 +11544,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic required: - driver type: object @@ -10681,6 +11604,13 @@ spec: required: - path type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object iscsi: properties: chapAuthDiscovery: @@ -10694,6 +11624,7 @@ spec: iqn: type: string iscsiInterface: + default: default type: string lun: format: int32 @@ -10702,13 +11633,16 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic targetPortal: type: string required: @@ -10767,6 +11701,45 @@ spec: sources: items: properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object configMap: properties: items: @@ -10784,11 +11757,14 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic downwardAPI: properties: items: @@ -10803,6 +11779,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: format: int32 type: integer @@ -10823,10 +11800,12 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -10845,11 +11824,14 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean type: object + x-kubernetes-map-type: atomic serviceAccountToken: properties: audience: @@ -10864,6 +11846,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -10890,21 +11873,27 @@ spec: image: type: string keyring: + default: /etc/ceph/keyring type: string monitors: items: type: string type: array + x-kubernetes-list-type: atomic pool: + default: rbd type: string readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic user: + default: admin type: string required: - image @@ -10913,6 +11902,7 @@ spec: scaleIO: properties: fsType: + default: xfs type: string gateway: type: string @@ -10923,11 +11913,14 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic sslEnabled: type: boolean storageMode: + default: ThinProvisioned type: string storagePool: type: string @@ -10960,6 +11953,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -10974,8 +11968,10 @@ spec: secretRef: properties: name: + default: "" type: string type: object + x-kubernetes-map-type: atomic volumeName: type: string volumeNamespace: @@ -10998,6 +11994,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map required: - containers type: object @@ -11143,7 +12142,6 @@ spec: type: array required: - name - - steps type: object activityName: type: string @@ -11169,9 +12167,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] From 0ea08c72baf8151bdbf6fb2006d1f8dd0d23baa4 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 5 Dec 2024 11:58:26 +0100 Subject: [PATCH 05/23] chore: manually edit zz_generated because controller-gen fails --- pkg/apis/lighthouse/v1alpha1/zz_generated.deepcopy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/apis/lighthouse/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/lighthouse/v1alpha1/zz_generated.deepcopy.go index 570a5a998..c34470509 100644 --- a/pkg/apis/lighthouse/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/lighthouse/v1alpha1/zz_generated.deepcopy.go @@ -7,7 +7,7 @@ package v1alpha1 import ( job "github.com/jenkins-x/lighthouse/pkg/config/job" - v1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -353,7 +353,7 @@ func (in *LighthouseJobSpec) DeepCopyInto(out *LighthouseJobSpec) { } if in.PipelineRunSpec != nil { in, out := &in.PipelineRunSpec, &out.PipelineRunSpec - *out = new(v1beta1.PipelineRunSpec) + *out = new(pipelinev1.PipelineRunSpec) (*in).DeepCopyInto(*out) } if in.PipelineRunParams != nil { From 4e1c73065bec9f2fc95e12c477f0078901d8c1c4 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 5 Dec 2024 12:36:20 +0100 Subject: [PATCH 06/23] chore: use Timeouts.Pipeline instead of Timeout --- pkg/engines/tekton/utils.go | 7 +++++-- pkg/triggerconfig/inrepo/load_pipelinerun.go | 17 +++++++++++------ pkg/triggerconfig/inrepo/overrides.go | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/pkg/engines/tekton/utils.go b/pkg/engines/tekton/utils.go index f77499ec7..5ac001d0e 100644 --- a/pkg/engines/tekton/utils.go +++ b/pkg/engines/tekton/utils.go @@ -68,8 +68,11 @@ func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace s Spec: *specCopy, } // Set a default timeout of 1 day if no timeout is specified - if p.Spec.Timeout == nil { - p.Spec.Timeout = &metav1.Duration{Duration: 24 * time.Hour} + if p.Spec.Timeouts == nil { + p.Spec.Timeouts = &pipelinev1.TimeoutFields{} + } + if p.Spec.Timeouts.Pipeline == nil { + p.Spec.Timeouts.Pipeline = &metav1.Duration{Duration: 24 * time.Hour} } // Add parameters instead of env vars. diff --git a/pkg/triggerconfig/inrepo/load_pipelinerun.go b/pkg/triggerconfig/inrepo/load_pipelinerun.go index 5d9453617..fc40e13cf 100644 --- a/pkg/triggerconfig/inrepo/load_pipelinerun.go +++ b/pkg/triggerconfig/inrepo/load_pipelinerun.go @@ -520,9 +520,9 @@ func ConvertTaskRunToPipelineRun(from *pipelinev1.TaskRun, message string, defau Finally: nil, } prs.Spec.PipelineSpec = pipelineSpec - prs.Spec.PodTemplate = fs.PodTemplate + prs.Spec.TaskRunTemplate.PodTemplate = fs.PodTemplate //prs.Spec.Resources = fs.Resources - prs.Spec.ServiceAccountName = fs.ServiceAccountName + prs.Spec.TaskRunTemplate.ServiceAccountName = fs.ServiceAccountName prs.Spec.Workspaces = fs.Workspaces defaultValues.Apply(prs) return prs, nil @@ -530,11 +530,16 @@ func ConvertTaskRunToPipelineRun(from *pipelinev1.TaskRun, message string, defau // Apply adds any default values that are empty in the generated PipelineRun func (v *DefaultValues) Apply(prs *pipelinev1.PipelineRun) { - if prs.Spec.ServiceAccountName == "" && v.ServiceAccountName != "" { - prs.Spec.ServiceAccountName = v.ServiceAccountName + if prs.Spec.TaskRunTemplate.ServiceAccountName == "" && v.ServiceAccountName != "" { + prs.Spec.TaskRunTemplate.ServiceAccountName = v.ServiceAccountName } - if prs.Spec.Timeout == nil && v.Timeout != nil { - prs.Spec.Timeout = v.Timeout + if prs.Spec.Timeouts == nil { + prs.Spec.Timeouts = &pipelinev1.TimeoutFields{} + } + + if prs.Spec.Timeouts.Pipeline == nil { + // Set a default timeout of 1 day if no timeout is specified + prs.Spec.Timeouts.Pipeline = &metav1.Duration{Duration: 24 * time.Hour} } } diff --git a/pkg/triggerconfig/inrepo/overrides.go b/pkg/triggerconfig/inrepo/overrides.go index 0a9a418df..0e83bda57 100644 --- a/pkg/triggerconfig/inrepo/overrides.go +++ b/pkg/triggerconfig/inrepo/overrides.go @@ -44,7 +44,7 @@ func OverrideTemplateWithTemplate(c *pipelinev1.StepTemplate, override *pipeline if string(override.ImagePullPolicy) != "" && (modify || string(c.ImagePullPolicy) == "") { c.ImagePullPolicy = override.ImagePullPolicy } - c.Resources = OverrideResources(c.Resources, override.Resources, modify) + c.ComputeResources = OverrideResources(c.ComputeResources, override.ComputeResources, modify) if c.SecurityContext == nil { c.SecurityContext = override.SecurityContext } @@ -61,7 +61,7 @@ func OverrideStepWithStep(c *pipelinev1.Step, override *pipelinev1.Step, modify if string(override.ImagePullPolicy) != "" && (modify || string(c.ImagePullPolicy) == "") { c.ImagePullPolicy = override.ImagePullPolicy } - c.Resources = OverrideResources(c.Resources, override.Resources, modify) + c.ComputeResources = OverrideResources(c.ComputeResources, override.ComputeResources, modify) if c.SecurityContext == nil { c.SecurityContext = override.SecurityContext } From 60f9ed61d5c5a74772ca347995e8a7512f2fa06c Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 5 Dec 2024 12:44:44 +0100 Subject: [PATCH 07/23] chore: replace ArrayOrString with ParamValue --- pkg/engines/tekton/utils.go | 2 +- pkg/triggerconfig/inrepo/default_parameters.go | 6 +++--- pkg/triggerconfig/inrepo/load_pipelinerun.go | 2 +- pkg/triggerconfig/inrepo/params.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/engines/tekton/utils.go b/pkg/engines/tekton/utils.go index 5ac001d0e..26ed401c8 100644 --- a/pkg/engines/tekton/utils.go +++ b/pkg/engines/tekton/utils.go @@ -129,7 +129,7 @@ func makePipelineRun(ctx context.Context, lj v1alpha1.LighthouseJob, namespace s } } for _, key := range sets.StringKeySet(env).List() { - val := pipelinev1.ArrayOrString{ + val := pipelinev1.ParamValue{ Type: pipelinev1.ParamTypeString, StringVal: env[key], } diff --git a/pkg/triggerconfig/inrepo/default_parameters.go b/pkg/triggerconfig/inrepo/default_parameters.go index 0e6776e32..4afa4d5d0 100644 --- a/pkg/triggerconfig/inrepo/default_parameters.go +++ b/pkg/triggerconfig/inrepo/default_parameters.go @@ -50,7 +50,7 @@ var ( Description: "git pull request number", Name: "PULL_NUMBER", Type: "string", - Default: &pipelinev1.ArrayOrString{ + Default: &pipelinev1.ParamValue{ Type: pipelinev1.ParamTypeString, StringVal: "", }, @@ -59,7 +59,7 @@ var ( Description: "git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'", Name: "PULL_PULL_REF", Type: "string", - Default: &pipelinev1.ArrayOrString{ + Default: &pipelinev1.ParamValue{ Type: pipelinev1.ParamTypeString, StringVal: "", }, @@ -68,7 +68,7 @@ var ( Description: "git revision to checkout (branch, tag, sha, ref…)", Name: "PULL_PULL_SHA", Type: "string", - Default: &pipelinev1.ArrayOrString{ + Default: &pipelinev1.ParamValue{ Type: pipelinev1.ParamTypeString, StringVal: "", }, diff --git a/pkg/triggerconfig/inrepo/load_pipelinerun.go b/pkg/triggerconfig/inrepo/load_pipelinerun.go index fc40e13cf..ed127bcad 100644 --- a/pkg/triggerconfig/inrepo/load_pipelinerun.go +++ b/pkg/triggerconfig/inrepo/load_pipelinerun.go @@ -549,7 +549,7 @@ func ToParams(params []pipelinev1.ParamSpec) []pipelinev1.Param { for _, p := range params { answer = append(answer, pipelinev1.Param{ Name: p.Name, - Value: pipelinev1.ArrayOrString{ + Value: pipelinev1.ParamValue{ Type: pipelinev1.ParamTypeString, StringVal: fmt.Sprintf("$(params.%s)", p.Name), }, diff --git a/pkg/triggerconfig/inrepo/params.go b/pkg/triggerconfig/inrepo/params.go index 76acb1c61..3bc0e3fc8 100644 --- a/pkg/triggerconfig/inrepo/params.go +++ b/pkg/triggerconfig/inrepo/params.go @@ -89,7 +89,7 @@ func UseParametersAndResults(ctx context.Context, loc *UseLocation, uses *pipeli func ToDefaultParams(params []pipelinev1.ParamSpec) []pipelinev1.Param { var answer []pipelinev1.Param for _, p := range params { - value := pipelinev1.ArrayOrString{ + value := pipelinev1.ParamValue{ Type: pipelinev1.ParamTypeString, } d := p.Default From be83c38a702d0b63aef1021cea9bfe81f09e1c6a Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 5 Dec 2024 13:27:03 +0100 Subject: [PATCH 08/23] chore: get taskruns from clients instead of pr.Status.TaskRuns --- pkg/engines/tekton/activity.go | 31 +++++++++++++++++++---------- pkg/engines/tekton/activity_test.go | 4 ++-- pkg/engines/tekton/controller.go | 6 +++++- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/pkg/engines/tekton/activity.go b/pkg/engines/tekton/activity.go index 26c8c247a..c3f71000a 100644 --- a/pkg/engines/tekton/activity.go +++ b/pkg/engines/tekton/activity.go @@ -1,23 +1,29 @@ package tekton import ( + "context" "strings" "knative.dev/pkg/apis" "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" + "github.com/jenkins-x/lighthouse/pkg/clients" "github.com/jenkins-x/lighthouse/pkg/config/job" "github.com/jenkins-x/lighthouse/pkg/util" pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/sets" ) // ConvertPipelineRun translates a PipelineRun into an ActivityRecord -func ConvertPipelineRun(pr *pipelinev1.PipelineRun) *v1alpha1.ActivityRecord { +func ConvertPipelineRun(pr *pipelinev1.PipelineRun) (*v1alpha1.ActivityRecord, error) { if pr == nil { - return nil + return nil, nil + } + + tektonclient, _, _, _, err := clients.GetAPIClients() + if err != nil { + return nil, err } record := new(v1alpha1.ActivityRecord) @@ -41,17 +47,20 @@ func ConvertPipelineRun(pr *pipelinev1.PipelineRun) *v1alpha1.ActivityRecord { record.Status = convertTektonStatus(cond, record.StartTime, record.CompletionTime) - for _, taskName := range sets.StringKeySet(pr.Status.TaskRuns).List() { - task := pr.Status.TaskRuns[taskName] - cleanedUpTaskName := strings.TrimPrefix(taskName[:len(taskName)-6], pr.Name+"-") + for _, childReference := range pr.Status.ChildReferences { + taskrun, err := tektonclient.TektonV1().TaskRuns("jx").Get(context.TODO(), childReference.Name, metav1.GetOptions{}) + if err != nil { + return nil, err + } + cleanedUpTaskName := strings.TrimPrefix(taskrun.Name[:len(taskrun.Name)-6], pr.Name+"-") t := &v1alpha1.ActivityStageOrStep{ Name: cleanedUpTaskName, - Status: convertTektonStatus(task.Status.GetCondition(apis.ConditionSucceeded), task.Status.StartTime, task.Status.CompletionTime), - StartTime: task.Status.StartTime, - CompletionTime: task.Status.CompletionTime, + Status: convertTektonStatus(taskrun.Status.GetCondition(apis.ConditionSucceeded), taskrun.Status.StartTime, taskrun.Status.CompletionTime), + StartTime: taskrun.Status.StartTime, + CompletionTime: taskrun.Status.CompletionTime, } - for _, step := range task.Status.Steps { + for _, step := range taskrun.Status.Steps { s := &v1alpha1.ActivityStageOrStep{ Name: step.Name, } @@ -80,7 +89,7 @@ func ConvertPipelineRun(pr *pipelinev1.PipelineRun) *v1alpha1.ActivityRecord { } // log URL is definitely gonna wait - return record + return record, nil } func convertTektonStatus(cond *apis.Condition, start, finished *metav1.Time) v1alpha1.PipelineState { diff --git a/pkg/engines/tekton/activity_test.go b/pkg/engines/tekton/activity_test.go index 00dc8ca75..c9e1ebb24 100644 --- a/pkg/engines/tekton/activity_test.go +++ b/pkg/engines/tekton/activity_test.go @@ -40,8 +40,8 @@ func TestConvertPipelineRun(t *testing.T) { testDir := filepath.Join("test_data", "activity", tc.name) pr := loadPipelineRun(t, testDir) - converted := tekton.ConvertPipelineRun(pr) - + converted, err := tekton.ConvertPipelineRun(pr) + assert.NoError(t, err) expected := loadRecord(t, testDir) if d := cmp.Diff(expected, converted); d != "" { diff --git a/pkg/engines/tekton/controller.go b/pkg/engines/tekton/controller.go index 6fd05c5c6..970b5e91e 100644 --- a/pkg/engines/tekton/controller.go +++ b/pkg/engines/tekton/controller.go @@ -179,7 +179,11 @@ func (r *LighthouseJobReconciler) Reconcile(ctx context.Context, req ctrl.Reques if r.dashboardURL != "" { job.Status.ReportURL = r.getPipelingetPipelineTargetURLeTargetURL(pipelineRun) } - job.Status.Activity = ConvertPipelineRun(&pipelineRun) + activity, err := ConvertPipelineRun(&pipelineRun) + if err != nil { + return errors.Wrapf(err, "failed to convert PipelineRun") + } + job.Status.Activity = activity if err := r.client.Status().Update(ctx, job); err != nil { return errors.Wrapf(err, "failed to update LighthouseJob status") } From 6f3ff55a6b0309ef3b49a6b092b070f85d804b3d Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 5 Dec 2024 13:36:28 +0100 Subject: [PATCH 09/23] chore: remove deprecated PipelineResources --- pkg/triggerconfig/inrepo/load_pipelinerun.go | 49 -------------------- 1 file changed, 49 deletions(-) diff --git a/pkg/triggerconfig/inrepo/load_pipelinerun.go b/pkg/triggerconfig/inrepo/load_pipelinerun.go index ed127bcad..05276c9cc 100644 --- a/pkg/triggerconfig/inrepo/load_pipelinerun.go +++ b/pkg/triggerconfig/inrepo/load_pipelinerun.go @@ -445,12 +445,10 @@ func ConvertTaskToPipelineRun(from *pipelinev1.Task, message string, defaultValu fs := &from.Spec pipelineSpec := &pipelinev1.PipelineSpec{ Description: "", - Resources: nil, Tasks: []pipelinev1.PipelineTask{ { Name: from.Name, TaskSpec: &pipelinev1.EmbeddedTask{TaskSpec: *fs}, - Resources: ToPipelineResources(fs.Resources), Params: ToParams(fs.Params), Workspaces: ToWorkspacePipelineTaskBindingsFromDeclarations(fs.Workspaces), }, @@ -503,7 +501,6 @@ func ConvertTaskRunToPipelineRun(from *pipelinev1.TaskRun, message string, defau } pipelineSpec := &pipelinev1.PipelineSpec{ Description: "", - Resources: nil, Tasks: []pipelinev1.PipelineTask{ { Name: from.Name, @@ -573,52 +570,6 @@ func ToParamSpecs(params []pipelinev1.Param) []pipelinev1.ParamSpec { return answer } -// ToPipelineResources converts the task resources to piepline resources -func ToPipelineResources(resources *pipelinev1.TaskResources) *pipelinev1.PipelineTaskResources { - if resources == nil { - return nil - } - return &pipelinev1.PipelineTaskResources{ - Inputs: ToPipelineInputs(resources.Inputs), - Outputs: ToPipelineOutputs(resources.Inputs), - } -} - -// ToPipelineInputs converts the task resources into pipeline inputs -func ToPipelineInputs(inputs []pipelinev1.TaskResource) []pipelinev1.PipelineTaskInputResource { - var answer []pipelinev1.PipelineTaskInputResource - for _, from := range inputs { - answer = append(answer, ToPipelineInput(from)) - } - return answer -} - -// ToPipelineOutputs converts the task resources into pipeline outputs -func ToPipelineOutputs(inputs []pipelinev1.TaskResource) []pipelinev1.PipelineTaskOutputResource { - var answer []pipelinev1.PipelineTaskOutputResource - for _, from := range inputs { - answer = append(answer, ToPipelineOutput(from)) - } - return answer -} - -// ToPipelineInput converts the task resource into pipeline inputs -func ToPipelineInput(from pipelinev1.TaskResource) pipelinev1.PipelineTaskInputResource { - return pipelinev1.PipelineTaskInputResource{ - Name: from.Name, - Resource: from.ResourceDeclaration.Name, - From: nil, - } -} - -// ToPipelineOutput converts the task resource into pipeline outputs -func ToPipelineOutput(from pipelinev1.TaskResource) pipelinev1.PipelineTaskOutputResource { - return pipelinev1.PipelineTaskOutputResource{ - Name: from.Name, - Resource: from.ResourceDeclaration.Name, - } -} - // ToWorkspaceBindings converts the workspace declarations to workspaces bindings func ToWorkspaceBindings(workspaces []pipelinev1.WorkspaceDeclaration) []pipelinev1.WorkspaceBinding { var answer []pipelinev1.WorkspaceBinding From b177f855a8a832ec191da53b1cad4b7d958c4952 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 5 Dec 2024 17:09:57 +0100 Subject: [PATCH 10/23] chore: add scheme on Manager config --- cmd/foghorn/main.go | 7 ++++++- cmd/tektoncontroller/main.go | 5 +++-- pkg/foghorn/controller_test.go | 3 +++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmd/foghorn/main.go b/cmd/foghorn/main.go index f0395cbdb..0f36eb2e3 100644 --- a/cmd/foghorn/main.go +++ b/cmd/foghorn/main.go @@ -9,6 +9,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/foghorn" "github.com/jenkins-x/lighthouse/pkg/logrusutil" "github.com/sirupsen/logrus" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" @@ -40,7 +41,10 @@ func main() { scheme := runtime.NewScheme() if err := lighthousev1alpha1.AddToScheme(scheme); err != nil { - logrus.WithError(err).Fatal("Failed to register scheme") + logrus.WithError(err).Fatal("Failed to register lighthousev1alpha1 scheme") + } + if err := pipelinev1.AddToScheme(scheme); err != nil { + logrus.WithError(err).Fatal("Failed to register tektoncd-pipelinev1 scheme") } o := gatherOptions(flag.NewFlagSet(os.Args[0], flag.ExitOnError), os.Args[1:]...) @@ -59,6 +63,7 @@ func main() { o.namespace: {}, }, }, + Scheme: scheme, }) if err != nil { logrus.WithError(err).Fatal("Unable to start manager") diff --git a/cmd/tektoncontroller/main.go b/cmd/tektoncontroller/main.go index 2adbc016f..de7a671bd 100644 --- a/cmd/tektoncontroller/main.go +++ b/cmd/tektoncontroller/main.go @@ -47,10 +47,10 @@ func main() { scheme := runtime.NewScheme() if err := lighthousev1alpha1.AddToScheme(scheme); err != nil { - logrus.WithError(err).Fatal("Failed to register scheme") + logrus.WithError(err).Fatal("Failed to register lighthousev1alpha1 scheme") } if err := pipelinev1.AddToScheme(scheme); err != nil { - logrus.WithError(err).Fatal("Failed to register scheme") + logrus.WithError(err).Fatal("Failed to register tektoncd-pipelinev1 scheme") } o := gatherOptions(flag.NewFlagSet(os.Args[0], flag.ExitOnError), os.Args[1:]...) @@ -69,6 +69,7 @@ func main() { o.namespace: {}, }, }, + Scheme: scheme, }) if err != nil { logrus.WithError(err).Fatal("Unable to start manager") diff --git a/pkg/foghorn/controller_test.go b/pkg/foghorn/controller_test.go index 32fdd9af3..f6ca218f9 100644 --- a/pkg/foghorn/controller_test.go +++ b/pkg/foghorn/controller_test.go @@ -18,6 +18,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/util" "github.com/jenkins-x/lighthouse/pkg/watcher" "github.com/stretchr/testify/assert" + pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -108,6 +109,8 @@ func TestReconcile(t *testing.T) { scheme := runtime.NewScheme() err = lighthousev1alpha1.AddToScheme(scheme) assert.NoError(t, err) + err = pipelinev1.AddToScheme(scheme) + assert.NoError(t, err) c := fake.NewClientBuilder().WithScheme(scheme).WithRuntimeObjects(observedJob).Build() reconciler, err := NewLighthouseJobReconcilerWithConfig(c, scheme, ns, cfgMapWatcher, configAgent, pluginAgent) assert.NoError(t, err) From ed97652ca8ecaf987cf0f3614c10d85020258977 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Fri, 6 Dec 2024 12:18:27 +0100 Subject: [PATCH 11/23] chore: add taskruns get permission --- charts/lighthouse/templates/tekton-controller-role.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/lighthouse/templates/tekton-controller-role.yaml b/charts/lighthouse/templates/tekton-controller-role.yaml index 3d82838eb..76497d976 100644 --- a/charts/lighthouse/templates/tekton-controller-role.yaml +++ b/charts/lighthouse/templates/tekton-controller-role.yaml @@ -8,6 +8,7 @@ rules: - tekton.dev resources: - pipelines + - taskruns verbs: - get - apiGroups: From dbfe79c78e29ed0d878d4660ca4fdf9c5d7266ac Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Fri, 6 Dec 2024 17:22:26 +0100 Subject: [PATCH 12/23] chore: pass tektonClient from param in ConvertPipelineRun --- pkg/engines/tekton/activity.go | 9 ++------- pkg/engines/tekton/activity_test.go | 4 +++- pkg/engines/tekton/controller.go | 7 ++++++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pkg/engines/tekton/activity.go b/pkg/engines/tekton/activity.go index c3f71000a..c888496e4 100644 --- a/pkg/engines/tekton/activity.go +++ b/pkg/engines/tekton/activity.go @@ -7,25 +7,20 @@ import ( "knative.dev/pkg/apis" "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" - "github.com/jenkins-x/lighthouse/pkg/clients" "github.com/jenkins-x/lighthouse/pkg/config/job" "github.com/jenkins-x/lighthouse/pkg/util" pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" + tektonversioned "github.com/tektoncd/pipeline/pkg/client/clientset/versioned" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ConvertPipelineRun translates a PipelineRun into an ActivityRecord -func ConvertPipelineRun(pr *pipelinev1.PipelineRun) (*v1alpha1.ActivityRecord, error) { +func ConvertPipelineRun(tektonclient tektonversioned.Interface, pr *pipelinev1.PipelineRun) (*v1alpha1.ActivityRecord, error) { if pr == nil { return nil, nil } - tektonclient, _, _, _, err := clients.GetAPIClients() - if err != nil { - return nil, err - } - record := new(v1alpha1.ActivityRecord) record.Name = pr.Name diff --git a/pkg/engines/tekton/activity_test.go b/pkg/engines/tekton/activity_test.go index c9e1ebb24..8c1f7fc6c 100644 --- a/pkg/engines/tekton/activity_test.go +++ b/pkg/engines/tekton/activity_test.go @@ -11,6 +11,7 @@ import ( "github.com/jenkins-x/lighthouse/pkg/util" "github.com/stretchr/testify/assert" pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" + tektonfake "github.com/tektoncd/pipeline/pkg/client/clientset/versioned/fake" "sigs.k8s.io/yaml" ) @@ -40,7 +41,8 @@ func TestConvertPipelineRun(t *testing.T) { testDir := filepath.Join("test_data", "activity", tc.name) pr := loadPipelineRun(t, testDir) - converted, err := tekton.ConvertPipelineRun(pr) + tektonfakeClient := tektonfake.NewSimpleClientset(pr) + converted, err := tekton.ConvertPipelineRun(tektonfakeClient, pr) assert.NoError(t, err) expected := loadRecord(t, testDir) diff --git a/pkg/engines/tekton/controller.go b/pkg/engines/tekton/controller.go index 970b5e91e..14d51daa2 100644 --- a/pkg/engines/tekton/controller.go +++ b/pkg/engines/tekton/controller.go @@ -8,6 +8,7 @@ import ( "text/template" lighthousev1alpha1 "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" + "github.com/jenkins-x/lighthouse/pkg/clients" configjob "github.com/jenkins-x/lighthouse/pkg/config/job" "github.com/jenkins-x/lighthouse/pkg/util" "github.com/pkg/errors" @@ -179,7 +180,11 @@ func (r *LighthouseJobReconciler) Reconcile(ctx context.Context, req ctrl.Reques if r.dashboardURL != "" { job.Status.ReportURL = r.getPipelingetPipelineTargetURLeTargetURL(pipelineRun) } - activity, err := ConvertPipelineRun(&pipelineRun) + tektonclient, _, _, _, err := clients.GetAPIClients() + if err != nil { + return errors.Wrapf(err, "failed to get api clients") + } + activity, err := ConvertPipelineRun(tektonclient, &pipelineRun) if err != nil { return errors.Wrapf(err, "failed to convert PipelineRun") } From 9f5e93230df4951ce16e7500c8ebf7e3074ae780 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Mon, 9 Dec 2024 10:36:07 +0100 Subject: [PATCH 13/23] chore: use lighthousev1alpha1 --- pkg/engines/tekton/controller_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/engines/tekton/controller_test.go b/pkg/engines/tekton/controller_test.go index c5d030fec..5cf2a8b7e 100644 --- a/pkg/engines/tekton/controller_test.go +++ b/pkg/engines/tekton/controller_test.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/require" "github.com/google/go-cmp/cmp" - "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" lighthousev1alpha1 "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" "github.com/jenkins-x/lighthouse/pkg/util" @@ -148,7 +147,7 @@ func TestReconcile(t *testing.T) { } } -func loadLighthouseJob(isObserved bool, dir string) (*v1alpha1.LighthouseJob, string, error) { +func loadLighthouseJob(isObserved bool, dir string) (*lighthousev1alpha1.LighthouseJob, string, error) { var baseFn string if isObserved { baseFn = "observed-lhjob.yml" @@ -161,7 +160,7 @@ func loadLighthouseJob(isObserved bool, dir string) (*v1alpha1.LighthouseJob, st return nil, fileName, err } if exists { - lhjob := &v1alpha1.LighthouseJob{} + lhjob := &lighthousev1alpha1.LighthouseJob{} data, err := os.ReadFile(fileName) if err != nil { return nil, fileName, err From b60db48238f0b5f86fbc60024ce458f74c9da57c Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Thu, 13 Mar 2025 17:22:48 +0100 Subject: [PATCH 14/23] chore: support v1 and v1beta1 --- cmd/tektoncontroller/main.go | 7 +- go.mod | 65 ++++--- go.sum | 126 ++++++------ pkg/engines/tekton/activity.go | 4 +- pkg/engines/tekton/activity_test.go | 5 +- pkg/engines/tekton/controller.go | 29 +-- pkg/engines/tekton/controller_test.go | 8 +- pkg/foghorn/controller_test.go | 2 +- pkg/triggerconfig/inrepo/load_pipelinerun.go | 194 +++++++++++-------- 9 files changed, 242 insertions(+), 198 deletions(-) diff --git a/cmd/tektoncontroller/main.go b/cmd/tektoncontroller/main.go index de7a671bd..faf11833e 100644 --- a/cmd/tektoncontroller/main.go +++ b/cmd/tektoncontroller/main.go @@ -75,7 +75,12 @@ func main() { logrus.WithError(err).Fatal("Unable to start manager") } - lhJobReconciler := tektonengine.NewLighthouseJobReconciler(mgr.GetClient(), mgr.GetAPIReader(), mgr.GetScheme(), o.dashboardURL, o.dashboardTemplate, o.namespace) + tektonclient, _, _, _, err := clients.GetAPIClients() + if err != nil { + logrus.WithError(err).Fatal(err, "failed to get api clients") + } + + lhJobReconciler := tektonengine.NewLighthouseJobReconciler(mgr.GetClient(), mgr.GetAPIReader(), mgr.GetScheme(), tektonclient, o.dashboardURL, o.dashboardTemplate, o.namespace) if err = lhJobReconciler.SetupWithManager(mgr); err != nil { logrus.WithError(err).Fatal("Unable to create controller") } diff --git a/go.mod b/go.mod index 9c50ab74d..7ec73066b 100644 --- a/go.mod +++ b/go.mod @@ -12,29 +12,30 @@ require ( github.com/gorilla/sessions v1.2.1 github.com/h2non/gock v1.0.9 github.com/hashicorp/go-multierror v1.1.1 - github.com/hashicorp/golang-lru v0.5.4 + github.com/hashicorp/golang-lru v1.0.2 github.com/jenkins-x/go-scm v1.14.56 github.com/mattn/go-zglob v0.0.1 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.33.1 + github.com/onsi/gomega v1.36.1 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.19.1 github.com/shurcooL/githubv4 v0.0.0-20191102174205-af46314aec7b github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 github.com/tektoncd/pipeline v0.65.3 - golang.org/x/oauth2 v0.22.0 + golang.org/x/oauth2 v0.23.0 gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 - k8s.io/api v0.31.3 - k8s.io/apimachinery v0.31.3 - k8s.io/client-go v0.31.3 - k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 + k8s.io/api v0.32.1 + k8s.io/apimachinery v0.32.3 + k8s.io/client-go v0.32.1 + k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 knative.dev/pkg v0.0.0-20240416145024-0f34a8815650 - sigs.k8s.io/controller-runtime v0.19.3 + sigs.k8s.io/controller-runtime v0.20.3 sigs.k8s.io/yaml v1.4.0 ) require ( + cel.dev/expr v0.18.0 // indirect code.gitea.io/sdk/gitea v0.18.0 // indirect contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect @@ -48,27 +49,27 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidmz/go-pageant v1.0.2 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch/v5 v5.9.0 // indirect + github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-fed/httpsig v1.1.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.4.2 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/cel-go v0.20.1 // indirect + github.com/google/btree v1.1.3 // indirect + github.com/google/cel-go v0.22.0 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/gorilla/securecookie v1.1.1 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect - github.com/imdario/mergo v0.3.15 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect @@ -86,35 +87,35 @@ require ( github.com/prometheus/statsd_exporter v0.22.7 // indirect github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stoewer/go-strcase v1.2.0 // indirect + github.com/stoewer/go-strcase v1.3.0 // indirect github.com/x448/float16 v0.8.4 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.26.0 // indirect - golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect - golang.org/x/net v0.28.0 // indirect + golang.org/x/crypto v0.28.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/net v0.30.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - golang.org/x/time v0.5.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/text v0.19.0 // indirect + golang.org/x/time v0.7.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.181.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect google.golang.org/grpc v1.67.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.31.0 // indirect + k8s.io/apiextensions-apiserver v0.32.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect ) replace ( @@ -127,8 +128,10 @@ replace ( // gomodules.xyz breaks in Athens proxying gomodules.xyz/jsonpatch/v2 => github.com/gomodules/jsonpatch/v2 v2.2.0 - k8s.io/api => k8s.io/api v0.31.3 - k8s.io/apimachinery => k8s.io/apimachinery v0.31.3 + k8s.io/api => k8s.io/api v0.32.3 + k8s.io/apimachinery => k8s.io/apimachinery v0.32.3 ) -go 1.22.3 +go 1.23.0 + +toolchain go1.23.2 diff --git a/go.sum b/go.sum index eef9802f9..206b4328f 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= +cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -96,8 +98,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= -github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= +github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -125,13 +127,14 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= @@ -176,8 +179,10 @@ github.com/gomodules/jsonpatch/v2 v2.2.0 h1:QBjDK/nX43P4z/Os3gnk8VeFdLDgBuMns1Wl github.com/gomodules/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= -github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= +github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -206,8 +211,8 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -238,8 +243,6 @@ github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iP github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jenkins-x/go-scm v1.14.56 h1:+kKwbTv+6ymaxx4bBCEMLvkrjLmFkWX39qxYe4DDHPI= github.com/jenkins-x/go-scm v1.14.56/go.mod h1:1RPxLZndnvu31XhFZ+RTvXiHmMX70HkQ17bRupTQxGs= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -299,12 +302,12 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg= +github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw= +github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -360,8 +363,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= +github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -410,8 +413,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -422,8 +425,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -444,8 +447,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -483,8 +486,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -492,8 +495,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -554,12 +557,12 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= 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.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -567,13 +570,13 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -617,8 +620,8 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -679,10 +682,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw= +google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -712,8 +715,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -737,7 +740,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -751,30 +753,30 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= -k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= -k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= -k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= -k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= -k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= -k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= +k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= +k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= +k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw= +k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto= +k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= +k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU= +k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= knative.dev/pkg v0.0.0-20240416145024-0f34a8815650 h1:m2ahFUO0L2VrgGDYdyOUFdE6xBd3pLXAJozLJwqLRQM= knative.dev/pkg v0.0.0-20240416145024-0f34a8815650/go.mod h1:soFw5ss08G4PU3JiFDKqiZRd2U7xoqcfNpJP1coIXkY= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.19.3 h1:XO2GvC9OPftRst6xWCpTgBZO04S2cbp0Qqkj8bX1sPw= -sigs.k8s.io/controller-runtime v0.19.3/go.mod h1:j4j87DqtsThvwTv5/Tc5NFRyyF/RF0ip4+62tbTSIUM= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/controller-runtime v0.20.3 h1:I6Ln8JfQjHH7JbtCD2HCYHoIzajoRxPNuvhvcDbZgkI= +sigs.k8s.io/controller-runtime v0.20.3/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/engines/tekton/activity.go b/pkg/engines/tekton/activity.go index c888496e4..39c4e8437 100644 --- a/pkg/engines/tekton/activity.go +++ b/pkg/engines/tekton/activity.go @@ -16,7 +16,7 @@ import ( ) // ConvertPipelineRun translates a PipelineRun into an ActivityRecord -func ConvertPipelineRun(tektonclient tektonversioned.Interface, pr *pipelinev1.PipelineRun) (*v1alpha1.ActivityRecord, error) { +func ConvertPipelineRun(tektonclient tektonversioned.Interface, pr *pipelinev1.PipelineRun, namespace string) (*v1alpha1.ActivityRecord, error) { if pr == nil { return nil, nil } @@ -43,7 +43,7 @@ func ConvertPipelineRun(tektonclient tektonversioned.Interface, pr *pipelinev1.P record.Status = convertTektonStatus(cond, record.StartTime, record.CompletionTime) for _, childReference := range pr.Status.ChildReferences { - taskrun, err := tektonclient.TektonV1().TaskRuns("jx").Get(context.TODO(), childReference.Name, metav1.GetOptions{}) + taskrun, err := tektonclient.TektonV1().TaskRuns(namespace).Get(context.TODO(), childReference.Name, metav1.GetOptions{}) if err != nil { return nil, err } diff --git a/pkg/engines/tekton/activity_test.go b/pkg/engines/tekton/activity_test.go index 8c1f7fc6c..ccd5af267 100644 --- a/pkg/engines/tekton/activity_test.go +++ b/pkg/engines/tekton/activity_test.go @@ -40,9 +40,10 @@ func TestConvertPipelineRun(t *testing.T) { t.Run(tc.name, func(t *testing.T) { testDir := filepath.Join("test_data", "activity", tc.name) pr := loadPipelineRun(t, testDir) + ns := "jx" - tektonfakeClient := tektonfake.NewSimpleClientset(pr) - converted, err := tekton.ConvertPipelineRun(tektonfakeClient, pr) + tektonfakeClient := tektonfake.NewSimpleClientset() + converted, err := tekton.ConvertPipelineRun(tektonfakeClient, pr, ns) assert.NoError(t, err) expected := loadRecord(t, testDir) diff --git a/pkg/engines/tekton/controller.go b/pkg/engines/tekton/controller.go index 14d51daa2..96f0605c3 100644 --- a/pkg/engines/tekton/controller.go +++ b/pkg/engines/tekton/controller.go @@ -14,6 +14,7 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" + tektonversioned "github.com/tektoncd/pipeline/pkg/client/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" @@ -28,6 +29,7 @@ var apiGVStr = lighthousev1alpha1.SchemeGroupVersion.String() // LighthouseJobReconciler reconciles a LighthouseJob object type LighthouseJobReconciler struct { client client.Client + tektonclient tektonversioned.Interface apiReader client.Reader logger *logrus.Entry scheme *runtime.Scheme @@ -39,7 +41,7 @@ type LighthouseJobReconciler struct { } // NewLighthouseJobReconciler creates a LighthouseJob reconciler -func NewLighthouseJobReconciler(client client.Client, apiReader client.Reader, scheme *runtime.Scheme, dashboardURL string, dashboardTemplate string, namespace string) *LighthouseJobReconciler { +func NewLighthouseJobReconciler(client client.Client, apiReader client.Reader, scheme *runtime.Scheme, tektonclient tektonversioned.Interface, dashboardURL string, dashboardTemplate string, namespace string) *LighthouseJobReconciler { if dashboardTemplate == "" { dashboardTemplate = os.Getenv("LIGHTHOUSE_DASHBOARD_TEMPLATE") } @@ -51,22 +53,25 @@ func NewLighthouseJobReconciler(client client.Client, apiReader client.Reader, s dashboardURL: dashboardURL, dashboardTemplate: dashboardTemplate, namespace: namespace, + tektonclient: tektonclient, idGenerator: &epochBuildIDGenerator{}, } } +var tektonControllerIndexFunc = func(rawObj client.Object) []string { + obj := rawObj.(*pipelinev1.PipelineRun) + owner := metav1.GetControllerOf(obj) + // TODO: would be nice to get kind from the type rather than a hard coded string + if owner == nil || owner.APIVersion != apiGVStr || owner.Kind != "LighthouseJob" { + return nil + } + return []string{owner.Name} +} + // SetupWithManager sets up the reconcilier with it's manager func (r *LighthouseJobReconciler) SetupWithManager(mgr ctrl.Manager) error { - indexFunc := func(rawObj client.Object) []string { - obj := rawObj.(*pipelinev1.PipelineRun) - owner := metav1.GetControllerOf(obj) - // TODO: would be nice to get kind from the type rather than a hard coded string - if owner == nil || owner.APIVersion != apiGVStr || owner.Kind != "LighthouseJob" { - return nil - } - return []string{owner.Name} - } - if err := mgr.GetFieldIndexer().IndexField(context.TODO(), &pipelinev1.PipelineRun{}, jobOwnerKey, indexFunc); err != nil { + + if err := mgr.GetFieldIndexer().IndexField(context.TODO(), &pipelinev1.PipelineRun{}, jobOwnerKey, tektonControllerIndexFunc); err != nil { return err } @@ -184,7 +189,7 @@ func (r *LighthouseJobReconciler) Reconcile(ctx context.Context, req ctrl.Reques if err != nil { return errors.Wrapf(err, "failed to get api clients") } - activity, err := ConvertPipelineRun(tektonclient, &pipelineRun) + activity, err := ConvertPipelineRun(tektonclient, &pipelineRun, req.Namespace) if err != nil { return errors.Wrapf(err, "failed to convert PipelineRun") } diff --git a/pkg/engines/tekton/controller_test.go b/pkg/engines/tekton/controller_test.go index 5cf2a8b7e..c9875f66b 100644 --- a/pkg/engines/tekton/controller_test.go +++ b/pkg/engines/tekton/controller_test.go @@ -12,10 +12,10 @@ import ( "github.com/google/go-cmp/cmp" lighthousev1alpha1 "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" - "github.com/jenkins-x/lighthouse/pkg/util" "github.com/stretchr/testify/assert" pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" + tektonfake "github.com/tektoncd/pipeline/pkg/client/clientset/versioned/fake" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -74,6 +74,7 @@ func TestReconcile(t *testing.T) { if observedPipeline != nil { state = append(state, observedPipeline) } + tektonfakeClient := tektonfake.NewSimpleClientset() // load expected state expectedPR, expectedPRFile, err := loadControllerPipelineRun(false, testData) @@ -88,8 +89,9 @@ func TestReconcile(t *testing.T) { err = pipelinev1.AddToScheme(scheme) assert.NoError(t, err) - c := fake.NewClientBuilder().WithScheme(scheme).WithObjects(state...).Build() - reconciler := NewLighthouseJobReconciler(c, c, scheme, dashboardBaseURL, dashboardTemplate, ns) + c := fake.NewClientBuilder().WithStatusSubresource(observedJob).WithScheme(scheme).WithObjects(state...).Build() + fake.AddIndex(c, &pipelinev1.PipelineRun{}, jobOwnerKey, tektonControllerIndexFunc) + reconciler := NewLighthouseJobReconciler(c, c, scheme, tektonfakeClient, dashboardBaseURL, dashboardTemplate, ns) reconciler.idGenerator = &seededRandIDGenerator{} reconciler.disableLogging = true diff --git a/pkg/foghorn/controller_test.go b/pkg/foghorn/controller_test.go index f6ca218f9..81bb84cfe 100644 --- a/pkg/foghorn/controller_test.go +++ b/pkg/foghorn/controller_test.go @@ -111,7 +111,7 @@ func TestReconcile(t *testing.T) { assert.NoError(t, err) err = pipelinev1.AddToScheme(scheme) assert.NoError(t, err) - c := fake.NewClientBuilder().WithScheme(scheme).WithRuntimeObjects(observedJob).Build() + c := fake.NewClientBuilder().WithStatusSubresource(observedJob).WithScheme(scheme).WithRuntimeObjects(observedJob).Build() reconciler, err := NewLighthouseJobReconcilerWithConfig(c, scheme, ns, cfgMapWatcher, configAgent, pluginAgent) assert.NoError(t, err) diff --git a/pkg/triggerconfig/inrepo/load_pipelinerun.go b/pkg/triggerconfig/inrepo/load_pipelinerun.go index 05276c9cc..02c4cb49d 100644 --- a/pkg/triggerconfig/inrepo/load_pipelinerun.go +++ b/pkg/triggerconfig/inrepo/load_pipelinerun.go @@ -13,13 +13,15 @@ import ( "github.com/pkg/errors" pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" + pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" ) const ( // TektonAPIVersion the default tekton API version - TektonAPIVersion = "tekton.dev/v1" + TektonAPIVersion = "tekton.dev/v1" + TektonAPIVersionV1B1 = "tekton.dev/v1beta1" // DefaultParameters the annotation used to disable default parameters DefaultParameters = "lighthouse.jenkins-x.io/defaultParameters" @@ -75,126 +77,150 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe } message := resolver.Message dir := resolver.Dir - kindPrefix := "kind:" - kind := "PipelineRun" - lines := strings.Split(string(data), "\n") - for _, line := range lines { - if !strings.HasPrefix(line, kindPrefix) { - continue - } - k := strings.TrimSpace(line[len(kindPrefix):]) - if k != "" { - kind = k - break - } + + var meta struct { + Kind string `yaml:"kind"` + APIVersion string `yaml:"apiVersion"` } - switch kind { + if err := yaml.Unmarshal(data, &meta); err != nil { + return nil, errors.Wrapf(err, "failed to extract metadata (kind, apiVersion) from YAML %s", message) + } + + isBeta := meta.APIVersion == TektonAPIVersionV1B1 + + switch meta.Kind { case "Pipeline": pipeline := &pipelinev1.Pipeline{} - err := yaml.Unmarshal(data, pipeline) - if err != nil { - return nil, errors.Wrapf(err, "failed to unmarshal Pipeline YAML %s", message) + var err error + if isBeta { + pipeline, err = unmarshalAndConvertPipeline(data, message) + } else { + err = yaml.Unmarshal(data, pipeline) } - prs, err := ConvertPipelineToPipelineRun(pipeline, resolver.Message, resolver.DefaultValues) if err != nil { - return prs, err + return nil, err } - re, err := loadTektonRefsFromFilesPattern(prs) + prs, err := ConvertPipelineToPipelineRun(pipeline, resolver.Message, resolver.DefaultValues) if err != nil { return prs, err } - if re != nil { - prs, err = loadPipelineRunRefs(resolver, prs, dir, message, re) - if err != nil { - return prs, err - } - } - prs, err = inheritTaskSteps(resolver, prs) - if err != nil { - return prs, errors.Wrapf(err, "failed to inherit steps") - } - return DefaultPipelineParameters(prs) + return resolvePipelineRunReferences(resolver, prs, dir, message) case "PipelineRun": prs := &pipelinev1.PipelineRun{} - err := yaml.Unmarshal(data, prs) - if err != nil { - return nil, errors.Wrapf(err, "failed to unmarshal PipelineRun YAML %s", message) - } - - re, err := loadTektonRefsFromFilesPattern(prs) - if err != nil { - return prs, err - } - if re != nil { - prs, err = loadPipelineRunRefs(resolver, prs, dir, message, re) - if err != nil { - return prs, err - } + var err error + if isBeta { + prs, err = unmarshalAndConvertPipelineRun(data, message) + } else { + err = yaml.Unmarshal(data, prs) } - prs, err = inheritTaskSteps(resolver, prs) if err != nil { - return prs, errors.Wrap(err, "failed to inherit steps") + return nil, err } - return DefaultPipelineParameters(prs) + return resolvePipelineRunReferences(resolver, prs, dir, message) case "Task": task := &pipelinev1.Task{} - err := yaml.Unmarshal(data, task) - if err != nil { - return nil, errors.Wrapf(err, "failed to unmarshal Task YAML %s", message) + var err error + if isBeta { + task, err = unmarshalAndConvertTask(data, message) + } else { + err = yaml.Unmarshal(data, task) } - prs, err := ConvertTaskToPipelineRun(task, message, resolver.DefaultValues) if err != nil { - return prs, err + return nil, err } - re, err := loadTektonRefsFromFilesPattern(prs) + prs, err := ConvertTaskToPipelineRun(task, message, resolver.DefaultValues) if err != nil { return prs, err } - if re != nil { - prs, err = loadPipelineRunRefs(resolver, prs, dir, message, re) - if err != nil { - return prs, err - } - } - prs, err = inheritTaskSteps(resolver, prs) - if err != nil { - return prs, errors.Wrapf(err, "failed to inherit steps") - } - defaultTaskName(prs) - return DefaultPipelineParameters(prs) + return resolvePipelineRunReferences(resolver, prs, dir, message) case "TaskRun": tr := &pipelinev1.TaskRun{} - err := yaml.Unmarshal(data, tr) + var err error + if isBeta { + tr, err = unmarshalAndConvertTaskRun(data, message) + } else { + err = yaml.Unmarshal(data, tr) + } if err != nil { - return nil, errors.Wrapf(err, "failed to unmarshal TaskRun YAML %s", message) + return nil, err } prs, err := ConvertTaskRunToPipelineRun(tr, message, resolver.DefaultValues) if err != nil { return prs, err } - re, err := loadTektonRefsFromFilesPattern(prs) - if err != nil { + return resolvePipelineRunReferences(resolver, prs, dir, message) + + default: + return nil, errors.Errorf("kind %s is not supported for %s", meta.Kind, message) + } +} + +func unmarshalAndConvertPipeline(data []byte, message string) (*pipelinev1.Pipeline, error) { + pV1Beta1 := &pipelinev1beta1.Pipeline{} + if err := yaml.Unmarshal(data, pV1Beta1); err != nil { + return nil, errors.Wrapf(err, "failed to unmarshal Pipeline v1beta1 YAML %s", message) + } + pV1 := &pipelinev1.Pipeline{} + if err := pV1Beta1.ConvertTo(context.TODO(), pV1); err != nil { + return nil, errors.Wrap(err, "failed to convert Pipeline from v1beta1 to v1") + } + return pV1, nil +} + +func unmarshalAndConvertPipelineRun(data []byte, message string) (*pipelinev1.PipelineRun, error) { + prsV1Beta1 := &pipelinev1beta1.PipelineRun{} + if err := yaml.Unmarshal(data, prsV1Beta1); err != nil { + return nil, errors.Wrapf(err, "failed to unmarshal PipelineRun v1beta1 YAML %s", message) + } + prsV1 := &pipelinev1.PipelineRun{} + if err := prsV1Beta1.ConvertTo(context.TODO(), prsV1); err != nil { + return nil, errors.Wrap(err, "failed to convert PipelineRun from v1beta1 to v1") + } + return prsV1, nil +} + +func unmarshalAndConvertTask(data []byte, message string) (*pipelinev1.Task, error) { + tV1Beta1 := &pipelinev1beta1.Task{} + if err := yaml.Unmarshal(data, tV1Beta1); err != nil { + return nil, errors.Wrapf(err, "failed to unmarshal Task v1beta1 YAML %s", message) + } + tV1 := &pipelinev1.Task{} + if err := tV1Beta1.ConvertTo(context.TODO(), tV1); err != nil { + return nil, errors.Wrap(err, "failed to convert Task from v1beta1 to v1") + } + return tV1, nil +} + +func unmarshalAndConvertTaskRun(data []byte, message string) (*pipelinev1.TaskRun, error) { + trsV1Beta1 := &pipelinev1beta1.TaskRun{} + if err := yaml.Unmarshal(data, trsV1Beta1); err != nil { + return nil, errors.Wrapf(err, "failed to unmarshal TaskRun v1beta1 YAML %s", message) + } + trsV1 := &pipelinev1.TaskRun{} + if err := trsV1Beta1.ConvertTo(context.TODO(), trsV1); err != nil { + return nil, errors.Wrap(err, "failed to convert TaskRun from v1beta1 to v1") + } + return trsV1, nil +} + +func resolvePipelineRunReferences(resolver *UsesResolver, prs *pipelinev1.PipelineRun, dir, message string) (*pipelinev1.PipelineRun, error) { + if re, err := loadTektonRefsFromFilesPattern(prs); err != nil { + return prs, err + } else if re != nil { + if prs, err = loadPipelineRunRefs(resolver, prs, dir, message, re); err != nil { return prs, err } - if re != nil { - prs, err = loadPipelineRunRefs(resolver, prs, dir, message, re) - if err != nil { - return prs, err - } - } - prs, err = inheritTaskSteps(resolver, prs) - if err != nil { - return prs, errors.Wrapf(err, "failed to inherit steps") - } - defaultTaskName(prs) - return DefaultPipelineParameters(prs) + } - default: - return nil, errors.Errorf("kind %s is not supported for %s", kind, message) + if prs, err := inheritTaskSteps(resolver, prs); err != nil { + return prs, errors.Wrapf(err, "failed to inherit steps") } + + defaultTaskName(prs) // Renamed function for clarity + return DefaultPipelineParameters(prs) } func defaultTaskName(prs *pipelinev1.PipelineRun) { From 91df7091e084d5997c9ee8bb9d06312e33cf5c98 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Tue, 18 Mar 2025 15:04:06 +0100 Subject: [PATCH 15/23] chore: convert from v1beta1 to v1 pipeline/task loaded from ref --- pkg/triggerconfig/inrepo/load_pipelinerun.go | 57 ++++++++++++++------ 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/pkg/triggerconfig/inrepo/load_pipelinerun.go b/pkg/triggerconfig/inrepo/load_pipelinerun.go index 02c4cb49d..a6c1d31db 100644 --- a/pkg/triggerconfig/inrepo/load_pipelinerun.go +++ b/pkg/triggerconfig/inrepo/load_pipelinerun.go @@ -86,13 +86,11 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe return nil, errors.Wrapf(err, "failed to extract metadata (kind, apiVersion) from YAML %s", message) } - isBeta := meta.APIVersion == TektonAPIVersionV1B1 - switch meta.Kind { case "Pipeline": pipeline := &pipelinev1.Pipeline{} var err error - if isBeta { + if isBeta(data) { pipeline, err = unmarshalAndConvertPipeline(data, message) } else { err = yaml.Unmarshal(data, pipeline) @@ -109,7 +107,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe case "PipelineRun": prs := &pipelinev1.PipelineRun{} var err error - if isBeta { + if isBeta(data) { prs, err = unmarshalAndConvertPipelineRun(data, message) } else { err = yaml.Unmarshal(data, prs) @@ -122,8 +120,8 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe case "Task": task := &pipelinev1.Task{} var err error - if isBeta { - task, err = unmarshalAndConvertTask(data, message) + if isBeta(data) { + task, err = unmarshalAndConvertTask(data) } else { err = yaml.Unmarshal(data, task) } @@ -139,7 +137,7 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe case "TaskRun": tr := &pipelinev1.TaskRun{} var err error - if isBeta { + if isBeta(data) { tr, err = unmarshalAndConvertTaskRun(data, message) } else { err = yaml.Unmarshal(data, tr) @@ -158,6 +156,20 @@ func LoadTektonResourceAsPipelineRun(resolver *UsesResolver, data []byte) (*pipe } } +func isBeta(data []byte) bool { + var meta struct { + Kind string `yaml:"kind"` + APIVersion string `yaml:"apiVersion"` + } + + // If unmarshalling fails, assume it's not beta + if err := yaml.Unmarshal(data, &meta); err != nil { + return false + } + + return meta.APIVersion == TektonAPIVersionV1B1 +} + func unmarshalAndConvertPipeline(data []byte, message string) (*pipelinev1.Pipeline, error) { pV1Beta1 := &pipelinev1beta1.Pipeline{} if err := yaml.Unmarshal(data, pV1Beta1); err != nil { @@ -182,10 +194,10 @@ func unmarshalAndConvertPipelineRun(data []byte, message string) (*pipelinev1.Pi return prsV1, nil } -func unmarshalAndConvertTask(data []byte, message string) (*pipelinev1.Task, error) { +func unmarshalAndConvertTask(data []byte) (*pipelinev1.Task, error) { tV1Beta1 := &pipelinev1beta1.Task{} if err := yaml.Unmarshal(data, tV1Beta1); err != nil { - return nil, errors.Wrapf(err, "failed to unmarshal Task v1beta1 YAML %s", message) + return nil, errors.Wrap(err, "failed to unmarshal Task v1beta1 YAML") } tV1 := &pipelinev1.Task{} if err := tV1Beta1.ConvertTo(context.TODO(), tV1); err != nil { @@ -354,7 +366,11 @@ func loadTaskByURL(uri string) (*pipelinev1.Task, error) { } task := &pipelinev1.Task{} - err = yaml.Unmarshal(data, &task) + if isBeta(data) { + task, err = unmarshalAndConvertTask(data) + } else { + err = yaml.Unmarshal(data, task) + } if err != nil { return nil, errors.Wrapf(err, "failed to unmarshall YAML from URL %s", uri) } @@ -392,12 +408,17 @@ func loadPipelineRunRefs(resolver *UsesResolver, prs *pipelinev1.PipelineRun, di if len(data) == 0 { return prs, errors.Errorf("no YAML for path %s in PipelineRun", pipelinePath) } - p := &pipelinev1.Pipeline{} - err = yaml.Unmarshal(data, p) + + pipeline := &pipelinev1.Pipeline{} + if isBeta(data) { + pipeline, err = unmarshalAndConvertPipeline(data, message) + } else { + err = yaml.Unmarshal(data, pipeline) + } if err != nil { return prs, errors.Wrapf(err, "failed to unmarshal Pipeline YAML file %s %s", pipelinePath, message) } - prs.Spec.PipelineSpec = &p.Spec + prs.Spec.PipelineSpec = &pipeline.Spec prs.Spec.PipelineRef = nil } @@ -425,13 +446,17 @@ func loadTaskRefs(resolver *UsesResolver, pipelineSpec *pipelinev1.PipelineSpec, if len(data) == 0 { return errors.Errorf("no YAML for path %s in PipelineSpec", path) } - t2 := &pipelinev1.Task{} - err = yaml.Unmarshal(data, t2) + task := &pipelinev1.Task{} + if isBeta(data) { + task, err = unmarshalAndConvertTask(data) + } else { + err = yaml.Unmarshal(data, task) + } if err != nil { return errors.Wrapf(err, "failed to unmarshal Task YAML file %s %s", path, message) } t.TaskSpec = &pipelinev1.EmbeddedTask{ - TaskSpec: t2.Spec, + TaskSpec: task.Spec, } t.TaskRef = nil } From 9519ef1d81b602539a58361d2f05a1e5bb9954f6 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Tue, 18 Mar 2025 11:29:41 +0100 Subject: [PATCH 16/23] chore: normalize actual and expected data to avoid diff when indent --- .../inrepo/load_pipelinerun_test.go | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/pkg/triggerconfig/inrepo/load_pipelinerun_test.go b/pkg/triggerconfig/inrepo/load_pipelinerun_test.go index 11d73d5cd..eda5e0163 100644 --- a/pkg/triggerconfig/inrepo/load_pipelinerun_test.go +++ b/pkg/triggerconfig/inrepo/load_pipelinerun_test.go @@ -25,6 +25,14 @@ var ( disabledTests = []string{} ) +func normalizeYAML(data []byte) (interface{}, error) { + var obj interface{} + if err := yaml.Unmarshal(data, &obj); err != nil { + return nil, err + } + return obj, nil +} + func TestLoadPipelineRunTest(t *testing.T) { sourceDir := filepath.Join("test_data", "load_pipelinerun") fs, err := os.ReadDir(sourceDir) @@ -126,10 +134,20 @@ func TestLoadPipelineRunTest(t *testing.T) { expectedData, err := os.ReadFile(expectedPath) require.NoError(t, err, "failed to load file "+expectedPath) - text := strings.TrimSpace(string(data)) - expectedText := strings.TrimSpace(string(expectedData)) + // Compare normalized YAML structures + normalizedActual, err := normalizeYAML(data) + require.NoError(t, err, "failed to normalize actual YAML") + + normalizedExpected, err := normalizeYAML(expectedData) + require.NoError(t, err, "failed to normalize expected YAML") + + normalizedActualBytes, err := yaml.Marshal(normalizedActual) + require.NoError(t, err, "failed to re-marshal actual YAML for %s", path) + + normalizedExpectedBytes, err := yaml.Marshal(normalizedExpected) + require.NoError(t, err, "failed to marshal expected YAML for "+path) - assert.Equal(t, expectedText, text, "PipelineRun loaded for "+message) + assert.Equal(t, string(normalizedExpectedBytes), string(normalizedActualBytes), "PipelineRun loaded for %s", path) } } } From de1241689ceaf7c4300d5803ac10f9688abb39c6 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Mon, 17 Mar 2025 17:04:46 +0100 Subject: [PATCH 17/23] chore(load_pipelinerun): show how to validate one uses test --- pkg/triggerconfig/inrepo/load_pipelinerun.go | 6 ++- .../uses-all-steps/expected.yaml | 40 +++++++++---------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/pkg/triggerconfig/inrepo/load_pipelinerun.go b/pkg/triggerconfig/inrepo/load_pipelinerun.go index a6c1d31db..c325df7a4 100644 --- a/pkg/triggerconfig/inrepo/load_pipelinerun.go +++ b/pkg/triggerconfig/inrepo/load_pipelinerun.go @@ -187,7 +187,11 @@ func unmarshalAndConvertPipelineRun(data []byte, message string) (*pipelinev1.Pi if err := yaml.Unmarshal(data, prsV1Beta1); err != nil { return nil, errors.Wrapf(err, "failed to unmarshal PipelineRun v1beta1 YAML %s", message) } - prsV1 := &pipelinev1.PipelineRun{} + prsV1 := &pipelinev1.PipelineRun{ + TypeMeta: metav1.TypeMeta{ + Kind: prsV1Beta1.Kind, + APIVersion: TektonAPIVersion, + }} if err := prsV1Beta1.ConvertTo(context.TODO(), prsV1); err != nil { return nil, errors.Wrap(err, "failed to convert PipelineRun from v1beta1 to v1") } diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-all-steps/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-all-steps/expected.yaml index 2e74f536f..7f030ecb1 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-all-steps/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-all-steps/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null @@ -151,6 +151,10 @@ spec: type: string spec: null stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi env: - name: BUILD_ID value: $(params.BUILD_ID) @@ -178,16 +182,11 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi workingDir: /workspace/source steps: - - image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 name: git-clone - resources: {} script: | #!/bin/sh export SUBDIR="source" @@ -200,44 +199,45 @@ spec: git checkout $PULL_PULL_SHA echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" workingDir: /workspace - - image: gcr.io/jenkinsxio/jx-boot:3.1.62 + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.62 name: git-merge - resources: {} script: | #!/usr/bin/env sh jx gitops git merge variables workingDir: /workspace/source - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 name: jx-variables - resources: {} script: | #!/usr/bin/env sh jx gitops variables - - image: node:12-slim + - computeResources: {} + image: node:12-slim name: build-npm-install - resources: {} script: | #!/bin/sh npm install - - image: node:12-slim + - computeResources: {} + image: node:12-slim name: build-npm-test - resources: {} script: | #!/bin/sh CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 name: build-container-build - resources: {} script: | #!/busybox/sh source .jx/variables.sh cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 name: promote-jx-preview - resources: {} script: | #!/usr/bin/env sh source .jx/variables.sh jx preview create + taskRunTemplate: {} status: {} From 65ee163440b42cc104fefea738bb9ad1ab88adbc Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Tue, 18 Mar 2025 10:54:50 +0100 Subject: [PATCH 18/23] chore(load_pipelinerun): convert the expected to v1 --- .../controller/update-job/expected-lhjob.yml | 5 - .../pipeline-finally-params/expected.yaml | 427 +- .../pipeline-finally-uses/expected.yaml | 473 +- .../pipeline-load-refs-sub-dir/expected.yaml | 1652 +- .../pipeline-load-refs/expected.yaml | 1652 +- .../expected.yaml | 547 +- .../show-results-task.yaml | 1 - .../expected.yaml | 358 +- .../load_pipelinerun/pipeline/expected.yaml | 28662 +++++++++++++++- .../pr-load-refs/expected.yaml | 294 +- .../load_pipelinerun/pr/expected.yaml | 24 +- .../task-append-steps/expected.yaml | 282 +- .../task-disable-params/expected.yaml | 253 +- .../task-prepend-steps/expected.yaml | 282 +- .../task-without-params/expected.yaml | 460 +- .../load_pipelinerun/task/expected.yaml | 565 +- .../load_pipelinerun/taskrun/expected.yaml | 418 +- .../uses-all-steps/expected.yaml | 408 +- .../uses-custom-param-task/expected.yaml | 342 +- .../uses-custom-param/expected.yaml | 338 +- .../uses-issue-1234/expected.yaml | 306 +- .../uses-issue-1234/expected2.yaml | 306 +- .../expected.yaml | 404 +- .../uses-steps-add-custom/expected.yaml | 404 +- .../uses-steps-custom-git/expected.yaml | 836 +- .../uses-steps-explicit/expected.yaml | 384 +- .../uses-steps-inherit-sidecar/expected.yaml | 398 +- .../uses-steps-multiple-copies/expected.yaml | 428 +- .../expected.yaml | 441 +- .../uses-steps-override-script/expected.yaml | 398 +- .../uses-steps-override/expected.yaml | 390 +- .../uses-steps-version-stream/expected.yaml | 368 +- .../uses-steps-with-sidecar-ws/expected.yaml | 448 +- .../uses-steps-with-sidecar/expected.yaml | 398 +- .../load_pipelinerun/uses-steps/expected.yaml | 384 +- .../uses-task-and-steps/expected.yaml | 521 +- 36 files changed, 36169 insertions(+), 8088 deletions(-) diff --git a/pkg/engines/tekton/test_data/controller/update-job/expected-lhjob.yml b/pkg/engines/tekton/test_data/controller/update-job/expected-lhjob.yml index d19ef4007..f62a16f83 100644 --- a/pkg/engines/tekton/test_data/controller/update-job/expected-lhjob.yml +++ b/pkg/engines/tekton/test_data/controller/update-job/expected-lhjob.yml @@ -28,11 +28,6 @@ spec: apiVersion: tekton.dev/v1beta1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 podTemplate: {} - resources: - - name: jenkins-x-charts-jx-build-templ-wbbx6 - resourceRef: - apiVersion: tekton.dev/v1beta1 - name: jenkins-x-charts-jx-build-templ-wbbx6 serviceAccountName: tekton-bot timeout: 240h0m0s refs: diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-finally-params/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-finally-params/expected.yaml index 6e528f513..28cb71ff4 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-finally-params/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-finally-params/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null @@ -6,82 +6,8 @@ metadata: spec: pipelineSpec: finally: - - name: lint-pr-comment - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: lint-pr-comment params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -108,137 +34,136 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - image: ghcr.io/jenkins-x/jx-gitops:0.3.1 - name: lint-pr-comment - resources: {} - script: | - #!/bin/sh - set -x - . .jx/variables.sh - jx gitops pr comment -c "$(cat issues.md)" + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ghcr.io/jenkins-x/jx-gitops:0.3.1 + name: lint-pr-comment + script: | + #!/bin/sh + set -x + . .jx/variables.sh + jx gitops pr comment -c "$(cat issues.md)" params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -265,13 +190,87 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - env: - - name: FOO - value: one - image: common-image - name: common-build - resources: {} -status: {} \ No newline at end of file + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: one + image: common-image + name: common-build + taskRunTemplate: {} +status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-finally-uses/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-finally-uses/expected.yaml index bebc3999a..323d2e30f 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-finally-uses/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-finally-uses/expected.yaml @@ -1,114 +1,40 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: finally: - - name: from-build-pack-finally - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack-finally params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -135,135 +61,134 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - env: - - name: FOO - value: finally - image: common-image - name: common-build - resources: {} + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: finally + image: common-image + name: common-build params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -290,13 +215,87 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - env: - - name: FOO - value: foo - image: common-image - name: common-build - resources: {} + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: foo + image: common-image + name: common-build + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs-sub-dir/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs-sub-dir/expected.yaml index 501e7ebc7..d818639f0 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs-sub-dir/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs-sub-dir/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -8,165 +8,58 @@ metadata: spec: pipelineSpec: params: - - default: gcr.io/christiewilson-catfactory - name: image-registry - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - default: gcr.io/christiewilson-catfactory + name: image-registry + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: fetch-from-git - params: - - name: url - value: https://github.com/GoogleContainerTools/skaffold - - name: revision - value: v0.32.0 - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: fetch-from-git params: - - description: git url to clone - name: url - type: string - - default: master - description: git revision to checkout (branch, tag, sha, ref…) - name: revision - type: string - - default: "true" - description: defines if the resource should initialize and fetch the submodules - name: submodules - type: string - - default: "1" - description: performs a shallow clone where only the most recent commit(s) - will be fetched - name: depth - type: string - - default: "true" - description: defines if http.sslVerify should be set to true or false in - the global git config - name: sslVerify - type: string - - default: "" - description: subdirectory inside the "output" workspace to clone the git - repo into - name: subdirectory - type: string - - default: "false" - description: clean out the contents of the repo's destination directory - (if it already exists) before trying to clone the repo there - name: deleteExisting - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - results: - - description: The precise commit SHA that was fetched by this Task - name: commit - spec: null - stepTemplate: - env: + - name: url + value: https://github.com/GoogleContainerTools/skaffold + - name: revision + value: v0.32.0 - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -193,131 +86,158 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - image: ko://github.com/tektoncd/pipeline/cmd/git-init - name: clone - resources: {} - script: |- - CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" - cleandir() { - # Delete any existing contents of the repo directory if it exists. - # - # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" - # or the root of a mounted volume. - if [[ -d "$CHECKOUT_DIR" ]] ; then - # Delete non-hidden files and directories - rm -rf "$CHECKOUT_DIR"/* - # Delete files and directories starting with . but excluding .. - rm -rf "$CHECKOUT_DIR"/.[!.]* - # Delete files and directories starting with .. plus any other character - rm -rf "$CHECKOUT_DIR"/..?* - fi - } - if [[ "$(params.deleteExisting)" == "true" ]] ; then - cleandir - fi - /ko-app/git-init \ - -url "$(params.url)" \ - -revision "$(params.revision)" \ - -path "$CHECKOUT_DIR" \ - -sslVerify="$(params.sslVerify)" \ - -submodules="$(params.submodules)" \ - -depth="$(params.depth)" - cd "$CHECKOUT_DIR" - RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" - EXIT_CODE="$?" - if [ "$EXIT_CODE" != 0 ] - then - exit $EXIT_CODE - fi - # Make sure we don't add a trailing newline to the result! - echo -n "$RESULT_SHA" > $(results.commit.path) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: url + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "false" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/git-init + name: clone + script: |- + CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + if [[ "$(params.deleteExisting)" == "true" ]] ; then + cleandir + fi + /ko-app/git-init \ + -url "$(params.url)" \ + -revision "$(params.revision)" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="$(params.sslVerify)" \ + -submodules="$(params.submodules)" \ + -depth="$(params.depth)" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] + then + exit $EXIT_CODE + fi + # Make sure we don't add a trailing newline to the result! + echo -n "$RESULT_SHA" > $(results.commit.path) + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output workspaces: - - description: The git repo will be cloned onto the volume backing this workspace - name: output - workspaces: - - name: output - workspace: git-source - - name: skaffold-unit-tests - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - fetch-from-git - taskSpec: - metadata: {} + - name: output + workspace: git-source + - name: skaffold-unit-tests params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -344,128 +264,111 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - env: - - name: GOPATH - value: /workspace/go - image: golang - name: run-tests - resources: {} - script: |- - # The intention behind this example Task is to run unit test, however we - # currently do nothing to ensure that a unit test issue doesn't cause this example - # to fail unnecessarily. In the future we could re-introduce the unit tests (since - # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. - echo "pass" - workingDir: $(workspaces.source.path) + runAfter: + - fetch-from-git + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: GOPATH + value: /workspace/go + image: golang + name: run-tests + script: |- + # The intention behind this example Task is to run unit test, however we + # currently do nothing to ensure that a unit test issue doesn't cause this example + # to fail unnecessarily. In the future we could re-introduce the unit tests (since + # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. + echo "pass" + workingDir: $(workspaces.source.path) + workspaces: + - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold + name: source workspaces: - - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold - name: source - workspaces: - - name: source - workspace: git-source - - name: build-skaffold-web - params: - - name: IMAGE - value: $(params.image-registry)/leeroy-web - - name: CONTEXT - value: examples/microservices/leeroy-web - - name: DOCKERFILE - value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - skaffold-unit-tests - taskSpec: - metadata: {} + - name: source + workspace: git-source + - name: build-skaffold-web params: - - description: Name (reference) of the image to build. - name: IMAGE - - default: ./Dockerfile - description: Path to the Dockerfile to build. - name: DOCKERFILE - - default: ./ - description: The build context used by Kaniko. - name: CONTEXT - - default: "" - name: EXTRA_ARGS - - default: gcr.io/kaniko-project/executor:latest - description: The image on which builds will run - name: BUILDER_IMAGE - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - results: - - description: Digest of the image just built. - name: IMAGE_DIGEST - spec: null - stepTemplate: - env: + - name: IMAGE + value: $(params.image-registry)/leeroy-web + - name: CONTEXT + value: examples/microservices/leeroy-web + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -492,147 +395,150 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - command: - - /kaniko/executor - - $(params.EXTRA_ARGS) - - --dockerfile=$(params.DOCKERFILE) - - --context=$(workspaces.source.path)/$(params.CONTEXT) - - --destination=$(params.IMAGE) - - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest - env: - - name: DOCKER_CONFIG - value: /tekton/home/.docker - image: $(params.BUILDER_IMAGE) - name: build-and-push - resources: {} - securityContext: - runAsUser: 0 - workingDir: $(workspaces.source.path) - - args: - - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] - - -terminationMessagePath=$(params.CONTEXT)/image-digested - command: - - /ko-app/imagedigestexporter - image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter - name: write-digest - resources: {} - securityContext: - runAsUser: 0 - workingDir: $(workspaces.source.path) - - image: stedolan/jq - name: digest-to-results - resources: {} - script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee - /tekton/results/IMAGE_DIGEST - workingDir: $(workspaces.source.path) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source workspaces: - - name: source - workspaces: - - name: source - workspace: git-source - - name: build-skaffold-app - params: - - name: IMAGE - value: $(params.image-registry)/leeroy-app - - name: CONTEXT - value: examples/microservices/leeroy-app - - name: DOCKERFILE - value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - skaffold-unit-tests - taskSpec: - metadata: {} + - name: source + workspace: git-source + - name: build-skaffold-app params: - - description: Name (reference) of the image to build. - name: IMAGE - - default: ./Dockerfile - description: Path to the Dockerfile to build. - name: DOCKERFILE - - default: ./ - description: The build context used by Kaniko. - name: CONTEXT - - default: "" - name: EXTRA_ARGS - - default: gcr.io/kaniko-project/executor:latest - description: The image on which builds will run - name: BUILDER_IMAGE - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - results: - - description: Digest of the image just built. - name: IMAGE_DIGEST - spec: null - stepTemplate: - env: + - name: IMAGE + value: $(params.image-registry)/leeroy-app + - name: CONTEXT + value: examples/microservices/leeroy-app + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -659,141 +565,152 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - command: - - /kaniko/executor - - $(params.EXTRA_ARGS) - - --dockerfile=$(params.DOCKERFILE) - - --context=$(workspaces.source.path)/$(params.CONTEXT) - - --destination=$(params.IMAGE) - - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest - env: - - name: DOCKER_CONFIG - value: /tekton/home/.docker - image: $(params.BUILDER_IMAGE) - name: build-and-push - resources: {} - securityContext: - runAsUser: 0 - workingDir: $(workspaces.source.path) - - args: - - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] - - -terminationMessagePath=$(params.CONTEXT)/image-digested - command: - - /ko-app/imagedigestexporter - image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter - name: write-digest - resources: {} - securityContext: - runAsUser: 0 - workingDir: $(workspaces.source.path) - - image: stedolan/jq - name: digest-to-results - resources: {} - script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee - /tekton/results/IMAGE_DIGEST - workingDir: $(workspaces.source.path) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source workspaces: - - name: source - workspaces: - - name: source - workspace: git-source - - name: deploy-app - params: - - name: imageURL - value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) - - name: path - value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml - - name: yqArg - value: -d1 - - name: yamlPathToImage - value: spec.template.spec.containers[0].image - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: source + workspace: git-source + - name: deploy-app params: - - description: Path to the manifest to apply - name: path - - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` - down below - name: yqArg - - description: The path to the image to replace in the yaml manifest (arg - to yq) - name: yamlPathToImage - - description: The URL of the image to deploy - name: imageURL - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: + - name: imageURL + value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -820,129 +737,130 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - args: - - w - - -i - - $(params.yqArg) - - $(params.path) - - $(params.yamlPathToImage) - - $(params.imageURL) - command: - - yq - image: mikefarah/yq - name: replace-image - resources: {} - - args: - - apply - - -f - - $(params.path) - command: - - kubectl - image: lachlanevenson/k8s-kubectl - name: run-kubectl - resources: {} + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source workspaces: - - name: source - workspaces: - - name: source - workspace: git-source - - name: deploy-web - params: - - name: imageURL - value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) - - name: path - value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml - - name: yqArg - value: -d1 - - name: yamlPathToImage - value: spec.template.spec.containers[0].image - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: source + workspace: git-source + - name: deploy-web params: - - description: Path to the manifest to apply - name: path - - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` - down below - name: yqArg - - description: The path to the image to replace in the yaml manifest (arg - to yq) - name: yamlPathToImage - - description: The URL of the image to deploy - name: imageURL - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: + - name: imageURL + value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -969,35 +887,123 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - args: - - w - - -i - - $(params.yqArg) - - $(params.path) - - $(params.yamlPathToImage) - - $(params.imageURL) - command: - - yq - image: mikefarah/yq - name: replace-image - resources: {} - - args: - - apply - - -f - - $(params.path) - command: - - kubectl - image: lachlanevenson/k8s-kubectl - name: run-kubectl - resources: {} + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source workspaces: - - name: source - workspaces: - - name: source - workspace: git-source + - name: source + workspace: git-source workspaces: - - name: git-source + - name: git-source + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs/expected.yaml index 501e7ebc7..d818639f0 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-load-refs/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -8,165 +8,58 @@ metadata: spec: pipelineSpec: params: - - default: gcr.io/christiewilson-catfactory - name: image-registry - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - default: gcr.io/christiewilson-catfactory + name: image-registry + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: fetch-from-git - params: - - name: url - value: https://github.com/GoogleContainerTools/skaffold - - name: revision - value: v0.32.0 - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: fetch-from-git params: - - description: git url to clone - name: url - type: string - - default: master - description: git revision to checkout (branch, tag, sha, ref…) - name: revision - type: string - - default: "true" - description: defines if the resource should initialize and fetch the submodules - name: submodules - type: string - - default: "1" - description: performs a shallow clone where only the most recent commit(s) - will be fetched - name: depth - type: string - - default: "true" - description: defines if http.sslVerify should be set to true or false in - the global git config - name: sslVerify - type: string - - default: "" - description: subdirectory inside the "output" workspace to clone the git - repo into - name: subdirectory - type: string - - default: "false" - description: clean out the contents of the repo's destination directory - (if it already exists) before trying to clone the repo there - name: deleteExisting - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - results: - - description: The precise commit SHA that was fetched by this Task - name: commit - spec: null - stepTemplate: - env: + - name: url + value: https://github.com/GoogleContainerTools/skaffold + - name: revision + value: v0.32.0 - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -193,131 +86,158 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - image: ko://github.com/tektoncd/pipeline/cmd/git-init - name: clone - resources: {} - script: |- - CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" - cleandir() { - # Delete any existing contents of the repo directory if it exists. - # - # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" - # or the root of a mounted volume. - if [[ -d "$CHECKOUT_DIR" ]] ; then - # Delete non-hidden files and directories - rm -rf "$CHECKOUT_DIR"/* - # Delete files and directories starting with . but excluding .. - rm -rf "$CHECKOUT_DIR"/.[!.]* - # Delete files and directories starting with .. plus any other character - rm -rf "$CHECKOUT_DIR"/..?* - fi - } - if [[ "$(params.deleteExisting)" == "true" ]] ; then - cleandir - fi - /ko-app/git-init \ - -url "$(params.url)" \ - -revision "$(params.revision)" \ - -path "$CHECKOUT_DIR" \ - -sslVerify="$(params.sslVerify)" \ - -submodules="$(params.submodules)" \ - -depth="$(params.depth)" - cd "$CHECKOUT_DIR" - RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" - EXIT_CODE="$?" - if [ "$EXIT_CODE" != 0 ] - then - exit $EXIT_CODE - fi - # Make sure we don't add a trailing newline to the result! - echo -n "$RESULT_SHA" > $(results.commit.path) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: url + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "false" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/git-init + name: clone + script: |- + CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + if [[ "$(params.deleteExisting)" == "true" ]] ; then + cleandir + fi + /ko-app/git-init \ + -url "$(params.url)" \ + -revision "$(params.revision)" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="$(params.sslVerify)" \ + -submodules="$(params.submodules)" \ + -depth="$(params.depth)" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] + then + exit $EXIT_CODE + fi + # Make sure we don't add a trailing newline to the result! + echo -n "$RESULT_SHA" > $(results.commit.path) + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output workspaces: - - description: The git repo will be cloned onto the volume backing this workspace - name: output - workspaces: - - name: output - workspace: git-source - - name: skaffold-unit-tests - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - fetch-from-git - taskSpec: - metadata: {} + - name: output + workspace: git-source + - name: skaffold-unit-tests params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -344,128 +264,111 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - env: - - name: GOPATH - value: /workspace/go - image: golang - name: run-tests - resources: {} - script: |- - # The intention behind this example Task is to run unit test, however we - # currently do nothing to ensure that a unit test issue doesn't cause this example - # to fail unnecessarily. In the future we could re-introduce the unit tests (since - # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. - echo "pass" - workingDir: $(workspaces.source.path) + runAfter: + - fetch-from-git + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: GOPATH + value: /workspace/go + image: golang + name: run-tests + script: |- + # The intention behind this example Task is to run unit test, however we + # currently do nothing to ensure that a unit test issue doesn't cause this example + # to fail unnecessarily. In the future we could re-introduce the unit tests (since + # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. + echo "pass" + workingDir: $(workspaces.source.path) + workspaces: + - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold + name: source workspaces: - - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold - name: source - workspaces: - - name: source - workspace: git-source - - name: build-skaffold-web - params: - - name: IMAGE - value: $(params.image-registry)/leeroy-web - - name: CONTEXT - value: examples/microservices/leeroy-web - - name: DOCKERFILE - value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - skaffold-unit-tests - taskSpec: - metadata: {} + - name: source + workspace: git-source + - name: build-skaffold-web params: - - description: Name (reference) of the image to build. - name: IMAGE - - default: ./Dockerfile - description: Path to the Dockerfile to build. - name: DOCKERFILE - - default: ./ - description: The build context used by Kaniko. - name: CONTEXT - - default: "" - name: EXTRA_ARGS - - default: gcr.io/kaniko-project/executor:latest - description: The image on which builds will run - name: BUILDER_IMAGE - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - results: - - description: Digest of the image just built. - name: IMAGE_DIGEST - spec: null - stepTemplate: - env: + - name: IMAGE + value: $(params.image-registry)/leeroy-web + - name: CONTEXT + value: examples/microservices/leeroy-web + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -492,147 +395,150 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - command: - - /kaniko/executor - - $(params.EXTRA_ARGS) - - --dockerfile=$(params.DOCKERFILE) - - --context=$(workspaces.source.path)/$(params.CONTEXT) - - --destination=$(params.IMAGE) - - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest - env: - - name: DOCKER_CONFIG - value: /tekton/home/.docker - image: $(params.BUILDER_IMAGE) - name: build-and-push - resources: {} - securityContext: - runAsUser: 0 - workingDir: $(workspaces.source.path) - - args: - - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] - - -terminationMessagePath=$(params.CONTEXT)/image-digested - command: - - /ko-app/imagedigestexporter - image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter - name: write-digest - resources: {} - securityContext: - runAsUser: 0 - workingDir: $(workspaces.source.path) - - image: stedolan/jq - name: digest-to-results - resources: {} - script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee - /tekton/results/IMAGE_DIGEST - workingDir: $(workspaces.source.path) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source workspaces: - - name: source - workspaces: - - name: source - workspace: git-source - - name: build-skaffold-app - params: - - name: IMAGE - value: $(params.image-registry)/leeroy-app - - name: CONTEXT - value: examples/microservices/leeroy-app - - name: DOCKERFILE - value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - skaffold-unit-tests - taskSpec: - metadata: {} + - name: source + workspace: git-source + - name: build-skaffold-app params: - - description: Name (reference) of the image to build. - name: IMAGE - - default: ./Dockerfile - description: Path to the Dockerfile to build. - name: DOCKERFILE - - default: ./ - description: The build context used by Kaniko. - name: CONTEXT - - default: "" - name: EXTRA_ARGS - - default: gcr.io/kaniko-project/executor:latest - description: The image on which builds will run - name: BUILDER_IMAGE - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - results: - - description: Digest of the image just built. - name: IMAGE_DIGEST - spec: null - stepTemplate: - env: + - name: IMAGE + value: $(params.image-registry)/leeroy-app + - name: CONTEXT + value: examples/microservices/leeroy-app + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -659,141 +565,152 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - command: - - /kaniko/executor - - $(params.EXTRA_ARGS) - - --dockerfile=$(params.DOCKERFILE) - - --context=$(workspaces.source.path)/$(params.CONTEXT) - - --destination=$(params.IMAGE) - - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest - env: - - name: DOCKER_CONFIG - value: /tekton/home/.docker - image: $(params.BUILDER_IMAGE) - name: build-and-push - resources: {} - securityContext: - runAsUser: 0 - workingDir: $(workspaces.source.path) - - args: - - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] - - -terminationMessagePath=$(params.CONTEXT)/image-digested - command: - - /ko-app/imagedigestexporter - image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter - name: write-digest - resources: {} - securityContext: - runAsUser: 0 - workingDir: $(workspaces.source.path) - - image: stedolan/jq - name: digest-to-results - resources: {} - script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee - /tekton/results/IMAGE_DIGEST - workingDir: $(workspaces.source.path) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source workspaces: - - name: source - workspaces: - - name: source - workspace: git-source - - name: deploy-app - params: - - name: imageURL - value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) - - name: path - value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml - - name: yqArg - value: -d1 - - name: yamlPathToImage - value: spec.template.spec.containers[0].image - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: source + workspace: git-source + - name: deploy-app params: - - description: Path to the manifest to apply - name: path - - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` - down below - name: yqArg - - description: The path to the image to replace in the yaml manifest (arg - to yq) - name: yamlPathToImage - - description: The URL of the image to deploy - name: imageURL - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: + - name: imageURL + value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -820,129 +737,130 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - args: - - w - - -i - - $(params.yqArg) - - $(params.path) - - $(params.yamlPathToImage) - - $(params.imageURL) - command: - - yq - image: mikefarah/yq - name: replace-image - resources: {} - - args: - - apply - - -f - - $(params.path) - command: - - kubectl - image: lachlanevenson/k8s-kubectl - name: run-kubectl - resources: {} + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source workspaces: - - name: source - workspaces: - - name: source - workspace: git-source - - name: deploy-web - params: - - name: imageURL - value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) - - name: path - value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml - - name: yqArg - value: -d1 - - name: yamlPathToImage - value: spec.template.spec.containers[0].image - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: source + workspace: git-source + - name: deploy-web params: - - description: Path to the manifest to apply - name: path - - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` - down below - name: yqArg - - description: The path to the image to replace in the yaml manifest (arg - to yq) - name: yamlPathToImage - - description: The URL of the image to deploy - name: imageURL - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: + - name: imageURL + value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -969,35 +887,123 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - args: - - w - - -i - - $(params.yqArg) - - $(params.path) - - $(params.yamlPathToImage) - - $(params.imageURL) - command: - - yq - image: mikefarah/yq - name: replace-image - resources: {} - - args: - - apply - - -f - - $(params.path) - command: - - kubectl - image: lachlanevenson/k8s-kubectl - name: run-kubectl - resources: {} + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source workspaces: - - name: source - workspaces: - - name: source - workspace: git-source + - name: source + workspace: git-source workspaces: - - name: git-source + - name: git-source + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-params-from-tasks-results/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-params-from-tasks-results/expected.yaml index c47e6e60e..524ce2fd1 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-params-from-tasks-results/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-params-from-tasks-results/expected.yaml @@ -1,174 +1,94 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: jx3-test-save-show-results spec: params: - - name: value_to_save - value: "" - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: value_to_save + value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - default: "" - name: value_to_save - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - default: "" + name: value_to_save + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string results: - - description: result_value - name: result_value - value: $(tasks.save-results.results.result_value) + - description: result_value + name: result_value + value: $(tasks.save-results.results.result_value) tasks: - - name: save-results - params: - - name: value_to_save - value: test_demo - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: save-results params: - - default: "" - name: value_to_save - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - results: - - description: result_value - name: result_value - spec: null - stepTemplate: - env: + - name: value_to_save + value: test_demo - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -195,104 +115,104 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - imagePullPolicy: IfNotPresent - name: "" - resources: {} - workingDir: /workspace/source - steps: - - image: ubuntu:jammy - name: save-result - resources: {} - script: | - #!/usr/bin/env sh - set -ex - result_value="$(params.value_to_save)" - echo "results.result_value.path is $(results.result_value.path)" - echo -n "${result_value}" > $(results.result_value.path) - echo "result_value is ${result_value}" - - name: display-results - params: - - name: value_to_show - value: $(tasks.save-results.results.result_value) - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - save-results - taskSpec: - metadata: {} + taskSpec: + metadata: {} + params: + - default: "" + name: value_to_save + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: result_value + name: result_value + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + imagePullPolicy: IfNotPresent + workingDir: /workspace/source + steps: + - computeResources: {} + image: ubuntu:jammy + name: save-result + script: | + #!/usr/bin/env sh + set -ex + result_value="$(params.value_to_save)" + echo "results.result_value.path is $(results.result_value.path)" + echo -n "${result_value}" > $(results.result_value.path) + echo "result_value is ${result_value}" + - name: display-results params: - - default: "" - name: value_to_show - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: + - name: value_to_show + value: $(tasks.save-results.results.result_value) - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -319,21 +239,100 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - imagePullPolicy: IfNotPresent - name: "" - resources: {} - workingDir: /workspace/source - steps: - - image: ubuntu:jammy - name: show-result - resources: {} - script: | - #!/usr/bin/env sh - set -ex - echo "tasks.save-results.results.result_value is $(tasks.save-results.results.result_value)" - value_to_show="$(params.value_to_show)" - echo "value_to_show is ${value_to_show}" - podTemplate: {} - serviceAccountName: tekton-bot - timeout: 30m0s + runAfter: + - save-results + taskSpec: + metadata: {} + params: + - default: "" + name: value_to_show + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + imagePullPolicy: IfNotPresent + workingDir: /workspace/source + steps: + - computeResources: {} + image: ubuntu:jammy + name: show-result + script: | + #!/usr/bin/env sh + set -ex + value_to_show="$(params.value_to_show)" + echo "value_to_show is ${value_to_show}" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 30m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-params-from-tasks-results/show-results-task.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-params-from-tasks-results/show-results-task.yaml index 3494c3b33..ce0d7ac02 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-params-from-tasks-results/show-results-task.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-params-from-tasks-results/show-results-task.yaml @@ -21,6 +21,5 @@ spec: script: | #!/usr/bin/env sh set -ex - echo "tasks.save-results.results.result_value is $(tasks.save-results.results.result_value)" value_to_show="$(params.value_to_show)" echo "value_to_show is ${value_to_show}" diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-tekton-git-resolver/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-tekton-git-resolver/expected.yaml index a5704299b..ce0712be3 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-tekton-git-resolver/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline-tekton-git-resolver/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null @@ -6,187 +6,189 @@ metadata: spec: pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: git-clone-env-pr - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskRef: + - name: git-clone-env-pr params: - - name: url - value: https://github.com/jenkins-x/jx3-pipeline-catalog.git - - name: revision - value: master - - name: pathInRepo - value: tasks/git-clone/git-clone-env-pr.yaml - resolver: git - workspaces: - - name: output - workspace: pipeline-ws - - name: make-pr - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - git-clone-env-pr - taskRef: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/git-clone/git-clone-env-pr.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + - name: make-pr params: - - name: url - value: https://github.com/jenkins-x/jx3-pipeline-catalog.git - - name: revision - value: master - - name: pathInRepo - value: tasks/environment/pullrequest/make-pr.yaml - resolver: git - workspaces: - - name: output - workspace: pipeline-ws - - name: kubetest - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - make-pr - taskRef: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - git-clone-env-pr + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/environment/pullrequest/make-pr.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + - name: kubetest params: - - name: url - value: https://github.com/jenkins-x/jx3-pipeline-catalog.git - - name: revision - value: master - - name: pathInRepo - value: tasks/kubetest/environment.yaml - resolver: git - workspaces: - - name: output - workspace: pipeline-ws + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - make-pr + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/kubetest/environment.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws workspaces: - - name: pipeline-ws - serviceAccountName: tekton-bot - timeout: 12h0m0s + - name: pipeline-ws + taskRunTemplate: + serviceAccountName: tekton-bot + timeouts: + pipeline: 12h0m0s workspaces: - - name: pipeline-ws - volumeClaimTemplate: - metadata: - creationTimestamp: null - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi - status: {} + - name: pipeline-ws + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + status: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline/expected.yaml index 16fcf50f2..d6bf2d1cd 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pipeline/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null @@ -6,287 +6,28389 @@ metadata: spec: pipelineSpec: params: - - default: gcr.io/christiewilson-catfactory - name: image-registry - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - tasks: - - name: fetch-from-git - params: - - name: url - value: https://github.com/GoogleContainerTools/skaffold - - name: revision - value: v0.32.0 - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskRef: - name: git-clone - workspaces: - - name: output - workspace: git-source - - name: skaffold-unit-tests - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - fetch-from-git - taskRef: - name: unit-tests - workspaces: - - name: source - workspace: git-source - - name: build-skaffold-web - params: - - name: IMAGE - value: $(params.image-registry)/leeroy-web - - name: CONTEXT - value: examples/microservices/leeroy-web - - name: DOCKERFILE - value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - skaffold-unit-tests - taskRef: - name: kaniko - workspaces: - - name: source - workspace: git-source - - name: build-skaffold-app - params: - - name: IMAGE - value: $(params.image-registry)/leeroy-app - - name: CONTEXT - value: examples/microservices/leeroy-app - - name: DOCKERFILE - value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - runAfter: - - skaffold-unit-tests - taskRef: - name: kaniko - workspaces: + - default: gcr.io/christiewilson-catfactory + name: image-registry + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: fetch-from-git + params: + - name: url + value: https://github.com/GoogleContainerTools/skaffold + - name: revision + value: v0.32.0 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskRef: + name: git-clone + workspaces: + - name: output + workspace: git-source + - name: skaffold-unit-tests + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - fetch-from-git + taskRef: + name: unit-tests + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-web + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-web + - name: CONTEXT + value: examples/microservices/leeroy-web + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskRef: + name: kaniko + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-app + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-app + - name: CONTEXT + value: examples/microservices/leeroy-app + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskRef: + name: kaniko + workspaces: + - name: source + workspace: git-source + - name: deploy-app + params: + - name: imageURL + value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskRef: + name: demo-deploy-kubectl + workspaces: + - name: source + workspace: git-source + - name: deploy-web + params: + - name: imageURL + value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskRef: + name: demo-deploy-kubectl + workspaces: + - name: source + workspace: git-source + workspaces: + - name: git-source + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + finally: + - name: lint-pr-comment + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ghcr.io/jenkins-x/jx-gitops:0.3.1 + name: lint-pr-comment + script: | + #!/bin/sh + set -x + . .jx/variables.sh + jx gitops pr comment -c "$(cat issues.md)" + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: one + image: common-image + name: common-build + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + finally: + - name: from-build-pack-finally + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: finally + image: common-image + name: common-build + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: foo + image: common-image + name: common-build + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/loadFileRefs: .* + creationTimestamp: null + name: demo-pipeline +spec: + pipelineSpec: + params: + - default: gcr.io/christiewilson-catfactory + name: image-registry + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: fetch-from-git + params: + - name: url + value: https://github.com/GoogleContainerTools/skaffold + - name: revision + value: v0.32.0 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: url + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "false" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/git-init + name: clone + script: |- + CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + if [[ "$(params.deleteExisting)" == "true" ]] ; then + cleandir + fi + /ko-app/git-init \ + -url "$(params.url)" \ + -revision "$(params.revision)" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="$(params.sslVerify)" \ + -submodules="$(params.submodules)" \ + -depth="$(params.depth)" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] + then + exit $EXIT_CODE + fi + # Make sure we don't add a trailing newline to the result! + echo -n "$RESULT_SHA" > $(results.commit.path) + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + workspaces: + - name: output + workspace: git-source + - name: skaffold-unit-tests + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - fetch-from-git + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: GOPATH + value: /workspace/go + image: golang + name: run-tests + script: |- + # The intention behind this example Task is to run unit test, however we + # currently do nothing to ensure that a unit test issue doesn't cause this example + # to fail unnecessarily. In the future we could re-introduce the unit tests (since + # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. + echo "pass" + workingDir: $(workspaces.source.path) + workspaces: + - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold + name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-web + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-web + - name: CONTEXT + value: examples/microservices/leeroy-web + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-app + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-app + - name: CONTEXT + value: examples/microservices/leeroy-app + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-app + params: + - name: imageURL + value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-web + params: + - name: imageURL + value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + workspaces: + - name: git-source + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/loadFileRefs: .* + creationTimestamp: null + name: demo-pipeline +spec: + pipelineSpec: + params: + - default: gcr.io/christiewilson-catfactory + name: image-registry + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: fetch-from-git + params: + - name: url + value: https://github.com/GoogleContainerTools/skaffold + - name: revision + value: v0.32.0 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: url + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "false" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/git-init + name: clone + script: |- + CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + if [[ "$(params.deleteExisting)" == "true" ]] ; then + cleandir + fi + /ko-app/git-init \ + -url "$(params.url)" \ + -revision "$(params.revision)" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="$(params.sslVerify)" \ + -submodules="$(params.submodules)" \ + -depth="$(params.depth)" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] + then + exit $EXIT_CODE + fi + # Make sure we don't add a trailing newline to the result! + echo -n "$RESULT_SHA" > $(results.commit.path) + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + workspaces: + - name: output + workspace: git-source + - name: skaffold-unit-tests + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - fetch-from-git + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: GOPATH + value: /workspace/go + image: golang + name: run-tests + script: |- + # The intention behind this example Task is to run unit test, however we + # currently do nothing to ensure that a unit test issue doesn't cause this example + # to fail unnecessarily. In the future we could re-introduce the unit tests (since + # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. + echo "pass" + workingDir: $(workspaces.source.path) + workspaces: + - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold + name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-web + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-web + - name: CONTEXT + value: examples/microservices/leeroy-web + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-app + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-app + - name: CONTEXT + value: examples/microservices/leeroy-app + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-app + params: + - name: imageURL + value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-web + params: + - name: imageURL + value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + workspaces: + - name: git-source + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: jx3-test-save-show-results +spec: + params: + - name: value_to_save + value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - default: "" + name: value_to_save + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: result_value + name: result_value + value: $(tasks.save-results.results.result_value) + tasks: + - name: save-results + params: + - name: value_to_save + value: test_demo + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: "" + name: value_to_save + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: result_value + name: result_value + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + imagePullPolicy: IfNotPresent + workingDir: /workspace/source + steps: + - computeResources: {} + image: ubuntu:jammy + name: save-result + script: | + #!/usr/bin/env sh + set -ex + result_value="$(params.value_to_save)" + echo "results.result_value.path is $(results.result_value.path)" + echo -n "${result_value}" > $(results.result_value.path) + echo "result_value is ${result_value}" + - name: display-results + params: + - name: value_to_show + value: $(tasks.save-results.results.result_value) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - save-results + taskSpec: + metadata: {} + params: + - default: "" + name: value_to_show + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + imagePullPolicy: IfNotPresent + workingDir: /workspace/source + steps: + - computeResources: {} + image: ubuntu:jammy + name: show-result + script: | + #!/usr/bin/env sh + set -ex + value_to_show="$(params.value_to_show)" + echo "value_to_show is ${value_to_show}" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 30m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: pullrequest +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: git-clone-env-pr + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/git-clone/git-clone-env-pr.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + - name: make-pr + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - git-clone-env-pr + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/environment/pullrequest/make-pr.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + - name: kubetest + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - make-pr + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/kubetest/environment.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + workspaces: + - name: pipeline-ws + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 12h0m0s + workspaces: + - name: pipeline-ws + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + computeResources: + requests: + storage: 1Gi + status: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/cloneURI: https://github.com/jenkins-x/jx.git + creationTimestamp: "2020-07-20T19:50:21Z" + generation: 1 + labels: + branch: PR-7463 + build: "17" + context: boot-vault + jenkins.io/pipelineType: build + lighthouse.jenkins-x.io/baseSHA: c47ce72d4e2991a9440e6d954ecbf79d596f9352 + lighthouse.jenkins-x.io/branch: PR-7463 + lighthouse.jenkins-x.io/buildNum: "17" + lighthouse.jenkins-x.io/context: boot-vault + lighthouse.jenkins-x.io/id: f46327af-b47e-11ea-b797-9256b7b8d9b0 + lighthouse.jenkins-x.io/lastCommitSHA: 8a3c5f595cdc3162e46390c72a5d22fb9c89d1df + lighthouse.jenkins-x.io/refs.org: jenkins-x + lighthouse.jenkins-x.io/refs.repo: jx + owner: jenkins-x + repository: jx + tekton.dev/pipeline: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + namespace: jx + resourceVersion: "16726271" + selfLink: /apis/tekton.dev/v1beta1/namespaces/jx/pipelineruns/jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + uid: 3edf18d1-cac2-11ea-a610-42010a8400cb +spec: + params: + - name: version + value: 0.0.0-SNAPSHOT-PR-7463-17 + - name: build_id + value: "17" + pipelineRef: + apiVersion: tekton.dev/v1beta1 + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/loadFileRefs: .* + creationTimestamp: null + name: pipelinerun-with-extra-params +spec: + params: + - name: pl-param-x + value: "100" + - name: pl-param-y + value: "200" + - name: pl-param-z + value: "300" + pipelineSpec: + params: + - name: pl-param-x + type: string + - name: pl-param-y + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: add-params + params: + - name: a + value: $(params.pl-param-x) + - name: b + value: $(params.pl-param-y) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: The first integer + name: a + type: string + - description: The second integer + name: b + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: bash:latest + name: sum + script: |- + #!/usr/bin/env bash + echo -n $(( "$(inputs.params.a)" + "$(inputs.params.b)" )) + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/appendStepsURL: https://gist.githubusercontent.com/jstrachan/1937a809fd4223f3588db32cbb3a034f/raw/3bb56dd20cae2795e0ec4788d79e18d9486da9d9/sample-git-clone-task.yaml + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: some/linter:1.2.3 + name: lint + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + script: | + #!/usr/bin/env bash + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/defaultParameters: "false" + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + tasks: + - name: cheese + taskSpec: + metadata: {} + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $(params.REPO_URL) $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + - --verbose + - --baseSHA + - $(params.PULL_BASE_SHA) + - --sha + - $(params.PULL_PULL_SHA) + - --baseBranch + - $(params.PULL_BASE_REF) + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: REPO_URL + value: "" + - name: PULL_PULL_SHA + value: master + - name: subdirectory + value: source + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: master + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + pipelineSpec: + params: + - description: git url to clone + name: REPO_URL + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: source + description: subdirectory inside of /workspace to clone the git repo + name: subdirectory + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: 'the kind of job: postsubmit or presubmit' + name: JOB_TYPE + type: string + - default: master + description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + tasks: + - name: cheese + params: + - name: REPO_URL + value: $(params.REPO_URL) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: subdirectory + value: $(params.subdirectory) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: REPO_URL + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: source + description: subdirectory inside of /workspace to clone the git repo + name: subdirectory + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: 'the kind of job: postsubmit or presubmit' + name: JOB_TYPE + type: string + - default: master + description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $(params.REPO_URL) $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + - --verbose + - --baseSHA + - $(params.PULL_BASE_SHA) + - --sha + - $(params.PULL_PULL_SHA) + - --baseBranch + - $(params.PULL_BASE_REF) + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/prependStepsURL: https://gist.githubusercontent.com/jstrachan/1937a809fd4223f3588db32cbb3a034f/raw/3bb56dd20cae2795e0ec4788d79e18d9486da9d9/sample-git-clone-task.yaml + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + script: | + #!/usr/bin/env bash + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: some/linter:1.2.3 + name: lint + workingDir: /workspace/source + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - default: param-value + name: PARAM + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: PARAM + value: $(params.PARAM) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: param-value + name: PARAM + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ubuntu + name: noshebang + script: echo "no shebang" + - computeResources: {} + env: + - name: FOO + value: foooooooo + image: ubuntu + name: bash + script: | + #!/usr/bin/env bash + set -euxo pipefail + echo "Hello from Bash!" + echo FOO is ${FOO} + echo substring is ${FOO:2:4} + for i in {1..10}; do + echo line $i + done + - computeResources: {} + image: ubuntu + name: place-file + script: | + #!/usr/bin/env bash + echo "echo Hello from script file" > /workspace/hello + chmod +x /workspace/hello + - computeResources: {} + image: ubuntu + name: run-file + script: | + #!/usr/bin/env bash + /workspace/hello + - computeResources: {} + image: ubuntu + name: contains-eof + script: | + #!/usr/bin/env bash + cat > file << EOF + this file has some contents + EOF + cat file + - computeResources: {} + image: node + name: node + script: | + #!/usr/bin/env node + console.log("Hello from Node!") + - computeResources: {} + image: python + name: python + script: | + #!/usr/bin/env python3 + print("Hello from Python!") + - computeResources: {} + image: perl + name: perl + script: | + #!/usr/bin/perl + print "Hello from Perl!" + - computeResources: {} + image: python + name: params-applied + script: | + #!/usr/bin/env python3 + v = '$(params.PARAM)' + if v != 'param-value': + print('Param values not applied') + print('Got: ', v) + exit(1) + - args: + - hello + - world + computeResources: {} + image: ubuntu + name: args-allowed + script: |- + #!/usr/bin/env bash + [[ $# == 2 ]] + [[ $1 == "hello" ]] + [[ $2 == "world" ]] + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $REPO_URL + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.62 + name: git-merge + script: | + #!/usr/bin/env sh + jx gitops git merge variables + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: params +spec: + params: + - name: FOO + value: BAR-CATALOG + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: test-params + params: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 + name: test-echo + script: |- + #!/usr/bin/env bash + echo "FOO: $(params.FOO)" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: params +spec: + params: + - name: FOO + value: BAR-CATALOG + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: test-params + params: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + - name: FOO + value: $(params.FOO) + steps: + - computeResources: {} + image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 + name: test-echo + script: |- + #!/usr/bin/env bash + echo "FOO: $(params.FOO)" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: foo + image: common-image + name: common-build + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: one + image: common-image + name: common-build + taskRunTemplate: {} + timeouts: + pipeline: 240h0m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: node:12-slim + name: my-first-step + script: | + #!/bin/sh + npm first thing + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: node:12-slim + name: my-pre-build-container + script: | + #!/bin/sh + npm pre build container + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: node:12-slim + name: my-final-step + script: | + #!/bin/sh + npm final thing + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: node:12-slim + name: my-first-step + script: | + #!/bin/sh + npm first thing + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: node:12-slim + name: my-pre-build-container + script: | + #!/bin/sh + npm pre build container + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: node:12-slim + name: my-final-step + script: | + #!/bin/sh + npm final thing + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: url + value: "" + - name: revision + value: "" + - name: refspec + value: "" + - name: submodules + value: "true" + - name: depth + value: "1" + - name: sslVerify + value: "true" + - name: subdirectory + value: "" + - name: deleteExisting + value: "true" + - name: httpProxy + value: "" + - name: httpsProxy + value: "" + - name: noProxy + value: "" + - name: verbose + value: "true" + - name: gitInitImage + value: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: git url to clone + name: url + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "" + description: (optional) git refspec to fetch before checking out revision + name: refspec + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "true" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - default: "" + description: git HTTP proxy server for non-SSL requests + name: httpProxy + type: string + - default: "" + description: git HTTPS proxy server for SSL requests + name: httpsProxy + type: string + - default: "" + description: git no proxy - opt out of proxying HTTP/HTTPS requests + name: noProxy + type: string + - default: "true" + description: log the commands used during execution + name: verbose + type: string + - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + description: the image used where the git-init binary is + name: gitInitImage + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + value: $(tasks.from-build-pack.results.commit) + - description: The precise URL that was fetched by this Task + name: url + value: $(tasks.from-build-pack.results.url) + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: git url to clone + name: url + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "" + description: (optional) git refspec to fetch before checking out revision + name: refspec + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "true" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - default: "" + description: git HTTP proxy server for non-SSL requests + name: httpProxy + type: string + - default: "" + description: git HTTPS proxy server for SSL requests + name: httpsProxy + type: string + - default: "" + description: git no proxy - opt out of proxying HTTP/HTTPS requests + name: noProxy + type: string + - default: "true" + description: log the commands used during execution + name: verbose + type: string + - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + description: the image used where the git-init binary is + name: gitInitImage + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + - description: The precise URL that was fetched by this Task + name: url + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + env: + - name: PARAM_URL + value: $(params.url) + - name: PARAM_REVISION + value: $(params.revision) + - name: PARAM_REFSPEC + value: $(params.refspec) + - name: PARAM_SUBMODULES + value: $(params.submodules) + - name: PARAM_DEPTH + value: $(params.depth) + - name: PARAM_SSL_VERIFY + value: $(params.sslVerify) + - name: PARAM_SUBDIRECTORY + value: $(params.subdirectory) + - name: PARAM_DELETE_EXISTING + value: $(params.deleteExisting) + - name: PARAM_HTTP_PROXY + value: $(params.httpProxy) + - name: PARAM_HTTPS_PROXY + value: $(params.httpsProxy) + - name: PARAM_NO_PROXY + value: $(params.noProxy) + - name: PARAM_VERBOSE + value: $(params.verbose) + - name: WORKSPACE_OUTPUT_PATH + value: $(workspaces.output.path) + image: $(params.gitInitImage) + name: clone + script: | + #!/bin/sh + set -eu -o pipefail + + if [[ "${PARAM_VERBOSE}" == "true" ]] ; then + set -x + fi + + CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" + + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + + if [[ "${PARAM_DELETE_EXISTING}" == "true" ]] ; then + cleandir + fi + + test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" + test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" + test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" + + /ko-app/git-init \ + -url "${PARAM_URL}" \ + -revision "${PARAM_REVISION}" \ + -refspec "${PARAM_REFSPEC}" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="${PARAM_SSL_VERIFY}" \ + -submodules="${PARAM_SUBMODULES}" \ + -depth "${PARAM_DEPTH}" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD)" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] ; then + exit $EXIT_CODE + fi + # ensure we don't add a trailing newline to the result + echo -n "$RESULT_SHA" > $(results.commit.path) + echo -n "${PARAM_URL}" > $(results.url.path) + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s + workspaces: + - emptyDir: {} + name: output +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + env: + - name: START_XVFB + value: "false" + image: selenium/standalone-chrome + name: selenium + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + env: + - name: IMAGE + value: gcr.io/myproject/myimage + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build-cheese + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + env: + - name: IMAGE + value: gcr.io/myproject/wine + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build-wine + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + env: + - name: MY_NEW_ENV_VAR + value: this-is-a-new-value + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + envFrom: + - configMapRef: + name: myconfigmap + optional: true + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/usr/bin/env sh + echo "this is my custom script" + workingDir: /workspace/mynewdir + - args: + - -c + - echo this is a new custom command + command: + - bash + computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumeMounts: + - mountPath: /foo/bar + name: my-new-volume + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 600m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm-something-else + name: npmrc + workingDir: /workspace/my-source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.62 + name: git-merge + script: | + #!/usr/bin/env sh + jx gitops git merge variables + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - command: + - jx-updatebot + - pr + computeResources: {} + image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 + name: promote-release + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 + name: promote-release + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx updatebot argo promote --target-git-url https://github.com/myorg/my-staging-repo + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:latest + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + env: + - name: START_XVFB + value: "false" + image: selenium/standalone-chrome + name: selenium + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: pullrequest +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + image: xyz/json-server:0.1.15 + name: json-server + script: | + #!/bin/ash + while [ ! -f /workspace/source/JsonServer/mocks.json ] ; do + echo "Waiting for mocks.json" + sleep 1 + done + json-server --watch /workspace/source/JsonServer/mocks.json + workspaces: + - mountPath: "" + name: source + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_BASE_SHA + echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:14-slim + name: "" + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + yarn install + CI=true DISPLAY=:99 yarn run test:unit + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + - name: source + workspaces: + - name: source + workspace: source + - name: output + workspace: output + workspaces: - name: source - workspace: git-source - - name: deploy-app - params: - - name: imageURL - value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) - - name: path - value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml - - name: yqArg - value: -d1 - - name: yamlPathToImage - value: spec.template.spec.containers[0].image - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskRef: - name: demo-deploy-kubectl - workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 12h0m0s + workspaces: + - emptyDir: {} + name: source + - emptyDir: {} + name: output +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: release +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: _JAVA_OPTIONS + value: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Xms10m -Xmx192m + - name: MAVEN_OPTS + value: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /root/.m2/ + name: maven-settings + - mountPath: /root/.gnupg + name: release-gpg + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_BASE_SHA + echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-release-version:2.2.5 + name: next-version + script: | + #!/usr/bin/env sh + jx-release-version > VERSION + - computeResources: {} + image: ghcr.io/jenkins-x/jx-boot:3.1.335 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: maven:3.6-openjdk-11 + name: build-mvn-deploy + script: | + #!/usr/bin/env bash + source .jx/variables.sh + + # modify the pom.xml + echo "upgrading the pom to version $VERSION" + mvn versions:set -DnewVersion=$VERSION + + mvn --no-transfer-progress clean deploy + - computeResources: {} + image: gcr.io/jenkinsxio/jx-registry:0.0.11 + name: check-registry + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$PUSH_CONTAINER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-changelog:0.0.34 + name: promote-changelog + script: | + #!/usr/bin/env sh + source .jx/variables.sh + + if [ -d "charts/$REPO_NAME" ]; then + sed -i -e "s/^version:.*/version: $VERSION/" ./charts/$REPO_NAME/Chart.yaml + sed -i -e "s/repository:.*/repository: $DOCKER_REGISTRY\/$DOCKER_REGISTRY_ORG\/$APP_NAME/" ./charts/$REPO_NAME/values.yaml + sed -i -e "s/tag:.*/tag: $VERSION/" ./charts/$REPO_NAME/values.yaml; + else echo no charts; fi + + jx changelog create --version v${VERSION} + + git add * || true + git commit -a -m "chore: release $VERSION" --allow-empty + git tag -fa v$VERSION -m "Release version $VERSION" + git push --force origin v$VERSION + - computeResources: {} + image: ghcr.io/jenkins-x/jx-boot:3.1.335 + name: promote-helm-release + script: | + #!/usr/bin/env sh + jx gitops helm release + - computeResources: {} + image: ghcr.io/jenkins-x/jx-promote:0.0.243 + name: promote-jx-promote + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx promote -b --all --timeout 1h --no-poll + volumes: + - name: maven-settings + secret: + secretName: jenkins-maven-settings + - name: release-gpg + secret: + optional: true + secretName: jenkins-release-gpg + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s + workspaces: + - emptyDir: {} + name: output +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + finally: + - name: lint-pr-comment + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ghcr.io/jenkins-x/jx-gitops:0.3.1 + name: lint-pr-comment + script: | + #!/bin/sh + set -x + . .jx/variables.sh + jx gitops pr comment -c "$(cat issues.md)" + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: one + image: common-image + name: common-build + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + finally: + - name: from-build-pack-finally + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: finally + image: common-image + name: common-build + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: foo + image: common-image + name: common-build + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/loadFileRefs: .* + creationTimestamp: null + name: demo-pipeline +spec: + pipelineSpec: + params: + - default: gcr.io/christiewilson-catfactory + name: image-registry + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: fetch-from-git + params: + - name: url + value: https://github.com/GoogleContainerTools/skaffold + - name: revision + value: v0.32.0 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: url + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "false" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/git-init + name: clone + script: |- + CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + if [[ "$(params.deleteExisting)" == "true" ]] ; then + cleandir + fi + /ko-app/git-init \ + -url "$(params.url)" \ + -revision "$(params.revision)" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="$(params.sslVerify)" \ + -submodules="$(params.submodules)" \ + -depth="$(params.depth)" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] + then + exit $EXIT_CODE + fi + # Make sure we don't add a trailing newline to the result! + echo -n "$RESULT_SHA" > $(results.commit.path) + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + workspaces: + - name: output + workspace: git-source + - name: skaffold-unit-tests + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - fetch-from-git + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: GOPATH + value: /workspace/go + image: golang + name: run-tests + script: |- + # The intention behind this example Task is to run unit test, however we + # currently do nothing to ensure that a unit test issue doesn't cause this example + # to fail unnecessarily. In the future we could re-introduce the unit tests (since + # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. + echo "pass" + workingDir: $(workspaces.source.path) + workspaces: + - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold + name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-web + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-web + - name: CONTEXT + value: examples/microservices/leeroy-web + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-app + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-app + - name: CONTEXT + value: examples/microservices/leeroy-app + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-app + params: + - name: imageURL + value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-web + params: + - name: imageURL + value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + workspaces: + - name: git-source + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/loadFileRefs: .* + creationTimestamp: null + name: demo-pipeline +spec: + pipelineSpec: + params: + - default: gcr.io/christiewilson-catfactory + name: image-registry + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: fetch-from-git + params: + - name: url + value: https://github.com/GoogleContainerTools/skaffold + - name: revision + value: v0.32.0 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: url + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "false" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/git-init + name: clone + script: |- + CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + if [[ "$(params.deleteExisting)" == "true" ]] ; then + cleandir + fi + /ko-app/git-init \ + -url "$(params.url)" \ + -revision "$(params.revision)" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="$(params.sslVerify)" \ + -submodules="$(params.submodules)" \ + -depth="$(params.depth)" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] + then + exit $EXIT_CODE + fi + # Make sure we don't add a trailing newline to the result! + echo -n "$RESULT_SHA" > $(results.commit.path) + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + workspaces: + - name: output + workspace: git-source + - name: skaffold-unit-tests + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - fetch-from-git + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: GOPATH + value: /workspace/go + image: golang + name: run-tests + script: |- + # The intention behind this example Task is to run unit test, however we + # currently do nothing to ensure that a unit test issue doesn't cause this example + # to fail unnecessarily. In the future we could re-introduce the unit tests (since + # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. + echo "pass" + workingDir: $(workspaces.source.path) + workspaces: + - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold + name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-web + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-web + - name: CONTEXT + value: examples/microservices/leeroy-web + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-app + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-app + - name: CONTEXT + value: examples/microservices/leeroy-app + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-app + params: + - name: imageURL + value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-web + params: + - name: imageURL + value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + workspaces: + - name: git-source + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: jx3-test-save-show-results +spec: + params: + - name: value_to_save + value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - default: "" + name: value_to_save + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: result_value + name: result_value + value: $(tasks.save-results.results.result_value) + tasks: + - name: save-results + params: + - name: value_to_save + value: test_demo + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: "" + name: value_to_save + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: result_value + name: result_value + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + imagePullPolicy: IfNotPresent + workingDir: /workspace/source + steps: + - computeResources: {} + image: ubuntu:jammy + name: save-result + script: | + #!/usr/bin/env sh + set -ex + result_value="$(params.value_to_save)" + echo "results.result_value.path is $(results.result_value.path)" + echo -n "${result_value}" > $(results.result_value.path) + echo "result_value is ${result_value}" + - name: display-results + params: + - name: value_to_show + value: $(tasks.save-results.results.result_value) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - save-results + taskSpec: + metadata: {} + params: + - default: "" + name: value_to_show + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + imagePullPolicy: IfNotPresent + workingDir: /workspace/source + steps: + - computeResources: {} + image: ubuntu:jammy + name: show-result + script: | + #!/usr/bin/env sh + set -ex + value_to_show="$(params.value_to_show)" + echo "value_to_show is ${value_to_show}" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 30m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: pullrequest +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: git-clone-env-pr + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/git-clone/git-clone-env-pr.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + - name: make-pr + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - git-clone-env-pr + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/environment/pullrequest/make-pr.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + - name: kubetest + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - make-pr + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/kubetest/environment.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + workspaces: + - name: pipeline-ws + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 12h0m0s + workspaces: + - name: pipeline-ws + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + computeResources: + requests: + storage: 1Gi + status: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/cloneURI: https://github.com/jenkins-x/jx.git + creationTimestamp: "2020-07-20T19:50:21Z" + generation: 1 + labels: + branch: PR-7463 + build: "17" + context: boot-vault + jenkins.io/pipelineType: build + lighthouse.jenkins-x.io/baseSHA: c47ce72d4e2991a9440e6d954ecbf79d596f9352 + lighthouse.jenkins-x.io/branch: PR-7463 + lighthouse.jenkins-x.io/buildNum: "17" + lighthouse.jenkins-x.io/context: boot-vault + lighthouse.jenkins-x.io/id: f46327af-b47e-11ea-b797-9256b7b8d9b0 + lighthouse.jenkins-x.io/lastCommitSHA: 8a3c5f595cdc3162e46390c72a5d22fb9c89d1df + lighthouse.jenkins-x.io/refs.org: jenkins-x + lighthouse.jenkins-x.io/refs.repo: jx + owner: jenkins-x + repository: jx + tekton.dev/pipeline: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + namespace: jx + resourceVersion: "16726271" + selfLink: /apis/tekton.dev/v1beta1/namespaces/jx/pipelineruns/jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + uid: 3edf18d1-cac2-11ea-a610-42010a8400cb +spec: + params: + - name: version + value: 0.0.0-SNAPSHOT-PR-7463-17 + - name: build_id + value: "17" + pipelineRef: + apiVersion: tekton.dev/v1beta1 + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/loadFileRefs: .* + creationTimestamp: null + name: pipelinerun-with-extra-params +spec: + params: + - name: pl-param-x + value: "100" + - name: pl-param-y + value: "200" + - name: pl-param-z + value: "300" + pipelineSpec: + params: + - name: pl-param-x + type: string + - name: pl-param-y + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: add-params + params: + - name: a + value: $(params.pl-param-x) + - name: b + value: $(params.pl-param-y) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: The first integer + name: a + type: string + - description: The second integer + name: b + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: bash:latest + name: sum + script: |- + #!/usr/bin/env bash + echo -n $(( "$(inputs.params.a)" + "$(inputs.params.b)" )) + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/appendStepsURL: https://gist.githubusercontent.com/jstrachan/1937a809fd4223f3588db32cbb3a034f/raw/3bb56dd20cae2795e0ec4788d79e18d9486da9d9/sample-git-clone-task.yaml + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: some/linter:1.2.3 + name: lint + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + script: | + #!/usr/bin/env bash + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/defaultParameters: "false" + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + tasks: + - name: cheese + taskSpec: + metadata: {} + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $(params.REPO_URL) $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + - --verbose + - --baseSHA + - $(params.PULL_BASE_SHA) + - --sha + - $(params.PULL_PULL_SHA) + - --baseBranch + - $(params.PULL_BASE_REF) + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: REPO_URL + value: "" + - name: PULL_PULL_SHA + value: master + - name: subdirectory + value: source + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: master + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + pipelineSpec: + params: + - description: git url to clone + name: REPO_URL + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: source + description: subdirectory inside of /workspace to clone the git repo + name: subdirectory + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: 'the kind of job: postsubmit or presubmit' + name: JOB_TYPE + type: string + - default: master + description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + tasks: + - name: cheese + params: + - name: REPO_URL + value: $(params.REPO_URL) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: subdirectory + value: $(params.subdirectory) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: REPO_URL + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: source + description: subdirectory inside of /workspace to clone the git repo + name: subdirectory + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: 'the kind of job: postsubmit or presubmit' + name: JOB_TYPE + type: string + - default: master + description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $(params.REPO_URL) $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + - --verbose + - --baseSHA + - $(params.PULL_BASE_SHA) + - --sha + - $(params.PULL_PULL_SHA) + - --baseBranch + - $(params.PULL_BASE_REF) + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/prependStepsURL: https://gist.githubusercontent.com/jstrachan/1937a809fd4223f3588db32cbb3a034f/raw/3bb56dd20cae2795e0ec4788d79e18d9486da9d9/sample-git-clone-task.yaml + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + script: | + #!/usr/bin/env bash + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: some/linter:1.2.3 + name: lint + workingDir: /workspace/source + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - default: param-value + name: PARAM + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: PARAM + value: $(params.PARAM) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: param-value + name: PARAM + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ubuntu + name: noshebang + script: echo "no shebang" + - computeResources: {} + env: + - name: FOO + value: foooooooo + image: ubuntu + name: bash + script: | + #!/usr/bin/env bash + set -euxo pipefail + echo "Hello from Bash!" + echo FOO is ${FOO} + echo substring is ${FOO:2:4} + for i in {1..10}; do + echo line $i + done + - computeResources: {} + image: ubuntu + name: place-file + script: | + #!/usr/bin/env bash + echo "echo Hello from script file" > /workspace/hello + chmod +x /workspace/hello + - computeResources: {} + image: ubuntu + name: run-file + script: | + #!/usr/bin/env bash + /workspace/hello + - computeResources: {} + image: ubuntu + name: contains-eof + script: | + #!/usr/bin/env bash + cat > file << EOF + this file has some contents + EOF + cat file + - computeResources: {} + image: node + name: node + script: | + #!/usr/bin/env node + console.log("Hello from Node!") + - computeResources: {} + image: python + name: python + script: | + #!/usr/bin/env python3 + print("Hello from Python!") + - computeResources: {} + image: perl + name: perl + script: | + #!/usr/bin/perl + print "Hello from Perl!" + - computeResources: {} + image: python + name: params-applied + script: | + #!/usr/bin/env python3 + v = '$(params.PARAM)' + if v != 'param-value': + print('Param values not applied') + print('Got: ', v) + exit(1) + - args: + - hello + - world + computeResources: {} + image: ubuntu + name: args-allowed + script: |- + #!/usr/bin/env bash + [[ $# == 2 ]] + [[ $1 == "hello" ]] + [[ $2 == "world" ]] + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $REPO_URL + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.62 + name: git-merge + script: | + #!/usr/bin/env sh + jx gitops git merge variables + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: params +spec: + params: + - name: FOO + value: BAR-CATALOG + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: test-params + params: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 + name: test-echo + script: |- + #!/usr/bin/env bash + echo "FOO: $(params.FOO)" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: params +spec: + params: + - name: FOO + value: BAR-CATALOG + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: test-params + params: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + - name: FOO + value: $(params.FOO) + steps: + - computeResources: {} + image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 + name: test-echo + script: |- + #!/usr/bin/env bash + echo "FOO: $(params.FOO)" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: foo + image: common-image + name: common-build + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: one + image: common-image + name: common-build + taskRunTemplate: {} + timeouts: + pipeline: 240h0m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: node:12-slim + name: my-first-step + script: | + #!/bin/sh + npm first thing + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: node:12-slim + name: my-pre-build-container + script: | + #!/bin/sh + npm pre build container + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: node:12-slim + name: my-final-step + script: | + #!/bin/sh + npm final thing + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: node:12-slim + name: my-first-step + script: | + #!/bin/sh + npm first thing + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: node:12-slim + name: my-pre-build-container + script: | + #!/bin/sh + npm pre build container + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: node:12-slim + name: my-final-step + script: | + #!/bin/sh + npm final thing + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: url + value: "" + - name: revision + value: "" + - name: refspec + value: "" + - name: submodules + value: "true" + - name: depth + value: "1" + - name: sslVerify + value: "true" + - name: subdirectory + value: "" + - name: deleteExisting + value: "true" + - name: httpProxy + value: "" + - name: httpsProxy + value: "" + - name: noProxy + value: "" + - name: verbose + value: "true" + - name: gitInitImage + value: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: git url to clone + name: url + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "" + description: (optional) git refspec to fetch before checking out revision + name: refspec + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "true" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - default: "" + description: git HTTP proxy server for non-SSL requests + name: httpProxy + type: string + - default: "" + description: git HTTPS proxy server for SSL requests + name: httpsProxy + type: string + - default: "" + description: git no proxy - opt out of proxying HTTP/HTTPS requests + name: noProxy + type: string + - default: "true" + description: log the commands used during execution + name: verbose + type: string + - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + description: the image used where the git-init binary is + name: gitInitImage + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + value: $(tasks.from-build-pack.results.commit) + - description: The precise URL that was fetched by this Task + name: url + value: $(tasks.from-build-pack.results.url) + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: git url to clone + name: url + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "" + description: (optional) git refspec to fetch before checking out revision + name: refspec + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "true" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - default: "" + description: git HTTP proxy server for non-SSL requests + name: httpProxy + type: string + - default: "" + description: git HTTPS proxy server for SSL requests + name: httpsProxy + type: string + - default: "" + description: git no proxy - opt out of proxying HTTP/HTTPS requests + name: noProxy + type: string + - default: "true" + description: log the commands used during execution + name: verbose + type: string + - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + description: the image used where the git-init binary is + name: gitInitImage + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + - description: The precise URL that was fetched by this Task + name: url + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + env: + - name: PARAM_URL + value: $(params.url) + - name: PARAM_REVISION + value: $(params.revision) + - name: PARAM_REFSPEC + value: $(params.refspec) + - name: PARAM_SUBMODULES + value: $(params.submodules) + - name: PARAM_DEPTH + value: $(params.depth) + - name: PARAM_SSL_VERIFY + value: $(params.sslVerify) + - name: PARAM_SUBDIRECTORY + value: $(params.subdirectory) + - name: PARAM_DELETE_EXISTING + value: $(params.deleteExisting) + - name: PARAM_HTTP_PROXY + value: $(params.httpProxy) + - name: PARAM_HTTPS_PROXY + value: $(params.httpsProxy) + - name: PARAM_NO_PROXY + value: $(params.noProxy) + - name: PARAM_VERBOSE + value: $(params.verbose) + - name: WORKSPACE_OUTPUT_PATH + value: $(workspaces.output.path) + image: $(params.gitInitImage) + name: clone + script: | + #!/bin/sh + set -eu -o pipefail + + if [[ "${PARAM_VERBOSE}" == "true" ]] ; then + set -x + fi + + CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" + + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + + if [[ "${PARAM_DELETE_EXISTING}" == "true" ]] ; then + cleandir + fi + + test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" + test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" + test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" + + /ko-app/git-init \ + -url "${PARAM_URL}" \ + -revision "${PARAM_REVISION}" \ + -refspec "${PARAM_REFSPEC}" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="${PARAM_SSL_VERIFY}" \ + -submodules="${PARAM_SUBMODULES}" \ + -depth "${PARAM_DEPTH}" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD)" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] ; then + exit $EXIT_CODE + fi + # ensure we don't add a trailing newline to the result + echo -n "$RESULT_SHA" > $(results.commit.path) + echo -n "${PARAM_URL}" > $(results.url.path) + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s + workspaces: + - emptyDir: {} + name: output +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + env: + - name: START_XVFB + value: "false" + image: selenium/standalone-chrome + name: selenium + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + env: + - name: IMAGE + value: gcr.io/myproject/myimage + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build-cheese + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + env: + - name: IMAGE + value: gcr.io/myproject/wine + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build-wine + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + env: + - name: MY_NEW_ENV_VAR + value: this-is-a-new-value + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + envFrom: + - configMapRef: + name: myconfigmap + optional: true + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/usr/bin/env sh + echo "this is my custom script" + workingDir: /workspace/mynewdir + - args: + - -c + - echo this is a new custom command + command: + - bash + computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumeMounts: + - mountPath: /foo/bar + name: my-new-volume + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 600m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm-something-else + name: npmrc + workingDir: /workspace/my-source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.62 + name: git-merge + script: | + #!/usr/bin/env sh + jx gitops git merge variables + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - command: + - jx-updatebot + - pr + computeResources: {} + image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 + name: promote-release + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 + name: promote-release + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx updatebot argo promote --target-git-url https://github.com/myorg/my-staging-repo + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:latest + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + env: + - name: START_XVFB + value: "false" + image: selenium/standalone-chrome + name: selenium + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: pullrequest +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + image: xyz/json-server:0.1.15 + name: json-server + script: | + #!/bin/ash + while [ ! -f /workspace/source/JsonServer/mocks.json ] ; do + echo "Waiting for mocks.json" + sleep 1 + done + json-server --watch /workspace/source/JsonServer/mocks.json + workspaces: + - mountPath: "" + name: source + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_BASE_SHA + echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:14-slim + name: "" + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + yarn install + CI=true DISPLAY=:99 yarn run test:unit + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + - name: source + workspaces: + - name: source + workspace: source + - name: output + workspace: output + workspaces: - name: source - workspace: git-source - - name: deploy-web - params: - - name: imageURL - value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) - - name: path - value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml - - name: yqArg - value: -d1 - - name: yamlPathToImage - value: spec.template.spec.containers[0].image - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskRef: - name: demo-deploy-kubectl - workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 12h0m0s + workspaces: + - emptyDir: {} + name: source + - emptyDir: {} + name: output +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: release +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: _JAVA_OPTIONS + value: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Xms10m -Xmx192m + - name: MAVEN_OPTS + value: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /root/.m2/ + name: maven-settings + - mountPath: /root/.gnupg + name: release-gpg + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_BASE_SHA + echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-release-version:2.2.5 + name: next-version + script: | + #!/usr/bin/env sh + jx-release-version > VERSION + - computeResources: {} + image: ghcr.io/jenkins-x/jx-boot:3.1.335 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: maven:3.6-openjdk-11 + name: build-mvn-deploy + script: | + #!/usr/bin/env bash + source .jx/variables.sh + + # modify the pom.xml + echo "upgrading the pom to version $VERSION" + mvn versions:set -DnewVersion=$VERSION + + mvn --no-transfer-progress clean deploy + - computeResources: {} + image: gcr.io/jenkinsxio/jx-registry:0.0.11 + name: check-registry + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$PUSH_CONTAINER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-changelog:0.0.34 + name: promote-changelog + script: | + #!/usr/bin/env sh + source .jx/variables.sh + + if [ -d "charts/$REPO_NAME" ]; then + sed -i -e "s/^version:.*/version: $VERSION/" ./charts/$REPO_NAME/Chart.yaml + sed -i -e "s/repository:.*/repository: $DOCKER_REGISTRY\/$DOCKER_REGISTRY_ORG\/$APP_NAME/" ./charts/$REPO_NAME/values.yaml + sed -i -e "s/tag:.*/tag: $VERSION/" ./charts/$REPO_NAME/values.yaml; + else echo no charts; fi + + jx changelog create --version v${VERSION} + + git add * || true + git commit -a -m "chore: release $VERSION" --allow-empty + git tag -fa v$VERSION -m "Release version $VERSION" + git push --force origin v$VERSION + - computeResources: {} + image: ghcr.io/jenkins-x/jx-boot:3.1.335 + name: promote-helm-release + script: | + #!/usr/bin/env sh + jx gitops helm release + - computeResources: {} + image: ghcr.io/jenkins-x/jx-promote:0.0.243 + name: promote-jx-promote + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx promote -b --all --timeout 1h --no-poll + volumes: + - name: maven-settings + secret: + secretName: jenkins-maven-settings + - name: release-gpg + secret: + optional: true + secretName: jenkins-release-gpg + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s + workspaces: + - emptyDir: {} + name: output +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + finally: + - name: lint-pr-comment + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ghcr.io/jenkins-x/jx-gitops:0.3.1 + name: lint-pr-comment + script: | + #!/bin/sh + set -x + . .jx/variables.sh + jx gitops pr comment -c "$(cat issues.md)" + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: one + image: common-image + name: common-build + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + finally: + - name: from-build-pack-finally + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: finally + image: common-image + name: common-build + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: foo + image: common-image + name: common-build + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/loadFileRefs: .* + creationTimestamp: null + name: demo-pipeline +spec: + pipelineSpec: + params: + - default: gcr.io/christiewilson-catfactory + name: image-registry + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: fetch-from-git + params: + - name: url + value: https://github.com/GoogleContainerTools/skaffold + - name: revision + value: v0.32.0 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: url + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "false" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/git-init + name: clone + script: |- + CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + if [[ "$(params.deleteExisting)" == "true" ]] ; then + cleandir + fi + /ko-app/git-init \ + -url "$(params.url)" \ + -revision "$(params.revision)" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="$(params.sslVerify)" \ + -submodules="$(params.submodules)" \ + -depth="$(params.depth)" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] + then + exit $EXIT_CODE + fi + # Make sure we don't add a trailing newline to the result! + echo -n "$RESULT_SHA" > $(results.commit.path) + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + workspaces: + - name: output + workspace: git-source + - name: skaffold-unit-tests + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - fetch-from-git + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: GOPATH + value: /workspace/go + image: golang + name: run-tests + script: |- + # The intention behind this example Task is to run unit test, however we + # currently do nothing to ensure that a unit test issue doesn't cause this example + # to fail unnecessarily. In the future we could re-introduce the unit tests (since + # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. + echo "pass" + workingDir: $(workspaces.source.path) + workspaces: + - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold + name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-web + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-web + - name: CONTEXT + value: examples/microservices/leeroy-web + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-app + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-app + - name: CONTEXT + value: examples/microservices/leeroy-app + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-app + params: + - name: imageURL + value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-web + params: + - name: imageURL + value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + workspaces: + - name: git-source + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/loadFileRefs: .* + creationTimestamp: null + name: demo-pipeline +spec: + pipelineSpec: + params: + - default: gcr.io/christiewilson-catfactory + name: image-registry + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: fetch-from-git + params: + - name: url + value: https://github.com/GoogleContainerTools/skaffold + - name: revision + value: v0.32.0 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: url + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "false" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/git-init + name: clone + script: |- + CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)" + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + if [[ "$(params.deleteExisting)" == "true" ]] ; then + cleandir + fi + /ko-app/git-init \ + -url "$(params.url)" \ + -revision "$(params.revision)" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="$(params.sslVerify)" \ + -submodules="$(params.submodules)" \ + -depth="$(params.depth)" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] + then + exit $EXIT_CODE + fi + # Make sure we don't add a trailing newline to the result! + echo -n "$RESULT_SHA" > $(results.commit.path) + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + workspaces: + - name: output + workspace: git-source + - name: skaffold-unit-tests + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - fetch-from-git + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: GOPATH + value: /workspace/go + image: golang + name: run-tests + script: |- + # The intention behind this example Task is to run unit test, however we + # currently do nothing to ensure that a unit test issue doesn't cause this example + # to fail unnecessarily. In the future we could re-introduce the unit tests (since + # we are now pinning the version of Skaffold we pull) or use Tekton Pipelines unit tests. + echo "pass" + workingDir: $(workspaces.source.path) + workspaces: + - mountPath: /workspace/source/go/src/github.com/GoogleContainerTools/skaffold + name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-web + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-web + - name: CONTEXT + value: examples/microservices/leeroy-web + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-web/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: build-skaffold-app + params: + - name: IMAGE + value: $(params.image-registry)/leeroy-app + - name: CONTEXT + value: examples/microservices/leeroy-app + - name: DOCKERFILE + value: $(workspaces.source.path)/examples/microservices/leeroy-app/Dockerfile + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - skaffold-unit-tests + taskSpec: + metadata: {} + params: + - description: Name (reference) of the image to build. + name: IMAGE + type: string + - default: ./Dockerfile + description: Path to the Dockerfile to build. + name: DOCKERFILE + type: string + - default: ./ + description: The build context used by Kaniko. + name: CONTEXT + type: string + - default: "" + name: EXTRA_ARGS + type: string + - default: gcr.io/kaniko-project/executor:latest + description: The image on which builds will run + name: BUILDER_IMAGE + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: Digest of the image just built. + name: IMAGE_DIGEST + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - command: + - /kaniko/executor + - $(params.EXTRA_ARGS) + - --dockerfile=$(params.DOCKERFILE) + - --context=$(workspaces.source.path)/$(params.CONTEXT) + - --destination=$(params.IMAGE) + - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest + computeResources: {} + env: + - name: DOCKER_CONFIG + value: /tekton/home/.docker + image: $(params.BUILDER_IMAGE) + name: build-and-push + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - args: + - -images=[{"name":"$(params.IMAGE)","type":"image","url":"$(params.IMAGE)","digest":"","OutputImageDir":"$(workspaces.source.path)/$(params.CONTEXT)/image-digest"}] + - -terminationMessagePath=$(params.CONTEXT)/image-digested + command: + - /ko-app/imagedigestexporter + computeResources: {} + image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter + name: write-digest + securityContext: + runAsUser: 0 + workingDir: $(workspaces.source.path) + - computeResources: {} + image: stedolan/jq + name: digest-to-results + script: cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST + workingDir: $(workspaces.source.path) + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-app + params: + - name: imageURL + value: $(params.image-registry)/leeroy-app@$(tasks.build-skaffold-app.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-app/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + - name: deploy-web + params: + - name: imageURL + value: $(params.image-registry)/leeroy-web@$(tasks.build-skaffold-web.results.IMAGE_DIGEST) + - name: path + value: $(workspaces.source.path)/examples/microservices/leeroy-web/kubernetes/deployment.yaml + - name: yqArg + value: -d1 + - name: yamlPathToImage + value: spec.template.spec.containers[0].image + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: Path to the manifest to apply + name: path + type: string + - description: Okay this is a hack, but I didn't feel right hard-coding `-d1` down below + name: yqArg + type: string + - description: The path to the image to replace in the yaml manifest (arg to yq) + name: yamlPathToImage + type: string + - description: The URL of the image to deploy + name: imageURL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - args: + - w + - -i + - $(params.yqArg) + - $(params.path) + - $(params.yamlPathToImage) + - $(params.imageURL) + command: + - yq + computeResources: {} + image: mikefarah/yq + name: replace-image + - args: + - apply + - -f + - $(params.path) + command: + - kubectl + computeResources: {} + image: lachlanevenson/k8s-kubectl + name: run-kubectl + workspaces: + - name: source + workspaces: + - name: source + workspace: git-source + workspaces: + - name: git-source + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: jx3-test-save-show-results +spec: + params: + - name: value_to_save + value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - default: "" + name: value_to_save + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: result_value + name: result_value + value: $(tasks.save-results.results.result_value) + tasks: + - name: save-results + params: + - name: value_to_save + value: test_demo + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: "" + name: value_to_save + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: result_value + name: result_value + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + imagePullPolicy: IfNotPresent + workingDir: /workspace/source + steps: + - computeResources: {} + image: ubuntu:jammy + name: save-result + script: | + #!/usr/bin/env sh + set -ex + result_value="$(params.value_to_save)" + echo "results.result_value.path is $(results.result_value.path)" + echo -n "${result_value}" > $(results.result_value.path) + echo "result_value is ${result_value}" + - name: display-results + params: + - name: value_to_show + value: $(tasks.save-results.results.result_value) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - save-results + taskSpec: + metadata: {} + params: + - default: "" + name: value_to_show + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + imagePullPolicy: IfNotPresent + workingDir: /workspace/source + steps: + - computeResources: {} + image: ubuntu:jammy + name: show-result + script: | + #!/usr/bin/env sh + set -ex + value_to_show="$(params.value_to_show)" + echo "value_to_show is ${value_to_show}" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 30m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: pullrequest +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: git-clone-env-pr + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/git-clone/git-clone-env-pr.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + - name: make-pr + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - git-clone-env-pr + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/environment/pullrequest/make-pr.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + - name: kubetest + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + runAfter: + - make-pr + taskRef: + params: + - name: url + value: https://github.com/jenkins-x/jx3-pipeline-catalog.git + - name: revision + value: master + - name: pathInRepo + value: tasks/kubetest/environment.yaml + resolver: git + workspaces: + - name: output + workspace: pipeline-ws + workspaces: + - name: pipeline-ws + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 12h0m0s + workspaces: + - name: pipeline-ws + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + computeResources: + requests: + storage: 1Gi + status: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/cloneURI: https://github.com/jenkins-x/jx.git + creationTimestamp: "2020-07-20T19:50:21Z" + generation: 1 + labels: + branch: PR-7463 + build: "17" + context: boot-vault + jenkins.io/pipelineType: build + lighthouse.jenkins-x.io/baseSHA: c47ce72d4e2991a9440e6d954ecbf79d596f9352 + lighthouse.jenkins-x.io/branch: PR-7463 + lighthouse.jenkins-x.io/buildNum: "17" + lighthouse.jenkins-x.io/context: boot-vault + lighthouse.jenkins-x.io/id: f46327af-b47e-11ea-b797-9256b7b8d9b0 + lighthouse.jenkins-x.io/lastCommitSHA: 8a3c5f595cdc3162e46390c72a5d22fb9c89d1df + lighthouse.jenkins-x.io/refs.org: jenkins-x + lighthouse.jenkins-x.io/refs.repo: jx + owner: jenkins-x + repository: jx + tekton.dev/pipeline: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + namespace: jx + resourceVersion: "16726271" + selfLink: /apis/tekton.dev/v1beta1/namespaces/jx/pipelineruns/jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + uid: 3edf18d1-cac2-11ea-a610-42010a8400cb +spec: + params: + - name: version + value: 0.0.0-SNAPSHOT-PR-7463-17 + - name: build_id + value: "17" + pipelineRef: + apiVersion: tekton.dev/v1beta1 + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/loadFileRefs: .* + creationTimestamp: null + name: pipelinerun-with-extra-params +spec: + params: + - name: pl-param-x + value: "100" + - name: pl-param-y + value: "200" + - name: pl-param-z + value: "300" + pipelineSpec: + params: + - name: pl-param-x + type: string + - name: pl-param-y + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: add-params + params: + - name: a + value: $(params.pl-param-x) + - name: b + value: $(params.pl-param-y) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: The first integer + name: a + type: string + - description: The second integer + name: b + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: bash:latest + name: sum + script: |- + #!/usr/bin/env bash + echo -n $(( "$(inputs.params.a)" + "$(inputs.params.b)" )) + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/appendStepsURL: https://gist.githubusercontent.com/jstrachan/1937a809fd4223f3588db32cbb3a034f/raw/3bb56dd20cae2795e0ec4788d79e18d9486da9d9/sample-git-clone-task.yaml + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: some/linter:1.2.3 + name: lint + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + script: | + #!/usr/bin/env bash + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/defaultParameters: "false" + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + tasks: + - name: cheese + taskSpec: + metadata: {} + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $(params.REPO_URL) $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + - --verbose + - --baseSHA + - $(params.PULL_BASE_SHA) + - --sha + - $(params.PULL_PULL_SHA) + - --baseBranch + - $(params.PULL_BASE_REF) + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: REPO_URL + value: "" + - name: PULL_PULL_SHA + value: master + - name: subdirectory + value: source + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: master + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + pipelineSpec: + params: + - description: git url to clone + name: REPO_URL + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: source + description: subdirectory inside of /workspace to clone the git repo + name: subdirectory + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: 'the kind of job: postsubmit or presubmit' + name: JOB_TYPE + type: string + - default: master + description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + tasks: + - name: cheese + params: + - name: REPO_URL + value: $(params.REPO_URL) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: subdirectory + value: $(params.subdirectory) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + taskSpec: + metadata: {} + params: + - description: git url to clone + name: REPO_URL + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: source + description: subdirectory inside of /workspace to clone the git repo + name: subdirectory + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: 'the kind of job: postsubmit or presubmit' + name: JOB_TYPE + type: string + - default: master + description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $(params.REPO_URL) $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + - --verbose + - --baseSHA + - $(params.PULL_BASE_SHA) + - --sha + - $(params.PULL_PULL_SHA) + - --baseBranch + - $(params.PULL_BASE_REF) + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/prependStepsURL: https://gist.githubusercontent.com/jstrachan/1937a809fd4223f3588db32cbb3a034f/raw/3bb56dd20cae2795e0ec4788d79e18d9486da9d9/sample-git-clone-task.yaml + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + script: | + #!/usr/bin/env bash + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: some/linter:1.2.3 + name: lint + workingDir: /workspace/source + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - default: param-value + name: PARAM + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: PARAM + value: $(params.PARAM) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: param-value + name: PARAM + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ubuntu + name: noshebang + script: echo "no shebang" + - computeResources: {} + env: + - name: FOO + value: foooooooo + image: ubuntu + name: bash + script: | + #!/usr/bin/env bash + set -euxo pipefail + echo "Hello from Bash!" + echo FOO is ${FOO} + echo substring is ${FOO:2:4} + for i in {1..10}; do + echo line $i + done + - computeResources: {} + image: ubuntu + name: place-file + script: | + #!/usr/bin/env bash + echo "echo Hello from script file" > /workspace/hello + chmod +x /workspace/hello + - computeResources: {} + image: ubuntu + name: run-file + script: | + #!/usr/bin/env bash + /workspace/hello + - computeResources: {} + image: ubuntu + name: contains-eof + script: | + #!/usr/bin/env bash + cat > file << EOF + this file has some contents + EOF + cat file + - computeResources: {} + image: node + name: node + script: | + #!/usr/bin/env node + console.log("Hello from Node!") + - computeResources: {} + image: python + name: python + script: | + #!/usr/bin/env python3 + print("Hello from Python!") + - computeResources: {} + image: perl + name: perl + script: | + #!/usr/bin/perl + print "Hello from Perl!" + - computeResources: {} + image: python + name: params-applied + script: | + #!/usr/bin/env python3 + v = '$(params.PARAM)' + if v != 'param-value': + print('Param values not applied') + print('Got: ', v) + exit(1) + - args: + - hello + - world + computeResources: {} + image: ubuntu + name: args-allowed + script: |- + #!/usr/bin/env bash + [[ $# == 2 ]] + [[ $1 == "hello" ]] + [[ $2 == "world" ]] + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: cheese + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $REPO_URL + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.62 + name: git-merge + script: | + #!/usr/bin/env sh + jx gitops git merge variables + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: params +spec: + params: + - name: FOO + value: BAR-CATALOG + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: test-params + params: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 + name: test-echo + script: |- + #!/usr/bin/env bash + echo "FOO: $(params.FOO)" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: params +spec: + params: + - name: FOO + value: BAR-CATALOG + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: test-params + params: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + - name: FOO + value: $(params.FOO) + steps: + - computeResources: {} + image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 + name: test-echo + script: |- + #!/usr/bin/env bash + echo "FOO: $(params.FOO)" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: foo + image: common-image + name: common-build + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: one + image: common-image + name: common-build + taskRunTemplate: {} + timeouts: + pipeline: 240h0m0s +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: node:12-slim + name: my-first-step + script: | + #!/bin/sh + npm first thing + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: node:12-slim + name: my-pre-build-container + script: | + #!/bin/sh + npm pre build container + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: node:12-slim + name: my-final-step + script: | + #!/bin/sh + npm final thing + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: node:12-slim + name: my-first-step + script: | + #!/bin/sh + npm first thing + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: node:12-slim + name: my-pre-build-container + script: | + #!/bin/sh + npm pre build container + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: node:12-slim + name: my-final-step + script: | + #!/bin/sh + npm final thing + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: url + value: "" + - name: revision + value: "" + - name: refspec + value: "" + - name: submodules + value: "true" + - name: depth + value: "1" + - name: sslVerify + value: "true" + - name: subdirectory + value: "" + - name: deleteExisting + value: "true" + - name: httpProxy + value: "" + - name: httpsProxy + value: "" + - name: noProxy + value: "" + - name: verbose + value: "true" + - name: gitInitImage + value: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: git url to clone + name: url + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "" + description: (optional) git refspec to fetch before checking out revision + name: refspec + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "true" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - default: "" + description: git HTTP proxy server for non-SSL requests + name: httpProxy + type: string + - default: "" + description: git HTTPS proxy server for SSL requests + name: httpsProxy + type: string + - default: "" + description: git no proxy - opt out of proxying HTTP/HTTPS requests + name: noProxy + type: string + - default: "true" + description: log the commands used during execution + name: verbose + type: string + - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + description: the image used where the git-init binary is + name: gitInitImage + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + value: $(tasks.from-build-pack.results.commit) + - description: The precise URL that was fetched by this Task + name: url + value: $(tasks.from-build-pack.results.url) + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: git url to clone + name: url + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "" + description: (optional) git refspec to fetch before checking out revision + name: refspec + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "true" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - default: "" + description: git HTTP proxy server for non-SSL requests + name: httpProxy + type: string + - default: "" + description: git HTTPS proxy server for SSL requests + name: httpsProxy + type: string + - default: "" + description: git no proxy - opt out of proxying HTTP/HTTPS requests + name: noProxy + type: string + - default: "true" + description: log the commands used during execution + name: verbose + type: string + - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + description: the image used where the git-init binary is + name: gitInitImage + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + - description: The precise URL that was fetched by this Task + name: url + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + env: + - name: PARAM_URL + value: $(params.url) + - name: PARAM_REVISION + value: $(params.revision) + - name: PARAM_REFSPEC + value: $(params.refspec) + - name: PARAM_SUBMODULES + value: $(params.submodules) + - name: PARAM_DEPTH + value: $(params.depth) + - name: PARAM_SSL_VERIFY + value: $(params.sslVerify) + - name: PARAM_SUBDIRECTORY + value: $(params.subdirectory) + - name: PARAM_DELETE_EXISTING + value: $(params.deleteExisting) + - name: PARAM_HTTP_PROXY + value: $(params.httpProxy) + - name: PARAM_HTTPS_PROXY + value: $(params.httpsProxy) + - name: PARAM_NO_PROXY + value: $(params.noProxy) + - name: PARAM_VERBOSE + value: $(params.verbose) + - name: WORKSPACE_OUTPUT_PATH + value: $(workspaces.output.path) + image: $(params.gitInitImage) + name: clone + script: | + #!/bin/sh + set -eu -o pipefail + + if [[ "${PARAM_VERBOSE}" == "true" ]] ; then + set -x + fi + + CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" + + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + + if [[ "${PARAM_DELETE_EXISTING}" == "true" ]] ; then + cleandir + fi + + test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" + test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" + test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" + + /ko-app/git-init \ + -url "${PARAM_URL}" \ + -revision "${PARAM_REVISION}" \ + -refspec "${PARAM_REFSPEC}" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="${PARAM_SSL_VERIFY}" \ + -submodules="${PARAM_SUBMODULES}" \ + -depth "${PARAM_DEPTH}" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD)" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] ; then + exit $EXIT_CODE + fi + # ensure we don't add a trailing newline to the result + echo -n "$RESULT_SHA" > $(results.commit.path) + echo -n "${PARAM_URL}" > $(results.url.path) + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s + workspaces: + - emptyDir: {} + name: output +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + env: + - name: START_XVFB + value: "false" + image: selenium/standalone-chrome + name: selenium + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + env: + - name: IMAGE + value: gcr.io/myproject/myimage + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build-cheese + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + env: + - name: IMAGE + value: gcr.io/myproject/wine + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build-wine + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + env: + - name: MY_NEW_ENV_VAR + value: this-is-a-new-value + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + envFrom: + - configMapRef: + name: myconfigmap + optional: true + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/usr/bin/env sh + echo "this is my custom script" + workingDir: /workspace/mynewdir + - args: + - -c + - echo this is a new custom command + command: + - bash + computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumeMounts: + - mountPath: /foo/bar + name: my-new-volume + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 600m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm-something-else + name: npmrc + workingDir: /workspace/my-source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.62 + name: git-merge + script: | + #!/usr/bin/env sh + jx gitops git merge variables + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - command: + - jx-updatebot + - pr + computeResources: {} + image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 + name: promote-release + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 + name: promote-release + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx updatebot argo promote --target-git-url https://github.com/myorg/my-staging-repo + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:latest + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: cheese +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + env: + - name: START_XVFB + value: "false" + image: selenium/standalone-chrome + name: selenium + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: pullrequest +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + image: xyz/json-server:0.1.15 + name: json-server + script: | + #!/bin/ash + while [ ! -f /workspace/source/JsonServer/mocks.json ] ; do + echo "Waiting for mocks.json" + sleep 1 + done + json-server --watch /workspace/source/JsonServer/mocks.json + workspaces: + - mountPath: "" + name: source + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_BASE_SHA + echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:14-slim + name: "" + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + yarn install + CI=true DISPLAY=:99 yarn run test:unit + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + - name: source + workspaces: + - name: source + workspace: source + - name: output + workspace: output + workspaces: - name: source - workspace: git-source + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 12h0m0s + workspaces: + - emptyDir: {} + name: source + - emptyDir: {} + name: output +status: {} +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + creationTimestamp: null + name: release +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: _JAVA_OPTIONS + value: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Xms10m -Xmx192m + - name: MAVEN_OPTS + value: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /root/.m2/ + name: maven-settings + - mountPath: /root/.gnupg + name: release-gpg + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_BASE_SHA + echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-release-version:2.2.5 + name: next-version + script: | + #!/usr/bin/env sh + jx-release-version > VERSION + - computeResources: {} + image: ghcr.io/jenkins-x/jx-boot:3.1.335 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: maven:3.6-openjdk-11 + name: build-mvn-deploy + script: | + #!/usr/bin/env bash + source .jx/variables.sh + + # modify the pom.xml + echo "upgrading the pom to version $VERSION" + mvn versions:set -DnewVersion=$VERSION + + mvn --no-transfer-progress clean deploy + - computeResources: {} + image: gcr.io/jenkinsxio/jx-registry:0.0.11 + name: check-registry + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$PUSH_CONTAINER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-changelog:0.0.34 + name: promote-changelog + script: | + #!/usr/bin/env sh + source .jx/variables.sh + + if [ -d "charts/$REPO_NAME" ]; then + sed -i -e "s/^version:.*/version: $VERSION/" ./charts/$REPO_NAME/Chart.yaml + sed -i -e "s/repository:.*/repository: $DOCKER_REGISTRY\/$DOCKER_REGISTRY_ORG\/$APP_NAME/" ./charts/$REPO_NAME/values.yaml + sed -i -e "s/tag:.*/tag: $VERSION/" ./charts/$REPO_NAME/values.yaml; + else echo no charts; fi + + jx changelog create --version v${VERSION} + + git add * || true + git commit -a -m "chore: release $VERSION" --allow-empty + git tag -fa v$VERSION -m "Release version $VERSION" + git push --force origin v$VERSION + - computeResources: {} + image: ghcr.io/jenkins-x/jx-boot:3.1.335 + name: promote-helm-release + script: | + #!/usr/bin/env sh + jx gitops helm release + - computeResources: {} + image: ghcr.io/jenkins-x/jx-promote:0.0.243 + name: promote-jx-promote + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx promote -b --all --timeout 1h --no-poll + volumes: + - name: maven-settings + secret: + secretName: jenkins-maven-settings + - name: release-gpg + secret: + optional: true + secretName: jenkins-release-gpg + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output workspaces: - - name: git-source + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s + workspaces: + - emptyDir: {} + name: output status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr-load-refs/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr-load-refs/expected.yaml index c4ac2a7b0..f71ac9e78 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr-load-refs/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr-load-refs/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -7,147 +7,67 @@ metadata: name: pipelinerun-with-extra-params spec: params: - - name: pl-param-x - value: "100" - - name: pl-param-y - value: "200" - - name: pl-param-z - value: "300" - pipelineSpec: - params: - name: pl-param-x - type: string + value: "100" - name: pl-param-y - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + value: "200" + - name: pl-param-z + value: "300" + pipelineSpec: + params: + - name: pl-param-x + type: string + - name: pl-param-y + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: add-params - params: - - name: a - value: $(params.pl-param-x) - - name: b - value: $(params.pl-param-y) - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: add-params params: - - description: The first integer - name: a - type: string - - description: The second integer - name: b - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: + - name: a + value: $(params.pl-param-x) + - name: b + value: $(params.pl-param-y) - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -174,13 +94,93 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - image: bash:latest - name: sum - resources: {} - script: |- - #!/usr/bin/env bash - echo -n $(( "$(inputs.params.a)" + "$(inputs.params.b)" )) + taskSpec: + metadata: {} + params: + - description: The first integer + name: a + type: string + - description: The second integer + name: b + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: bash:latest + name: sum + script: |- + #!/usr/bin/env bash + echo -n $(( "$(inputs.params.a)" + "$(inputs.params.b)" )) + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr/expected.yaml index dd26cabef..38d129558 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/pr/expected.yaml @@ -1,8 +1,9 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: lighthouse.jenkins-x.io/cloneURI: https://github.com/jenkins-x/jx.git + tekton.dev/v1beta1Resources: '[{"name":"jenkins-x-jx-pr-7463-boot-vault-9mbgb","resourceRef":{"name":"jenkins-x-jx-pr-7463-boot-vault-9mbgb","apiVersion":"tekton.dev/v1beta1"}}]' creationTimestamp: "2020-07-20T19:50:21Z" generation: 1 labels: @@ -28,19 +29,16 @@ metadata: uid: 3edf18d1-cac2-11ea-a610-42010a8400cb spec: params: - - name: version - value: 0.0.0-SNAPSHOT-PR-7463-17 - - name: build_id - value: "17" + - name: version + value: 0.0.0-SNAPSHOT-PR-7463-17 + - name: build_id + value: "17" pipelineRef: apiVersion: tekton.dev/v1beta1 name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 - podTemplate: {} - resources: - - name: jenkins-x-jx-pr-7463-boot-vault-9mbgb - resourceRef: - apiVersion: tekton.dev/v1beta1 - name: jenkins-x-jx-pr-7463-boot-vault-9mbgb - serviceAccountName: tekton-bot - timeout: 240h0m0s + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-append-steps/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-append-steps/expected.yaml index c95efcd42..979d95f38 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-append-steps/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-append-steps/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -8,125 +8,51 @@ metadata: spec: pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: cheese - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: cheese params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -153,26 +79,102 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - image: some/linter:1.2.3 - name: lint - resources: {} - workingDir: /workspace/source - - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: git-clone - resources: {} - script: | - #!/usr/bin/env bash - export SUBDIR="source" - echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" - git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} - git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} - git config --global credential.helper store - git clone $REPO_URL $SUBDIR - cd $SUBDIR - git checkout $PULL_PULL_SHA - echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" - workingDir: /workspace + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: some/linter:1.2.3 + name: lint + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + script: | + #!/usr/bin/env bash + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-disable-params/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-disable-params/expected.yaml index d0c8b071a..c0d9b2853 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-disable-params/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-disable-params/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -8,133 +8,126 @@ metadata: spec: pipelineSpec: tasks: - - name: cheese - taskSpec: - metadata: {} - spec: null - stepTemplate: - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /home/jenkins - name: workspace-volume - - mountPath: /etc/podinfo - name: podinfo - readOnly: true - workingDir: /workspace/source - steps: - - args: - - -c - - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; - git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; - git config --global credential.helper store; git clone $(params.REPO_URL) - $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); - cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo - checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' - command: - - /bin/sh - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: git-clone - resources: {} - workingDir: /workspace - - args: - - gitops - - git - - setup - - --namespace - - jx-git-operator - command: - - jx - image: gcr.io/jenkinsxio/jx-cli:latest - name: git-setup - resources: {} - workingDir: /workspace - - args: - - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: setup-builder-home - resources: {} - - args: - - step - - git - - merge - - --verbose - - --baseSHA - - $(params.PULL_BASE_SHA) - - --sha - - $(params.PULL_PULL_SHA) - - --baseBranch - - $(params.PULL_BASE_REF) - command: - - jx - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: git-merge - resources: {} - - args: - - gitops - - variables - command: - - jx - image: gcr.io/jenkinsxio/jx-cli:latest - name: jx-variables - resources: {} - - args: - - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 - name: build-npmrc - resources: {} - - args: - - npm install - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 - name: build-npm-install - resources: {} - - args: - - CI=true DISPLAY=:99 npm test - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 - name: build-npm-test - resources: {} - - args: - - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson - /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true - --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile - --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache - command: - - /busybox/sh - - -c - image: gcr.io/jenkinsxio/kaniko:0.0.5 - name: build-container-build - resources: {} - - args: - - source /workspace/source/.jx/variables.sh && jx preview create - command: - - /bin/bash - - -c - image: gcr.io/jenkinsxio/jx-cli:latest - name: promote-jx-preview - resources: {} - volumes: - - emptyDir: {} - name: workspace-volume - - downwardAPI: - items: - - fieldRef: - fieldPath: metadata.labels - path: labels - name: podinfo + - name: cheese + taskSpec: + metadata: {} + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $(params.REPO_URL) $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + - --verbose + - --baseSHA + - $(params.PULL_BASE_SHA) + - --sha + - $(params.PULL_PULL_SHA) + - --baseBranch + - $(params.PULL_BASE_REF) + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-prepend-steps/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-prepend-steps/expected.yaml index c3fc62eb0..02949b3a4 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-prepend-steps/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-prepend-steps/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -8,125 +8,51 @@ metadata: spec: pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: cheese - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: cheese params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -153,26 +79,102 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: git-clone - resources: {} - script: | - #!/usr/bin/env bash - export SUBDIR="source" - echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" - git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} - git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} - git config --global credential.helper store - git clone $REPO_URL $SUBDIR - cd $SUBDIR - git checkout $PULL_PULL_SHA - echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" - workingDir: /workspace - - image: some/linter:1.2.3 - name: lint - resources: {} - workingDir: /workspace/source + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + script: | + #!/usr/bin/env bash + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: some/linter:1.2.3 + name: lint + workingDir: /workspace/source + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-without-params/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-without-params/expected.yaml index 490c47369..008692352 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-without-params/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task-without-params/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null @@ -6,125 +6,51 @@ metadata: spec: pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: cheese - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: cheese params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -151,118 +77,188 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /home/jenkins - name: workspace-volume - - mountPath: /etc/podinfo - name: podinfo - readOnly: true - workingDir: /workspace/source - steps: - - args: - - -c - - mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; - git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; - git config --global credential.helper store; git clone $REPO_URL - command: - - /bin/sh - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: git-clone - resources: {} - workingDir: /workspace - - args: - - gitops - - git - - setup - - --namespace - - jx-git-operator - command: - - jx - image: gcr.io/jenkinsxio/jx-cli:latest - name: git-setup - resources: {} - workingDir: /workspace - - args: - - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: setup-builder-home - resources: {} - - args: - - step - - git - - merge - command: - - jx - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: git-merge - resources: {} - - args: - - gitops - - variables - command: - - jx - image: gcr.io/jenkinsxio/jx-cli:latest - name: jx-variables - resources: {} - - args: - - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 - name: build-npmrc - resources: {} - - args: - - npm install - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 - name: build-npm-install - resources: {} - - args: - - CI=true DISPLAY=:99 npm test - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 - name: build-npm-test - resources: {} - - args: - - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson - /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true - --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile - --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache - command: - - /busybox/sh - - -c - image: gcr.io/jenkinsxio/kaniko:0.0.5 - name: build-container-build - resources: {} - - args: - - source /workspace/source/.jx/variables.sh && jx preview create - command: - - /bin/bash - - -c - image: gcr.io/jenkinsxio/jx-cli:latest - name: promote-jx-preview - resources: {} - volumes: - - emptyDir: {} - name: workspace-volume - - downwardAPI: - items: - - fieldRef: - fieldPath: metadata.labels - path: labels - name: podinfo + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $REPO_URL + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task/expected.yaml index 43eac25af..70f5ae962 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/task/expected.yaml @@ -1,171 +1,96 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: REPO_URL - value: "" - - name: PULL_PULL_SHA - value: master - - name: subdirectory - value: source - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: master - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" + - name: REPO_URL + value: "" + - name: PULL_PULL_SHA + value: master + - name: subdirectory + value: source + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: master + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" pipelineSpec: params: - - description: git url to clone - name: REPO_URL - type: string - - default: master - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - default: source - description: subdirectory inside of /workspace to clone the git repo - name: subdirectory - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: 'the kind of job: postsubmit or presubmit' - name: JOB_TYPE - type: string - - default: master - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string + - description: git url to clone + name: REPO_URL + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: source + description: subdirectory inside of /workspace to clone the git repo + name: subdirectory + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: 'the kind of job: postsubmit or presubmit' + name: JOB_TYPE + type: string + - default: master + description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string tasks: - - name: cheese - params: - - name: REPO_URL - value: $(params.REPO_URL) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: subdirectory - value: $(params.subdirectory) - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - taskSpec: - metadata: {} + - name: cheese params: - - description: git url to clone - name: REPO_URL - type: string - - default: master - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - default: source - description: subdirectory inside of /workspace to clone the git repo - name: subdirectory - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: 'the kind of job: postsubmit or presubmit' - name: JOB_TYPE - type: string - - default: master - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - spec: null - stepTemplate: - env: + - name: REPO_URL + value: $(params.REPO_URL) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: subdirectory + value: $(params.subdirectory) - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -182,138 +107,206 @@ spec: value: $(params.PULL_NUMBER) - name: PULL_PULL_REF value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - name: PULL_REFS value: $(params.PULL_REFS) - name: REPO_NAME value: $(params.REPO_NAME) - name: REPO_OWNER value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /home/jenkins - name: workspace-volume - - mountPath: /etc/podinfo - name: podinfo - readOnly: true - workingDir: /workspace/source - steps: - - args: - - -c - - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; - git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; - git config --global credential.helper store; git clone $(params.REPO_URL) - $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); - cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo - checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' - command: - - /bin/sh - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: git-clone - resources: {} - workingDir: /workspace - - args: - - gitops - - git - - setup - - --namespace - - jx-git-operator - command: - - jx - image: gcr.io/jenkinsxio/jx-cli:latest - name: git-setup - resources: {} - workingDir: /workspace - - args: - - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: setup-builder-home - resources: {} - - args: - - step - - git - - merge - - --verbose - - --baseSHA - - $(params.PULL_BASE_SHA) - - --sha - - $(params.PULL_PULL_SHA) - - --baseBranch - - $(params.PULL_BASE_REF) - command: - - jx - image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 - name: git-merge - resources: {} - - args: - - gitops - - variables - command: - - jx - image: gcr.io/jenkinsxio/jx-cli:latest - name: jx-variables - resources: {} - - args: - - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 - name: build-npmrc - resources: {} - - args: - - npm install - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 - name: build-npm-install - resources: {} - - args: - - CI=true DISPLAY=:99 npm test - command: - - /bin/sh - - -c - image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 - name: build-npm-test - resources: {} - - args: - - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson - /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true - --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile - --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache - command: - - /busybox/sh - - -c - image: gcr.io/jenkinsxio/kaniko:0.0.5 - name: build-container-build - resources: {} - - args: - - source /workspace/source/.jx/variables.sh && jx preview create - command: - - /bin/bash - - -c - image: gcr.io/jenkinsxio/jx-cli:latest - name: promote-jx-preview - resources: {} - volumes: - - emptyDir: {} - name: workspace-volume - - downwardAPI: - items: - - fieldRef: - fieldPath: metadata.labels - path: labels - name: podinfo + taskSpec: + metadata: {} + params: + - description: git url to clone + name: REPO_URL + type: string + - default: master + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: source + description: subdirectory inside of /workspace to clone the git repo + name: subdirectory + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: 'the kind of job: postsubmit or presubmit' + name: JOB_TYPE + type: string + - default: master + description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /home/jenkins + name: workspace-volume + - mountPath: /etc/podinfo + name: podinfo + readOnly: true + workingDir: /workspace/source + steps: + - args: + - -c + - 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com}; git config --global credential.helper store; git clone $(params.REPO_URL) $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory); cd $(params.subdirectory); git checkout $(params.PULL_PULL_SHA); echo checked out revision: $(params.PULL_PULL_SHA) to dir: $(params.subdirectory)' + command: + - /bin/sh + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-clone + workingDir: /workspace + - args: + - gitops + - git + - setup + - --namespace + - jx-git-operator + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: git-setup + workingDir: /workspace + - args: + - '[ -d /builder/home ] || mkdir -p /builder && ln -s /tekton/home /builder/home' + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: setup-builder-home + - args: + - step + - git + - merge + - --verbose + - --baseSHA + - $(params.PULL_BASE_SHA) + - --sha + - $(params.PULL_PULL_SHA) + - --baseBranch + - $(params.PULL_BASE_REF) + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/builder-jx:2.1.142-761 + name: git-merge + - args: + - gitops + - variables + command: + - jx + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: jx-variables + - args: + - jx step credential -s npm-token -k file -f /builder/home/.npmrc --optional=true + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npmrc + - args: + - npm install + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-install + - args: + - CI=true DISPLAY=:99 npm test + command: + - /bin/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/builder-nodejs:2.1.150-769 + name: build-npm-test + - args: + - source .jx/variables.sh && cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json && /kaniko/executor $KANIKO_FLAGS --cache=true --cache-dir=/workspace --context=/workspace/source --dockerfile=/workspace/source/Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION --cache-repo=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/cache + command: + - /busybox/sh + - -c + computeResources: {} + image: gcr.io/jenkinsxio/kaniko:0.0.5 + name: build-container-build + - args: + - source /workspace/source/.jx/variables.sh && jx preview create + command: + - /bin/bash + - -c + computeResources: {} + image: gcr.io/jenkinsxio/jx-cli:latest + name: promote-jx-preview + volumes: + - emptyDir: {} + name: workspace-volume + - downwardAPI: + items: + - fieldRef: + fieldPath: metadata.labels + path: labels + name: podinfo + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/taskrun/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/taskrun/expected.yaml index 515ff3499..181c9ac62 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/taskrun/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/taskrun/expected.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null @@ -6,131 +6,56 @@ metadata: spec: pipelineSpec: params: - - default: param-value - name: PARAM - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - default: param-value + name: PARAM + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: cheese - params: - - name: PARAM - value: $(params.PARAM) - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: cheese params: - - default: param-value - name: PARAM - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: + - name: PARAM + value: $(params.PARAM) - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -157,87 +82,166 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - image: ubuntu - name: noshebang - resources: {} - script: echo "no shebang" - - env: - - name: FOO - value: foooooooo - image: ubuntu - name: bash - resources: {} - script: | - #!/usr/bin/env bash - set -euxo pipefail - echo "Hello from Bash!" - echo FOO is ${FOO} - echo substring is ${FOO:2:4} - for i in {1..10}; do - echo line $i - done - - image: ubuntu - name: place-file - resources: {} - script: | - #!/usr/bin/env bash - echo "echo Hello from script file" > /workspace/hello - chmod +x /workspace/hello - - image: ubuntu - name: run-file - resources: {} - script: | - #!/usr/bin/env bash - /workspace/hello - - image: ubuntu - name: contains-eof - resources: {} - script: | - #!/usr/bin/env bash - cat > file << EOF - this file has some contents - EOF - cat file - - image: node - name: node - resources: {} - script: | - #!/usr/bin/env node - console.log("Hello from Node!") - - image: python - name: python - resources: {} - script: | - #!/usr/bin/env python3 - print("Hello from Python!") - - image: perl - name: perl - resources: {} - script: | - #!/usr/bin/perl - print "Hello from Perl!" - - image: python - name: params-applied - resources: {} - script: | - #!/usr/bin/env python3 - v = '$(params.PARAM)' - if v != 'param-value': - print('Param values not applied') - print('Got: ', v) - exit(1) - - args: - - hello - - world - image: ubuntu - name: args-allowed - resources: {} - script: |- - #!/usr/bin/env bash - [[ $# == 2 ]] - [[ $1 == "hello" ]] - [[ $2 == "world" ]] + taskSpec: + metadata: {} + params: + - default: param-value + name: PARAM + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: ubuntu + name: noshebang + script: echo "no shebang" + - computeResources: {} + env: + - name: FOO + value: foooooooo + image: ubuntu + name: bash + script: | + #!/usr/bin/env bash + set -euxo pipefail + echo "Hello from Bash!" + echo FOO is ${FOO} + echo substring is ${FOO:2:4} + for i in {1..10}; do + echo line $i + done + - computeResources: {} + image: ubuntu + name: place-file + script: | + #!/usr/bin/env bash + echo "echo Hello from script file" > /workspace/hello + chmod +x /workspace/hello + - computeResources: {} + image: ubuntu + name: run-file + script: | + #!/usr/bin/env bash + /workspace/hello + - computeResources: {} + image: ubuntu + name: contains-eof + script: | + #!/usr/bin/env bash + cat > file << EOF + this file has some contents + EOF + cat file + - computeResources: {} + image: node + name: node + script: | + #!/usr/bin/env node + console.log("Hello from Node!") + - computeResources: {} + image: python + name: python + script: | + #!/usr/bin/env python3 + print("Hello from Python!") + - computeResources: {} + image: perl + name: perl + script: | + #!/usr/bin/perl + print "Hello from Perl!" + - computeResources: {} + image: python + name: params-applied + script: | + #!/usr/bin/env python3 + v = '$(params.PARAM)' + if v != 'param-value': + print('Param values not applied') + print('Got: ', v) + exit(1) + - args: + - hello + - world + computeResources: {} + image: ubuntu + name: args-allowed + script: |- + #!/usr/bin/env bash + [[ $# == 2 ]] + [[ $1 == "hello" ]] + [[ $2 == "world" ]] + taskRunTemplate: {} + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-all-steps/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-all-steps/expected.yaml index 7f030ecb1..7f68e2d19 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-all-steps/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-all-steps/expected.yaml @@ -5,157 +5,79 @@ metadata: name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - computeResources: - requests: - cpu: 400m - memory: 512Mi - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -182,62 +104,140 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - workingDir: /workspace/source - steps: - - computeResources: {} - image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 - name: git-clone - script: | - #!/bin/sh - export SUBDIR="source" - echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" - git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} - git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} - git config --global credential.helper store - git clone $REPO_URL $SUBDIR - cd $SUBDIR - git checkout $PULL_PULL_SHA - echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" - workingDir: /workspace - - computeResources: {} - image: gcr.io/jenkinsxio/jx-boot:3.1.62 - name: git-merge - script: | - #!/usr/bin/env sh - jx gitops git merge variables - workingDir: /workspace/source - - computeResources: {} - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - script: | - #!/usr/bin/env sh - jx gitops variables - - computeResources: {} - image: node:12-slim - name: build-npm-install - script: | - #!/bin/sh - npm install - - computeResources: {} - image: node:12-slim - name: build-npm-test - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - computeResources: {} - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - computeResources: {} - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.62 + name: git-merge + script: | + #!/usr/bin/env sh + jx gitops git merge variables + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-custom-param-task/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-custom-param-task/expected.yaml index 4f460c1f2..424107612 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-custom-param-task/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-custom-param-task/expected.yaml @@ -1,169 +1,90 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: params spec: params: - - name: FOO - value: BAR-CATALOG - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: FOO + value: BAR-CATALOG + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - default: BAR-CATALOG - name: FOO - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: test-params - params: - - name: FOO - value: $(params.FOO) - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - resources: {} - taskSpec: - metadata: {} + - name: test-params params: - - default: BAR-CATALOG - name: FOO - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - resources: {} - spec: null - stepTemplate: - env: + - name: FOO + value: $(params.FOO) - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -190,20 +111,97 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - - name: FOO - value: $(params.FOO) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - steps: - - image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 - name: test-echo - resources: {} - script: |- - #!/usr/bin/env bash - echo "FOO: $(params.FOO)" - podTemplate: {} - serviceAccountName: tekton-bot + taskSpec: + metadata: {} + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + - name: FOO + value: $(params.FOO) + steps: + - computeResources: {} + image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 + name: test-echo + script: |- + #!/usr/bin/env bash + echo "FOO: $(params.FOO)" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-custom-param/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-custom-param/expected.yaml index 2e04660c8..ab9701f7a 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-custom-param/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-custom-param/expected.yaml @@ -1,169 +1,88 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: params spec: params: - - name: FOO - value: BAR-CATALOG - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: FOO + value: BAR-CATALOG + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - default: BAR-CATALOG - name: FOO - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: test-params - params: - - name: FOO - value: $(params.FOO) - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - resources: {} - taskSpec: - metadata: {} + - name: test-params params: - - default: BAR-CATALOG - name: FOO - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - resources: {} - spec: null - stepTemplate: - env: - name: FOO value: $(params.FOO) - name: BUILD_ID @@ -192,18 +111,97 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - steps: - - image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 - name: test-echo - resources: {} - script: |- - #!/usr/bin/env bash - echo "FOO: $(params.FOO)" - podTemplate: {} - serviceAccountName: tekton-bot + taskSpec: + metadata: {} + params: + - default: BAR-CATALOG + name: FOO + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: FOO + value: $(params.FOO) + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + image: gcr.io/cloud-builders/kubectl@sha256:8ab94be8b2b4f3d117f02d868b39540fddd225447abf4014f7ba4765cb39f753 + name: test-echo + script: |- + #!/usr/bin/env bash + echo "FOO: $(params.FOO)" + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-issue-1234/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-issue-1234/expected.yaml index b2fd5c46f..1c4902c9d 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-issue-1234/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-issue-1234/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,13 +104,87 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - env: - - name: FOO - value: one - image: common-image - name: common-build - resources: {} + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: one + image: common-image + name: common-build + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-issue-1234/expected2.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-issue-1234/expected2.yaml index 1b88ba210..c28fd06a5 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-issue-1234/expected2.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-issue-1234/expected2.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,13 +104,87 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: {} - steps: - - env: - - name: FOO - value: foo - image: common-image - name: common-build - resources: {} + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: {} + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + steps: + - computeResources: {} + env: + - name: FOO + value: foo + image: common-image + name: common-build + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-add-custom-explict/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-add-custom-explict/expected.yaml index b2d546ff4..d0660e3c0 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-add-custom-explict/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-add-custom-explict/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,62 +104,136 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - workingDir: /workspace/source - steps: - - image: node:12-slim - name: my-first-step - resources: {} - script: | - #!/bin/sh - npm first thing - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: node:12-slim - name: my-pre-build-container - resources: {} - script: | - #!/bin/sh - npm pre build container - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - - image: node:12-slim - name: my-final-step - resources: {} - script: | - #!/bin/sh - npm final thing + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: node:12-slim + name: my-first-step + script: | + #!/bin/sh + npm first thing + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: node:12-slim + name: my-pre-build-container + script: | + #!/bin/sh + npm pre build container + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: node:12-slim + name: my-final-step + script: | + #!/bin/sh + npm final thing + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-add-custom/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-add-custom/expected.yaml index b2d546ff4..d0660e3c0 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-add-custom/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-add-custom/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,62 +104,136 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - workingDir: /workspace/source - steps: - - image: node:12-slim - name: my-first-step - resources: {} - script: | - #!/bin/sh - npm first thing - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: node:12-slim - name: my-pre-build-container - resources: {} - script: | - #!/bin/sh - npm pre build container - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - - image: node:12-slim - name: my-final-step - resources: {} - script: | - #!/bin/sh - npm final thing + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: node:12-slim + name: my-first-step + script: | + #!/bin/sh + npm first thing + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: node:12-slim + name: my-pre-build-container + script: | + #!/bin/sh + npm pre build container + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: node:12-slim + name: my-final-step + script: | + #!/bin/sh + npm final thing + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-custom-git/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-custom-git/expected.yaml index a2c79561e..72e5eab22 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-custom-git/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-custom-git/expected.yaml @@ -1,305 +1,167 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: url - value: "" - - name: revision - value: "" - - name: refspec - value: "" - - name: submodules - value: "true" - - name: depth - value: "1" - - name: sslVerify - value: "true" - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: httpProxy - value: "" - - name: httpsProxy - value: "" - - name: noProxy - value: "" - - name: verbose - value: "true" - - name: gitInitImage - value: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: url + value: "" + - name: revision + value: "" + - name: refspec + value: "" + - name: submodules + value: "true" + - name: depth + value: "1" + - name: sslVerify + value: "true" + - name: subdirectory + value: "" + - name: deleteExisting + value: "true" + - name: httpProxy + value: "" + - name: httpsProxy + value: "" + - name: noProxy + value: "" + - name: verbose + value: "true" + - name: gitInitImage + value: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: git url to clone - name: url - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: revision - type: string - - default: "" - description: (optional) git refspec to fetch before checking out revision - name: refspec - type: string - - default: "true" - description: defines if the resource should initialize and fetch the submodules - name: submodules - type: string - - default: "1" - description: performs a shallow clone where only the most recent commit(s) will - be fetched - name: depth - type: string - - default: "true" - description: defines if http.sslVerify should be set to true or false in the - global git config - name: sslVerify - type: string - - default: "" - description: subdirectory inside the "output" workspace to clone the git repo - into - name: subdirectory - type: string - - default: "true" - description: clean out the contents of the repo's destination directory (if - it already exists) before trying to clone the repo there - name: deleteExisting - type: string - - default: "" - description: git HTTP proxy server for non-SSL requests - name: httpProxy - type: string - - default: "" - description: git HTTPS proxy server for SSL requests - name: httpsProxy - type: string - - default: "" - description: git no proxy - opt out of proxying HTTP/HTTPS requests - name: noProxy - type: string - - default: "true" - description: log the commands used during execution - name: verbose - type: string - - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 - description: the image used where the git-init binary is - name: gitInitImage - type: string - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: git url to clone + name: url + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "" + description: (optional) git refspec to fetch before checking out revision + name: refspec + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "true" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - default: "" + description: git HTTP proxy server for non-SSL requests + name: httpProxy + type: string + - default: "" + description: git HTTPS proxy server for SSL requests + name: httpsProxy + type: string + - default: "" + description: git no proxy - opt out of proxying HTTP/HTTPS requests + name: noProxy + type: string + - default: "true" + description: log the commands used during execution + name: verbose + type: string + - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + description: the image used where the git-init binary is + name: gitInitImage + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string results: - - description: The precise commit SHA that was fetched by this Task - name: commit - value: $(tasks.from-build-pack.results.commit) - - description: The precise URL that was fetched by this Task - name: url - value: $(tasks.from-build-pack.results.url) + - description: The precise commit SHA that was fetched by this Task + name: commit + value: $(tasks.from-build-pack.results.commit) + - description: The precise URL that was fetched by this Task + name: url + value: $(tasks.from-build-pack.results.url) tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - - description: git url to clone - name: url - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: revision - type: string - - default: "" - description: (optional) git refspec to fetch before checking out revision - name: refspec - type: string - - default: "true" - description: defines if the resource should initialize and fetch the submodules - name: submodules - type: string - - default: "1" - description: performs a shallow clone where only the most recent commit(s) - will be fetched - name: depth - type: string - - default: "true" - description: defines if http.sslVerify should be set to true or false in - the global git config - name: sslVerify - type: string - - default: "" - description: subdirectory inside the "output" workspace to clone the git - repo into - name: subdirectory - type: string - - default: "true" - description: clean out the contents of the repo's destination directory - (if it already exists) before trying to clone the repo there - name: deleteExisting - type: string - - default: "" - description: git HTTP proxy server for non-SSL requests - name: httpProxy - type: string - - default: "" - description: git HTTPS proxy server for SSL requests - name: httpsProxy - type: string - - default: "" - description: git no proxy - opt out of proxying HTTP/HTTPS requests - name: noProxy - type: string - - default: "true" - description: log the commands used during execution - name: verbose - type: string - - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 - description: the image used where the git-init binary is - name: gitInitImage - type: string - results: - - description: The precise commit SHA that was fetched by this Task - name: commit - - description: The precise URL that was fetched by this Task - name: url - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -326,144 +188,274 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /tekton/home/npm - name: npmrc - workingDir: /workspace/source - steps: - - env: - - name: PARAM_URL - value: $(params.url) - - name: PARAM_REVISION - value: $(params.revision) - - name: PARAM_REFSPEC - value: $(params.refspec) - - name: PARAM_SUBMODULES - value: $(params.submodules) - - name: PARAM_DEPTH - value: $(params.depth) - - name: PARAM_SSL_VERIFY - value: $(params.sslVerify) - - name: PARAM_SUBDIRECTORY - value: $(params.subdirectory) - - name: PARAM_DELETE_EXISTING - value: $(params.deleteExisting) - - name: PARAM_HTTP_PROXY - value: $(params.httpProxy) - - name: PARAM_HTTPS_PROXY - value: $(params.httpsProxy) - - name: PARAM_NO_PROXY - value: $(params.noProxy) - - name: PARAM_VERBOSE - value: $(params.verbose) - - name: WORKSPACE_OUTPUT_PATH - value: $(workspaces.output.path) - image: $(params.gitInitImage) - name: clone - resources: {} - script: | - #!/bin/sh - set -eu -o pipefail + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: git url to clone + name: url + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: revision + type: string + - default: "" + description: (optional) git refspec to fetch before checking out revision + name: refspec + type: string + - default: "true" + description: defines if the resource should initialize and fetch the submodules + name: submodules + type: string + - default: "1" + description: performs a shallow clone where only the most recent commit(s) will be fetched + name: depth + type: string + - default: "true" + description: defines if http.sslVerify should be set to true or false in the global git config + name: sslVerify + type: string + - default: "" + description: subdirectory inside the "output" workspace to clone the git repo into + name: subdirectory + type: string + - default: "true" + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + name: deleteExisting + type: string + - default: "" + description: git HTTP proxy server for non-SSL requests + name: httpProxy + type: string + - default: "" + description: git HTTPS proxy server for SSL requests + name: httpsProxy + type: string + - default: "" + description: git no proxy - opt out of proxying HTTP/HTTPS requests + name: noProxy + type: string + - default: "true" + description: log the commands used during execution + name: verbose + type: string + - default: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.18.1 + description: the image used where the git-init binary is + name: gitInitImage + type: string + results: + - description: The precise commit SHA that was fetched by this Task + name: commit + - description: The precise URL that was fetched by this Task + name: url + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + env: + - name: PARAM_URL + value: $(params.url) + - name: PARAM_REVISION + value: $(params.revision) + - name: PARAM_REFSPEC + value: $(params.refspec) + - name: PARAM_SUBMODULES + value: $(params.submodules) + - name: PARAM_DEPTH + value: $(params.depth) + - name: PARAM_SSL_VERIFY + value: $(params.sslVerify) + - name: PARAM_SUBDIRECTORY + value: $(params.subdirectory) + - name: PARAM_DELETE_EXISTING + value: $(params.deleteExisting) + - name: PARAM_HTTP_PROXY + value: $(params.httpProxy) + - name: PARAM_HTTPS_PROXY + value: $(params.httpsProxy) + - name: PARAM_NO_PROXY + value: $(params.noProxy) + - name: PARAM_VERBOSE + value: $(params.verbose) + - name: WORKSPACE_OUTPUT_PATH + value: $(workspaces.output.path) + image: $(params.gitInitImage) + name: clone + script: | + #!/bin/sh + set -eu -o pipefail - if [[ "${PARAM_VERBOSE}" == "true" ]] ; then - set -x - fi + if [[ "${PARAM_VERBOSE}" == "true" ]] ; then + set -x + fi - CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" + CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" - cleandir() { - # Delete any existing contents of the repo directory if it exists. - # - # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" - # or the root of a mounted volume. - if [[ -d "$CHECKOUT_DIR" ]] ; then - # Delete non-hidden files and directories - rm -rf "$CHECKOUT_DIR"/* - # Delete files and directories starting with . but excluding .. - rm -rf "$CHECKOUT_DIR"/.[!.]* - # Delete files and directories starting with .. plus any other character - rm -rf "$CHECKOUT_DIR"/..?* - fi - } + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf $CHECKOUT_DIR" because $CHECKOUT_DIR might be "/" + # or the root of a mounted volume. + if [[ -d "$CHECKOUT_DIR" ]] ; then + # Delete non-hidden files and directories + rm -rf "$CHECKOUT_DIR"/* + # Delete files and directories starting with . but excluding .. + rm -rf "$CHECKOUT_DIR"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "$CHECKOUT_DIR"/..?* + fi + } - if [[ "${PARAM_DELETE_EXISTING}" == "true" ]] ; then - cleandir - fi + if [[ "${PARAM_DELETE_EXISTING}" == "true" ]] ; then + cleandir + fi - test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" - test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" - test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" + test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" + test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" + test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" - /ko-app/git-init \ - -url "${PARAM_URL}" \ - -revision "${PARAM_REVISION}" \ - -refspec "${PARAM_REFSPEC}" \ - -path "$CHECKOUT_DIR" \ - -sslVerify="${PARAM_SSL_VERIFY}" \ - -submodules="${PARAM_SUBMODULES}" \ - -depth "${PARAM_DEPTH}" - cd "$CHECKOUT_DIR" - RESULT_SHA="$(git rev-parse HEAD)" - EXIT_CODE="$?" - if [ "$EXIT_CODE" != 0 ] ; then - exit $EXIT_CODE - fi - # ensure we don't add a trailing newline to the result - echo -n "$RESULT_SHA" > $(results.commit.path) - echo -n "${PARAM_URL}" > $(results.url.path) - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - volumes: - - name: npmrc - secret: - optional: true - secretName: npmrc + /ko-app/git-init \ + -url "${PARAM_URL}" \ + -revision "${PARAM_REVISION}" \ + -refspec "${PARAM_REFSPEC}" \ + -path "$CHECKOUT_DIR" \ + -sslVerify="${PARAM_SSL_VERIFY}" \ + -submodules="${PARAM_SUBMODULES}" \ + -depth "${PARAM_DEPTH}" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD)" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] ; then + exit $EXIT_CODE + fi + # ensure we don't add a trailing newline to the result + echo -n "$RESULT_SHA" > $(results.commit.path) + echo -n "${PARAM_URL}" > $(results.url.path) + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output workspaces: - - description: The git repo will be cloned onto the volume backing this workspace - name: output - workspaces: - - name: output - workspace: output + - name: output + workspace: output workspaces: - - description: The git repo will be cloned onto the volume backing this workspace - name: output + - description: The git repo will be cloned onto the volume backing this workspace + name: output workspaces: - - emptyDir: {} - name: output + - emptyDir: {} + name: output + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-explicit/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-explicit/expected.yaml index c5edf0833..0b9ef0877 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-explicit/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-explicit/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,52 +104,126 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /tekton/home/npm - name: npmrc - workingDir: /workspace/source - steps: - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - volumes: - - name: npmrc - secret: - optional: true - secretName: npmrc + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-inherit-sidecar/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-inherit-sidecar/expected.yaml index ff990c5d3..1bafba6a1 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-inherit-sidecar/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-inherit-sidecar/expected.yaml @@ -1,164 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - sidecars: - - env: - - name: START_XVFB - value: "false" - image: selenium/standalone-chrome - name: selenium - resources: {} - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -185,52 +104,133 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /tekton/home/npm - name: npmrc - workingDir: /workspace/source - steps: - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - volumes: - - name: npmrc - secret: - optional: true - secretName: npmrc + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + env: + - name: START_XVFB + value: "false" + image: selenium/standalone-chrome + name: selenium + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-multiple-copies/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-multiple-copies/expected.yaml index 3eeb0f76d..e9ca00f21 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-multiple-copies/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-multiple-copies/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,74 +104,148 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /tekton/home/npm - name: npmrc - workingDir: /workspace/source - steps: - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - env: - - name: IMAGE - value: gcr.io/myproject/myimage - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build-cheese - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - env: - - name: IMAGE - value: gcr.io/myproject/wine - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build-wine - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - volumes: - - name: npmrc - secret: - optional: true - secretName: npmrc + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + env: + - name: IMAGE + value: gcr.io/myproject/myimage + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build-cheese + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + env: + - name: IMAGE + value: gcr.io/myproject/wine + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build-wine + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override-resources/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override-resources/expected.yaml index 19b371ed4..684d6e8da 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override-resources/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override-resources/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,80 +104,155 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 600m - memory: 512Mi - volumeMounts: - - mountPath: /tekton/home/npm-something-else - name: npmrc - workingDir: /workspace/my-source - steps: - - image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 - name: git-clone - resources: {} - script: | - #!/bin/sh - export SUBDIR="source" - echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" - git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} - git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} - git config --global credential.helper store - git clone $REPO_URL $SUBDIR - cd $SUBDIR - git checkout $PULL_PULL_SHA - echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" - workingDir: /workspace - - image: gcr.io/jenkinsxio/jx-boot:3.1.62 - name: git-merge - resources: {} - script: | - #!/usr/bin/env sh - jx gitops git merge variables - workingDir: /workspace/source - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - - command: - - jx-updatebot - - pr - image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 - name: promote-release - resources: {} - volumes: - - name: npmrc - secret: - optional: true - secretName: npmrc + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 600m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm-something-else + name: npmrc + workingDir: /workspace/my-source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.62 + name: git-merge + script: | + #!/usr/bin/env sh + jx gitops git merge variables + workingDir: /workspace/source + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - command: + - jx-updatebot + - pr + computeResources: {} + image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 + name: promote-release + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override-script/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override-script/expected.yaml index c641fa7d8..11bd04f30 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override-script/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override-script/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,59 +104,133 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /tekton/home/npm - name: npmrc - workingDir: /workspace/source - steps: - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - - image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 - name: promote-release - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx updatebot argo promote --target-git-url https://github.com/myorg/my-staging-repo - volumes: - - name: npmrc - secret: - optional: true - secretName: npmrc + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + - computeResources: {} + image: ghcr.io/jenkins-x/jx-updatebot:0.0.82 + name: promote-release + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx updatebot argo promote --target-git-url https://github.com/myorg/my-staging-repo + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override/expected.yaml index af1f15908..cf590f821 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-override/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,55 +104,129 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - workingDir: /workspace/source - steps: - - env: - - name: MY_NEW_ENV_VAR - value: this-is-a-new-value - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - envFrom: - - configMapRef: - name: myconfigmap - optional: true - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/usr/bin/env sh - echo "this is my custom script" - workingDir: /workspace/mynewdir - - args: - - -c - - echo this is a new custom command - command: - - bash - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - volumeMounts: - - mountPath: /foo/bar - name: my-new-volume + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + env: + - name: MY_NEW_ENV_VAR + value: this-is-a-new-value + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + envFrom: + - configMapRef: + name: myconfigmap + optional: true + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/usr/bin/env sh + echo "this is my custom script" + workingDir: /workspace/mynewdir + - args: + - -c + - echo this is a new custom command + command: + - bash + computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumeMounts: + - mountPath: /foo/bar + name: my-new-volume + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-version-stream/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-version-stream/expected.yaml index 57e0343e6..879d15d2a 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-version-stream/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-version-stream/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,44 +104,118 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - workingDir: /workspace/source - steps: - - image: gcr.io/jenkinsxio/jx-boot:latest - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:latest + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-with-sidecar-ws/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-with-sidecar-ws/expected.yaml index 8c3521615..ef0a322fc 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-with-sidecar-ws/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-with-sidecar-ws/expected.yaml @@ -1,172 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: pullrequest spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - resources: {} - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - sidecars: - - image: xyz/json-server:0.1.15 - name: json-server - resources: {} - script: | - #!/bin/ash - while [ ! -f /workspace/source/JsonServer/mocks.json ] ; do - echo "Waiting for mocks.json" - sleep 1 - done - json-server --watch /workspace/source/JsonServer/mocks.json - workspaces: - - mountPath: "" - name: source - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -193,72 +104,161 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /tekton/home/npm - name: npmrc - workingDir: /workspace/source - steps: - - image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 - name: git-clone - resources: {} - script: | - #!/bin/sh - export SUBDIR="source" - echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" - git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} - git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} - git config --global credential.helper store - git clone $REPO_URL $SUBDIR - cd $SUBDIR - git checkout $PULL_BASE_SHA - echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" - workingDir: /workspace - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:14-slim - name: "" - resources: {} - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - yarn install - CI=true DISPLAY=:99 yarn run test:unit - volumes: - - name: npmrc - secret: - optional: true - secretName: npmrc + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + image: xyz/json-server:0.1.15 + name: json-server + script: | + #!/bin/ash + while [ ! -f /workspace/source/JsonServer/mocks.json ] ; do + echo "Waiting for mocks.json" + sleep 1 + done + json-server --watch /workspace/source/JsonServer/mocks.json + workspaces: + - mountPath: "" + name: source + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_BASE_SHA + echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:14-slim + name: "" + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + yarn install + CI=true DISPLAY=:99 yarn run test:unit + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + - name: source workspaces: - - description: The git repo will be cloned onto the volume backing this workspace - mountPath: /workspace - name: output - - name: source - workspaces: - - name: source - workspace: source - - name: output - workspace: output + - name: source + workspace: source + - name: output + workspace: output workspaces: - - name: source - - description: The git repo will be cloned onto the volume backing this workspace - name: output - podTemplate: {} - serviceAccountName: tekton-bot - timeout: 12h0m0s + - name: source + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 12h0m0s workspaces: - - emptyDir: {} - name: source - - emptyDir: {} - name: output + - emptyDir: {} + name: source + - emptyDir: {} + name: output status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-with-sidecar/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-with-sidecar/expected.yaml index ff990c5d3..1bafba6a1 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-with-sidecar/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps-with-sidecar/expected.yaml @@ -1,164 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - sidecars: - - env: - - name: START_XVFB - value: "false" - image: selenium/standalone-chrome - name: selenium - resources: {} - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -185,52 +104,133 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /tekton/home/npm - name: npmrc - workingDir: /workspace/source - steps: - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - volumes: - - name: npmrc - secret: - optional: true - secretName: npmrc + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + sidecars: + - computeResources: {} + env: + - name: START_XVFB + value: "false" + image: selenium/standalone-chrome + name: selenium + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps/expected.yaml index c5edf0833..0b9ef0877 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-steps/expected.yaml @@ -1,157 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: cheese spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -178,52 +104,126 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /tekton/home/npm - name: npmrc - workingDir: /workspace/source - steps: - - image: gcr.io/jenkinsxio/jx-boot:3.1.155 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: node:12-slim - name: build-npm-install - resources: {} - script: | - #!/bin/sh - npm install - - image: node:12-slim - name: build-npm-test - resources: {} - script: | - #!/bin/sh - CI=true DISPLAY=:99 npm test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-preview:0.0.143 - name: promote-jx-preview - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx preview create - volumes: - - name: npmrc - secret: - optional: true - secretName: npmrc + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /tekton/home/npm + name: npmrc + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/jenkinsxio/jx-boot:3.1.155 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: node:12-slim + name: build-npm-install + script: | + #!/bin/sh + npm install + - computeResources: {} + image: node:12-slim + name: build-npm-test + script: | + #!/bin/sh + CI=true DISPLAY=:99 npm test + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-preview:0.0.143 + name: promote-jx-preview + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx preview create + volumes: + - name: npmrc + secret: + optional: true + secretName: npmrc + taskRunTemplate: {} status: {} diff --git a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-task-and-steps/expected.yaml b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-task-and-steps/expected.yaml index 0b950a7d1..876708e04 100644 --- a/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-task-and-steps/expected.yaml +++ b/pkg/triggerconfig/inrepo/test_data/load_pipelinerun/uses-task-and-steps/expected.yaml @@ -1,165 +1,83 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: creationTimestamp: null name: release spec: params: - - name: BUILD_ID - value: "" - - name: JOB_NAME - value: "" - - name: JOB_SPEC - value: "" - - name: JOB_TYPE - value: "" - - name: PULL_BASE_REF - value: "" - - name: PULL_BASE_SHA - value: "" - - name: PULL_NUMBER - value: "" - - name: PULL_PULL_REF - value: "" - - name: PULL_PULL_SHA - value: "" - - name: PULL_REFS - value: "" - - name: REPO_NAME - value: "" - - name: REPO_OWNER - value: "" - - name: REPO_URL - value: "" + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" pipelineSpec: params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string tasks: - - name: from-build-pack - params: - - name: BUILD_ID - value: $(params.BUILD_ID) - - name: JOB_NAME - value: $(params.JOB_NAME) - - name: JOB_SPEC - value: $(params.JOB_SPEC) - - name: JOB_TYPE - value: $(params.JOB_TYPE) - - name: PULL_BASE_REF - value: $(params.PULL_BASE_REF) - - name: PULL_BASE_SHA - value: $(params.PULL_BASE_SHA) - - name: PULL_NUMBER - value: $(params.PULL_NUMBER) - - name: PULL_PULL_REF - value: $(params.PULL_PULL_REF) - - name: PULL_PULL_SHA - value: $(params.PULL_PULL_SHA) - - name: PULL_REFS - value: $(params.PULL_REFS) - - name: REPO_NAME - value: $(params.REPO_NAME) - - name: REPO_OWNER - value: $(params.REPO_OWNER) - - name: REPO_URL - value: $(params.REPO_URL) - resources: {} - taskSpec: - metadata: {} + - name: from-build-pack params: - - description: the unique build number - name: BUILD_ID - type: string - - description: the name of the job which is the trigger context name - name: JOB_NAME - type: string - - description: the specification of the job - name: JOB_SPEC - type: string - - description: '''the kind of job: postsubmit or presubmit''' - name: JOB_TYPE - type: string - - description: the base git reference of the pull request - name: PULL_BASE_REF - type: string - - description: the git sha of the base of the pull request - name: PULL_BASE_SHA - type: string - - default: "" - description: git pull request number - name: PULL_NUMBER - type: string - - default: "" - description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' - name: PULL_PULL_REF - type: string - - default: "" - description: git revision to checkout (branch, tag, sha, ref…) - name: PULL_PULL_SHA - type: string - - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' - name: PULL_REFS - type: string - - description: git repository name - name: REPO_NAME - type: string - - description: git repository owner (user or organisation) - name: REPO_OWNER - type: string - - description: git url to clone - name: REPO_URL - type: string - spec: null - stepTemplate: - env: - - name: _JAVA_OPTIONS - value: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true - -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 - -XX:AdaptiveSizePolicyWeight=90 -Xms10m -Xmx192m - - name: MAVEN_OPTS - value: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 - -Dmaven.wagon.http.retryHandler.count=3 - name: BUILD_ID value: $(params.BUILD_ID) - name: JOB_NAME @@ -186,122 +104,201 @@ spec: value: $(params.REPO_OWNER) - name: REPO_URL value: $(params.REPO_URL) - name: "" - resources: - requests: - cpu: 400m - memory: 512Mi - volumeMounts: - - mountPath: /root/.m2/ - name: maven-settings - - mountPath: /root/.gnupg - name: release-gpg - workingDir: /workspace/source - steps: - - image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 - name: git-clone - resources: {} - script: | - #!/bin/sh - export SUBDIR="source" - echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" - git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} - git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} - git config --global credential.helper store - git clone $REPO_URL $SUBDIR - cd $SUBDIR - git checkout $PULL_BASE_SHA - echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" - workingDir: /workspace - - image: gcr.io/jenkinsxio/jx-release-version:2.2.5 - name: next-version - resources: {} - script: | - #!/usr/bin/env sh - jx-release-version > VERSION - - image: ghcr.io/jenkins-x/jx-boot:3.1.335 - name: jx-variables - resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: maven:3.6-openjdk-11 - name: build-mvn-deploy - resources: {} - script: | - #!/usr/bin/env bash - source .jx/variables.sh + taskSpec: + metadata: {} + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: '''the kind of job: postsubmit or presubmit''' + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + computeResources: + requests: + cpu: 400m + memory: 512Mi + env: + - name: _JAVA_OPTIONS + value: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Xms10m -Xmx192m + - name: MAVEN_OPTS + value: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + volumeMounts: + - mountPath: /root/.m2/ + name: maven-settings + - mountPath: /root/.gnupg + name: release-gpg + workingDir: /workspace/source + steps: + - computeResources: {} + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.19.0 + name: git-clone + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_BASE_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git checkout $PULL_BASE_SHA + echo "checked out revision: $PULL_BASE_SHA to dir: $SUBDIR" + workingDir: /workspace + - computeResources: {} + image: gcr.io/jenkinsxio/jx-release-version:2.2.5 + name: next-version + script: | + #!/usr/bin/env sh + jx-release-version > VERSION + - computeResources: {} + image: ghcr.io/jenkins-x/jx-boot:3.1.335 + name: jx-variables + script: | + #!/usr/bin/env sh + jx gitops variables + - computeResources: {} + image: maven:3.6-openjdk-11 + name: build-mvn-deploy + script: | + #!/usr/bin/env bash + source .jx/variables.sh - # modify the pom.xml - echo "upgrading the pom to version $VERSION" - mvn versions:set -DnewVersion=$VERSION + # modify the pom.xml + echo "upgrading the pom to version $VERSION" + mvn versions:set -DnewVersion=$VERSION - mvn --no-transfer-progress clean deploy - - image: gcr.io/jenkinsxio/jx-registry:0.0.11 - name: check-registry - resources: {} - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build - resources: {} - script: | - #!/busybox/sh - source .jx/variables.sh - cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json - /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$PUSH_CONTAINER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION - - image: gcr.io/jenkinsxio/jx-changelog:0.0.34 - name: promote-changelog - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh + mvn --no-transfer-progress clean deploy + - computeResources: {} + image: gcr.io/jenkinsxio/jx-registry:0.0.11 + name: check-registry + - computeResources: {} + image: gcr.io/kaniko-project/executor:debug-v1.3.0 + name: build-container-build + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=Dockerfile --destination=$PUSH_CONTAINER_REGISTRY/$DOCKER_REGISTRY_ORG/$APP_NAME:$VERSION + - computeResources: {} + image: gcr.io/jenkinsxio/jx-changelog:0.0.34 + name: promote-changelog + script: | + #!/usr/bin/env sh + source .jx/variables.sh - if [ -d "charts/$REPO_NAME" ]; then - sed -i -e "s/^version:.*/version: $VERSION/" ./charts/$REPO_NAME/Chart.yaml - sed -i -e "s/repository:.*/repository: $DOCKER_REGISTRY\/$DOCKER_REGISTRY_ORG\/$APP_NAME/" ./charts/$REPO_NAME/values.yaml - sed -i -e "s/tag:.*/tag: $VERSION/" ./charts/$REPO_NAME/values.yaml; - else echo no charts; fi + if [ -d "charts/$REPO_NAME" ]; then + sed -i -e "s/^version:.*/version: $VERSION/" ./charts/$REPO_NAME/Chart.yaml + sed -i -e "s/repository:.*/repository: $DOCKER_REGISTRY\/$DOCKER_REGISTRY_ORG\/$APP_NAME/" ./charts/$REPO_NAME/values.yaml + sed -i -e "s/tag:.*/tag: $VERSION/" ./charts/$REPO_NAME/values.yaml; + else echo no charts; fi - jx changelog create --version v${VERSION} + jx changelog create --version v${VERSION} - git add * || true - git commit -a -m "chore: release $VERSION" --allow-empty - git tag -fa v$VERSION -m "Release version $VERSION" - git push --force origin v$VERSION - - image: ghcr.io/jenkins-x/jx-boot:3.1.335 - name: promote-helm-release - resources: {} - script: | - #!/usr/bin/env sh - jx gitops helm release - - image: ghcr.io/jenkins-x/jx-promote:0.0.243 - name: promote-jx-promote - resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - jx promote -b --all --timeout 1h --no-poll - volumes: - - name: maven-settings - secret: - secretName: jenkins-maven-settings - - name: release-gpg - secret: - optional: true - secretName: jenkins-release-gpg + git add * || true + git commit -a -m "chore: release $VERSION" --allow-empty + git tag -fa v$VERSION -m "Release version $VERSION" + git push --force origin v$VERSION + - computeResources: {} + image: ghcr.io/jenkins-x/jx-boot:3.1.335 + name: promote-helm-release + script: | + #!/usr/bin/env sh + jx gitops helm release + - computeResources: {} + image: ghcr.io/jenkins-x/jx-promote:0.0.243 + name: promote-jx-promote + script: | + #!/usr/bin/env sh + source .jx/variables.sh + jx promote -b --all --timeout 1h --no-poll + volumes: + - name: maven-settings + secret: + secretName: jenkins-maven-settings + - name: release-gpg + secret: + optional: true + secretName: jenkins-release-gpg + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output workspaces: - - description: The git repo will be cloned onto the volume backing this workspace - mountPath: /workspace - name: output - workspaces: - - name: output - workspace: output + - name: output + workspace: output workspaces: - - description: The git repo will be cloned onto the volume backing this workspace - name: output - podTemplate: {} - serviceAccountName: tekton-bot - timeout: 240h0m0s + - description: The git repo will be cloned onto the volume backing this workspace + name: output + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s workspaces: - - emptyDir: {} - name: output + - emptyDir: {} + name: output status: {} From 9ff142a77ca9a9fbb8f9478e097a5e5bae2d7755 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Tue, 18 Mar 2025 17:04:39 +0100 Subject: [PATCH 19/23] chore(breakpoint): make test pass with updated struct --- pkg/apis/lighthouse/v1alpha1/breakpoint_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go b/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go index 3bd28c830..726ef4fe8 100644 --- a/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go +++ b/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go @@ -90,7 +90,9 @@ func TestBreakpointResolveDebug(t *testing.T) { Task: "special-task", }, expected: &pipelinev1.TaskRunDebug{ - Breakpoint: []string{"something"}, + Breakpoints: &pipelinev1.TaskBreakpoints{ + BeforeSteps: []string{"something"}, + }, }, }, } From d2962be053abb09fe30c9809ba1e2bf539af1612 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Tue, 18 Mar 2025 17:05:12 +0100 Subject: [PATCH 20/23] chore(periodic): make test pass with new taskruntemplate --- pkg/plugins/trigger/periodic_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/plugins/trigger/periodic_test.go b/pkg/plugins/trigger/periodic_test.go index c9eda1877..ce84be264 100644 --- a/pkg/plugins/trigger/periodic_test.go +++ b/pkg/plugins/trigger/periodic_test.go @@ -178,4 +178,4 @@ func fakeUpsert(action clienttesting.Action) (handled bool, ret runtime.Object, return false, nil, nil } -const lighthouseJob = `{"kind":"LighthouseJob","apiVersion":"lighthouse.jenkins.io/v1alpha1","metadata":{"generateName":"testorg-myapp-","creationTimestamp":null,"labels":{"app":"lighthouse-webhooks","component":"periodic","created-by-lighthouse":"true","lighthouse.jenkins-x.io/job":"dailyjob","lighthouse.jenkins-x.io/type":"periodic","org":"testorg","repo":"myapp","trigger":"dailyjob"},"annotations":{"lighthouse.jenkins-x.io/job":"dailyjob"}},"spec":{"type":"periodic","agent":"tekton-pipeline","job":"dailyjob","refs":{"org":"testorg","repo":"myapp"},"pipeline_run_spec":{"pipelineSpec":{"tasks":[{"name":"echo-greeting","taskRef":{"name":"task-echo-message"},"params":[{"name":"MESSAGE","value":"$(params.GREETINGS)"},{"name":"BUILD_ID","value":"$(params.BUILD_ID)"},{"name":"JOB_NAME","value":"$(params.JOB_NAME)"},{"name":"JOB_SPEC","value":"$(params.JOB_SPEC)"},{"name":"JOB_TYPE","value":"$(params.JOB_TYPE)"},{"name":"PULL_BASE_REF","value":"$(params.PULL_BASE_REF)"},{"name":"PULL_BASE_SHA","value":"$(params.PULL_BASE_SHA)"},{"name":"PULL_NUMBER","value":"$(params.PULL_NUMBER)"},{"name":"PULL_PULL_REF","value":"$(params.PULL_PULL_REF)"},{"name":"PULL_PULL_SHA","value":"$(params.PULL_PULL_SHA)"},{"name":"PULL_REFS","value":"$(params.PULL_REFS)"},{"name":"REPO_NAME","value":"$(params.REPO_NAME)"},{"name":"REPO_OWNER","value":"$(params.REPO_OWNER)"},{"name":"REPO_URL","value":"$(params.REPO_URL)"}]}],"params":[{"name":"GREETINGS","type":"string","description":"morning greetings, default is Good Morning!","default":"Good Morning!"},{"name":"BUILD_ID","type":"string","description":"the unique build number"},{"name":"JOB_NAME","type":"string","description":"the name of the job which is the trigger context name"},{"name":"JOB_SPEC","type":"string","description":"the specification of the job"},{"name":"JOB_TYPE","type":"string","description":"'the kind of job: postsubmit or presubmit'"},{"name":"PULL_BASE_REF","type":"string","description":"the base git reference of the pull request"},{"name":"PULL_BASE_SHA","type":"string","description":"the git sha of the base of the pull request"},{"name":"PULL_NUMBER","type":"string","description":"git pull request number","default":""},{"name":"PULL_PULL_REF","type":"string","description":"git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'","default":""},{"name":"PULL_PULL_SHA","type":"string","description":"git revision to checkout (branch, tag, sha, ref…)","default":""},{"name":"PULL_REFS","type":"string","description":"git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'"},{"name":"REPO_NAME","type":"string","description":"git repository name"},{"name":"REPO_OWNER","type":"string","description":"git repository owner (user or organisation)"},{"name":"REPO_URL","type":"string","description":"git url to clone"}]}},"pipeline_run_params":[{"name":"GREETINGS"}]},"status":{"startTime":null}}` +const lighthouseJob = `{"kind":"LighthouseJob","apiVersion":"lighthouse.jenkins.io/v1alpha1","metadata":{"generateName":"testorg-myapp-","creationTimestamp":null,"labels":{"app":"lighthouse-webhooks","component":"periodic","created-by-lighthouse":"true","lighthouse.jenkins-x.io/job":"dailyjob","lighthouse.jenkins-x.io/type":"periodic","org":"testorg","repo":"myapp","trigger":"dailyjob"},"annotations":{"lighthouse.jenkins-x.io/job":"dailyjob"}},"spec":{"type":"periodic","agent":"tekton-pipeline","job":"dailyjob","refs":{"org":"testorg","repo":"myapp"},"pipeline_run_spec":{"pipelineSpec":{"tasks":[{"name":"echo-greeting","taskRef":{"name":"task-echo-message"},"params":[{"name":"MESSAGE","value":"$(params.GREETINGS)"},{"name":"BUILD_ID","value":"$(params.BUILD_ID)"},{"name":"JOB_NAME","value":"$(params.JOB_NAME)"},{"name":"JOB_SPEC","value":"$(params.JOB_SPEC)"},{"name":"JOB_TYPE","value":"$(params.JOB_TYPE)"},{"name":"PULL_BASE_REF","value":"$(params.PULL_BASE_REF)"},{"name":"PULL_BASE_SHA","value":"$(params.PULL_BASE_SHA)"},{"name":"PULL_NUMBER","value":"$(params.PULL_NUMBER)"},{"name":"PULL_PULL_REF","value":"$(params.PULL_PULL_REF)"},{"name":"PULL_PULL_SHA","value":"$(params.PULL_PULL_SHA)"},{"name":"PULL_REFS","value":"$(params.PULL_REFS)"},{"name":"REPO_NAME","value":"$(params.REPO_NAME)"},{"name":"REPO_OWNER","value":"$(params.REPO_OWNER)"},{"name":"REPO_URL","value":"$(params.REPO_URL)"}]}],"params":[{"name":"GREETINGS","type":"string","description":"morning greetings, default is Good Morning!","default":"Good Morning!"},{"name":"BUILD_ID","type":"string","description":"the unique build number"},{"name":"JOB_NAME","type":"string","description":"the name of the job which is the trigger context name"},{"name":"JOB_SPEC","type":"string","description":"the specification of the job"},{"name":"JOB_TYPE","type":"string","description":"'the kind of job: postsubmit or presubmit'"},{"name":"PULL_BASE_REF","type":"string","description":"the base git reference of the pull request"},{"name":"PULL_BASE_SHA","type":"string","description":"the git sha of the base of the pull request"},{"name":"PULL_NUMBER","type":"string","description":"git pull request number","default":""},{"name":"PULL_PULL_REF","type":"string","description":"git pull request ref in the form 'refs/pull/$PULL_NUMBER/head'","default":""},{"name":"PULL_PULL_SHA","type":"string","description":"git revision to checkout (branch, tag, sha, ref…)","default":""},{"name":"PULL_REFS","type":"string","description":"git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head'"},{"name":"REPO_NAME","type":"string","description":"git repository name"},{"name":"REPO_OWNER","type":"string","description":"git repository owner (user or organisation)"},{"name":"REPO_URL","type":"string","description":"git url to clone"}]},"taskRunTemplate":{}},"pipeline_run_params":[{"name":"GREETINGS"}]},"status":{"startTime":null}}` From 713fa2225ace26ce38f784fcd1c8528b3e5febc0 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Tue, 18 Mar 2025 17:53:37 +0100 Subject: [PATCH 21/23] test: make tests pass about activityRecord --- pkg/engines/tekton/activity_test.go | 29 +++ pkg/engines/tekton/controller.go | 8 +- pkg/engines/tekton/controller_test.go | 34 +++ .../activity/failed_single_task/pr.yaml | 78 ++---- .../activity/failed_single_task/tr.yaml | 53 ++++ .../activity/running_multiple_tasks/pr.yaml | 224 ++-------------- .../activity/running_multiple_tasks/tr.yaml | 132 ++++++++++ .../activity/running_multiple_tasks/tr2.yaml | 60 +++++ .../activity/running_single_task/pr.yaml | 85 ++---- .../activity/running_single_task/tr.yaml | 60 +++++ .../successful_multiple_tasks/pr.yaml | 241 ++---------------- .../successful_multiple_tasks/tr.yaml | 132 ++++++++++ .../successful_multiple_tasks/tr2.yaml | 77 ++++++ .../activity/successful_single_task/pr.yaml | 135 ++-------- .../activity/successful_single_task/tr.yaml | 105 ++++++++ .../expected-lhjob.yml | 8 +- .../start-batch-pullrequest/expected-pr.yml | 10 +- .../observed-lhjob.yml | 10 +- .../observed-pipeline.yml | 2 +- .../start-pullrequest/expected-lhjob.yml | 8 +- .../start-pullrequest/expected-pr.yml | 10 +- .../start-pullrequest/observed-lhjob.yml | 10 +- .../start-pullrequest/observed-pipeline.yml | 2 +- .../controller/start-push/expected-lhjob.yml | 8 +- .../controller/start-push/expected-pr.yml | 10 +- .../controller/start-push/observed-lhjob.yml | 10 +- .../start-push/observed-pipeline.yml | 2 +- .../controller/update-job/expected-lhjob.yml | 14 +- .../controller/update-job/expected-pr.yml | 18 +- .../controller/update-job/observed-lhjob.yml | 72 +++--- .../controller/update-job/observed-pr.yml | 162 ++++-------- .../controller/update-job/observed-tr.yml | 60 +++++ 32 files changed, 990 insertions(+), 879 deletions(-) create mode 100644 pkg/engines/tekton/test_data/activity/failed_single_task/tr.yaml create mode 100644 pkg/engines/tekton/test_data/activity/running_multiple_tasks/tr.yaml create mode 100644 pkg/engines/tekton/test_data/activity/running_multiple_tasks/tr2.yaml create mode 100644 pkg/engines/tekton/test_data/activity/running_single_task/tr.yaml create mode 100644 pkg/engines/tekton/test_data/activity/successful_multiple_tasks/tr.yaml create mode 100644 pkg/engines/tekton/test_data/activity/successful_multiple_tasks/tr2.yaml create mode 100644 pkg/engines/tekton/test_data/activity/successful_single_task/tr.yaml create mode 100644 pkg/engines/tekton/test_data/controller/update-job/observed-tr.yml diff --git a/pkg/engines/tekton/activity_test.go b/pkg/engines/tekton/activity_test.go index ccd5af267..d891e66d3 100644 --- a/pkg/engines/tekton/activity_test.go +++ b/pkg/engines/tekton/activity_test.go @@ -1,6 +1,7 @@ package tekton_test import ( + "context" "os" "path/filepath" "testing" @@ -12,6 +13,7 @@ import ( "github.com/stretchr/testify/assert" pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" tektonfake "github.com/tektoncd/pipeline/pkg/client/clientset/versioned/fake" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" ) @@ -42,7 +44,15 @@ func TestConvertPipelineRun(t *testing.T) { pr := loadPipelineRun(t, testDir) ns := "jx" + taskRuns := loadTaskRuns(t, testDir) + assert.NotEmpty(t, taskRuns, "TaskRuns should not be empty") + tektonfakeClient := tektonfake.NewSimpleClientset() + for _, taskRun := range taskRuns { + _, err := tektonfakeClient.TektonV1().TaskRuns(ns).Create(context.Background(), taskRun, metav1.CreateOptions{}) + assert.NoError(t, err, "Failed to create TaskRun %s in the fake client", taskRun.Name) + } + converted, err := tekton.ConvertPipelineRun(tektonfakeClient, pr, ns) assert.NoError(t, err) expected := loadRecord(t, testDir) @@ -69,6 +79,25 @@ func loadPipelineRun(t *testing.T, dir string) *pipelinev1.PipelineRun { return nil } +func loadTaskRuns(t *testing.T, dir string) []*pipelinev1.TaskRun { + files, err := filepath.Glob(filepath.Join(dir, "tr*.yaml")) + if assert.NoError(t, err, "Failed to list files in directory %s", dir) { + var taskRuns []*pipelinev1.TaskRun + for _, fileName := range files { + data, err := os.ReadFile(fileName) + if assert.NoError(t, err, "Failed to load file %s", fileName) { + taskRun := &pipelinev1.TaskRun{} + err = yaml.Unmarshal(data, taskRun) + if assert.NoError(t, err, "Failed to unmarshal YAML file %s", fileName) { + taskRuns = append(taskRuns, taskRun) + } + } + } + return taskRuns + } + return nil +} + func loadRecord(t *testing.T, dir string) *v1alpha1.ActivityRecord { fileName := filepath.Join(dir, "record.yaml") if assertFileExists(t, fileName) { diff --git a/pkg/engines/tekton/controller.go b/pkg/engines/tekton/controller.go index 96f0605c3..68d737541 100644 --- a/pkg/engines/tekton/controller.go +++ b/pkg/engines/tekton/controller.go @@ -8,7 +8,6 @@ import ( "text/template" lighthousev1alpha1 "github.com/jenkins-x/lighthouse/pkg/apis/lighthouse/v1alpha1" - "github.com/jenkins-x/lighthouse/pkg/clients" configjob "github.com/jenkins-x/lighthouse/pkg/config/job" "github.com/jenkins-x/lighthouse/pkg/util" "github.com/pkg/errors" @@ -185,11 +184,8 @@ func (r *LighthouseJobReconciler) Reconcile(ctx context.Context, req ctrl.Reques if r.dashboardURL != "" { job.Status.ReportURL = r.getPipelingetPipelineTargetURLeTargetURL(pipelineRun) } - tektonclient, _, _, _, err := clients.GetAPIClients() - if err != nil { - return errors.Wrapf(err, "failed to get api clients") - } - activity, err := ConvertPipelineRun(tektonclient, &pipelineRun, req.Namespace) + + activity, err := ConvertPipelineRun(r.tektonclient, &pipelineRun, req.Namespace) if err != nil { return errors.Wrapf(err, "failed to convert PipelineRun") } diff --git a/pkg/engines/tekton/controller_test.go b/pkg/engines/tekton/controller_test.go index c9875f66b..74262c8a6 100644 --- a/pkg/engines/tekton/controller_test.go +++ b/pkg/engines/tekton/controller_test.go @@ -64,6 +64,8 @@ func TestReconcile(t *testing.T) { assert.NoError(t, err) observedPipeline, err := loadObservedPipeline(testData) assert.NoError(t, err) + observedTR, _, err := loadControllerTaskRun(true, testData) + assert.NoError(t, err) var state []client.Object if observedPR != nil { state = append(state, observedPR) @@ -75,6 +77,11 @@ func TestReconcile(t *testing.T) { state = append(state, observedPipeline) } tektonfakeClient := tektonfake.NewSimpleClientset() + if observedTR != nil { + state = append(state, observedTR) + _, err = tektonfakeClient.TektonV1().TaskRuns(ns).Create(context.Background(), observedTR, metav1.CreateOptions{}) + assert.NoError(t, err, "Failed to create TaskRun %s in the fake client", observedTR.Name) + } // load expected state expectedPR, expectedPRFile, err := loadControllerPipelineRun(false, testData) @@ -176,6 +183,33 @@ func loadLighthouseJob(isObserved bool, dir string) (*lighthousev1alpha1.Lightho return nil, fileName, nil } +func loadControllerTaskRun(isObserved bool, dir string) (*pipelinev1.TaskRun, string, error) { + var baseFn string + if isObserved { + baseFn = "observed-tr.yml" + } else { + baseFn = "expected-tr.yml" + } + fileName := filepath.Join(dir, baseFn) + exists, err := util.FileExists(fileName) + if err != nil { + return nil, fileName, err + } + if exists { + tr := &pipelinev1.TaskRun{} + data, err := os.ReadFile(fileName) + if err != nil { + return nil, fileName, err + } + err = yaml.Unmarshal(data, tr) + if err != nil { + return nil, fileName, err + } + return tr, fileName, err + } + return nil, fileName, nil +} + func loadControllerPipelineRun(isObserved bool, dir string) (*pipelinev1.PipelineRun, string, error) { var baseFn string if isObserved { diff --git a/pkg/engines/tekton/test_data/activity/failed_single_task/pr.yaml b/pkg/engines/tekton/test_data/activity/failed_single_task/pr.yaml index d3c5aa230..c0fced527 100644 --- a/pkg/engines/tekton/test_data/activity/failed_single_task/pr.yaml +++ b/pkg/engines/tekton/test_data/activity/failed_single_task/pr.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -24,7 +24,7 @@ metadata: name: jenkins-x-charts-jx-build-templ-wbbx6-7 namespace: jx resourceVersion: "16699294" - selfLink: /apis/tekton.dev/v1beta1/namespaces/jx/pipelineruns/jenkins-x-charts-jx-build-templ-wbbx6-7 + selfLink: /apis/tekton.dev/v1/namespaces/jx/pipelineruns/jenkins-x-charts-jx-build-templ-wbbx6-7 uid: dd626c56-cab9-11ea-a610-42010a8400cb spec: params: @@ -33,18 +33,20 @@ spec: - name: build_id value: "7" pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: - schedulerName: "" - resources: + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s + computeResources: - name: jenkins-x-charts-jx-build-templ-wbbx6 resourceRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6 - serviceAccountName: tekton-bot - timeout: 240h0m0s status: + startTime: "2020-07-20T18:50:22Z" completionTime: "2020-07-20T18:50:43Z" conditions: - lastTransitionTime: "2020-07-20T18:50:43Z" @@ -53,57 +55,7 @@ status: reason: Failed status: "False" type: Succeeded - startTime: "2020-07-20T18:50:22Z" - taskRuns: - jenkins-x-charts-jx-build-templ-wbbx6-7-from-build-pack-zjcjs: - pipelineTaskName: from-build-pack - status: - completionTime: "2020-07-20T18:50:43Z" - conditions: - - lastTransitionTime: "2020-07-20T18:50:43Z" - message: '"step-build-build" exited with code 2 (image: "docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:e07b1253adee49f22be8011a306892cb5e4f3bb31820a48af602a1d22175d194"); - for logs run: kubectl -n jx logs jenkins-x-charts-jx-build-templ-wbbx6-7-from-build-pack-z-dncc5 - -c step-build-build' - reason: Failed - status: "False" - type: Succeeded - podName: jenkins-x-charts-jx-build-templ-wbbx6-7-from-build-pack-z-dncc5 - startTime: "2020-07-20T18:50:22Z" - steps: - - container: step-setup-builder-home - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: setup-builder-home - terminated: - containerID: docker://668ec740179a94e0079f6aeb5792bb055084630be4fc3570dc2ea829b4e50aaa - exitCode: 0 - finishedAt: "2020-07-20T18:50:31Z" - reason: Completed - startedAt: "2020-07-20T18:50:31Z" - - container: step-git-merge - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: git-merge - terminated: - containerID: docker://e04a4c966e80ac96880d3d070f4a036a1f2f96b699b430e5b3c69e75ecf14443 - exitCode: 0 - finishedAt: "2020-07-20T18:50:33Z" - reason: Completed - startedAt: "2020-07-20T18:50:31Z" - - container: step-build-build - imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:e07b1253adee49f22be8011a306892cb5e4f3bb31820a48af602a1d22175d194 - name: build-build - terminated: - containerID: docker://36496b028da8b73d64fe74f1931e8e45a1b38e26b4f92d95b6f23c3eb9214eda - exitCode: 2 - finishedAt: "2020-07-20T18:50:43Z" - reason: Error - startedAt: "2020-07-20T18:50:34Z" - - container: step-git-source-jenkins-x-charts-jx-build-templ-wbbx6-67k4m - imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 - name: git-source-jenkins-x-charts-jx-build-templ-wbbx6-67k4m - terminated: - containerID: docker://db96a8cc1edac1f8790fe553596da3e34b3ea69b8e5f8a1647d4b06d8f1a26cf - exitCode: 0 - finishedAt: "2020-07-20T18:50:30Z" - message: '[{"key":"commit","value":"b5bf878e8a278681117619aa12053431ab743415","resourceRef":{"name":"jenkins-x-charts-jx-build-templ-wbbx6"}}]' - reason: Completed - startedAt: "2020-07-20T18:50:27Z" + childReferences: + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: jenkins-x-charts-jx-build-templ-wbbx6-7-from-build-pack-zjcjs diff --git a/pkg/engines/tekton/test_data/activity/failed_single_task/tr.yaml b/pkg/engines/tekton/test_data/activity/failed_single_task/tr.yaml new file mode 100644 index 000000000..bd93bf6b9 --- /dev/null +++ b/pkg/engines/tekton/test_data/activity/failed_single_task/tr.yaml @@ -0,0 +1,53 @@ +apiVersion: tekton.dev/v1 +kind: TaskRun +metadata: + name: jenkins-x-charts-jx-build-templ-wbbx6-7-from-build-pack-zjcjs +status: + completionTime: "2020-07-20T18:50:43Z" + startTime: "2020-07-20T18:50:22Z" + conditions: + - lastTransitionTime: "2020-07-20T18:50:43Z" + message: '"step-build-build" exited with code 2 (image: "docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:e07b1253adee49f22be8011a306892cb5e4f3bb31820a48af602a1d22175d194"); + for logs run: kubectl -n jx logs jenkins-x-charts-jx-build-templ-wbbx6-7-from-build-pack-z-dncc5 + -c step-build-build' + reason: Failed + status: "False" + type: Succeeded + steps: + - container: step-setup-builder-home + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: setup-builder-home + terminated: + containerID: docker://668ec740179a94e0079f6aeb5792bb055084630be4fc3570dc2ea829b4e50aaa + exitCode: 0 + finishedAt: "2020-07-20T18:50:31Z" + reason: Completed + startedAt: "2020-07-20T18:50:31Z" + - container: step-git-merge + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: git-merge + terminated: + containerID: docker://e04a4c966e80ac96880d3d070f4a036a1f2f96b699b430e5b3c69e75ecf14443 + exitCode: 0 + finishedAt: "2020-07-20T18:50:33Z" + reason: Completed + startedAt: "2020-07-20T18:50:31Z" + - container: step-build-build + imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:e07b1253adee49f22be8011a306892cb5e4f3bb31820a48af602a1d22175d194 + name: build-build + terminated: + containerID: docker://36496b028da8b73d64fe74f1931e8e45a1b38e26b4f92d95b6f23c3eb9214eda + exitCode: 2 + finishedAt: "2020-07-20T18:50:43Z" + reason: Error + startedAt: "2020-07-20T18:50:34Z" + - container: step-git-source-jenkins-x-charts-jx-build-templ-wbbx6-67k4m + imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 + name: git-source-jenkins-x-charts-jx-build-templ-wbbx6-67k4m + terminated: + containerID: docker://db96a8cc1edac1f8790fe553596da3e34b3ea69b8e5f8a1647d4b06d8f1a26cf + exitCode: 0 + finishedAt: "2020-07-20T18:50:30Z" + message: '[{"key":"commit","value":"b5bf878e8a278681117619aa12053431ab743415","resourceRef":{"name":"jenkins-x-charts-jx-build-templ-wbbx6"}}]' + reason: Completed + startedAt: "2020-07-20T18:50:27Z" diff --git a/pkg/engines/tekton/test_data/activity/running_multiple_tasks/pr.yaml b/pkg/engines/tekton/test_data/activity/running_multiple_tasks/pr.yaml index e76824091..5c8a1d043 100644 --- a/pkg/engines/tekton/test_data/activity/running_multiple_tasks/pr.yaml +++ b/pkg/engines/tekton/test_data/activity/running_multiple_tasks/pr.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -24,7 +24,7 @@ metadata: name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 namespace: jx resourceVersion: "16726271" - selfLink: /apis/tekton.dev/v1beta1/namespaces/jx/pipelineruns/jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + selfLink: /apis/tekton.dev/v1/namespaces/jx/pipelineruns/jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 uid: 3edf18d1-cac2-11ea-a610-42010a8400cb spec: params: @@ -33,218 +33,30 @@ spec: - name: build_id value: "17" pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 - podTemplate: - schedulerName: "" - resources: + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s + computeResources: - name: jenkins-x-jx-pr-7463-boot-vault-9mbgb resourceRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-jx-pr-7463-boot-vault-9mbgb - serviceAccountName: tekton-bot - timeout: 240h0m0s status: + startTime: "2020-07-20T19:50:21Z" conditions: - lastTransitionTime: "2020-07-20T19:56:53Z" message: 'Tasks Completed: 1, Incomplete: 1, Skipped: 0' reason: Running status: Unknown type: Succeeded - startTime: "2020-07-20T19:50:21Z" - taskRuns: - jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-build-2jnvr: - pipelineTaskName: build - status: - completionTime: "2020-07-20T19:56:53Z" - conditions: - - lastTransitionTime: "2020-07-20T19:56:53Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-build-2jnvr-pod-kkvlf - resourcesResult: - - key: commit - resourceRef: - name: jenkins-x-jx-pr-7463-boot-vault-9mbgb - value: c47ce72d4e2991a9440e6d954ecbf79d596f9352 - startTime: "2020-07-20T19:50:21Z" - steps: - - container: step-setup-builder-home - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: setup-builder-home - terminated: - containerID: docker://4e6c91b0b0ade1bd04b96f7f084efadd4b0dcb86499efa90aeae48864f1aad29 - exitCode: 0 - finishedAt: "2020-07-20T19:50:57Z" - reason: Completed - startedAt: "2020-07-20T19:50:57Z" - - container: step-git-merge - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: git-merge - terminated: - containerID: docker://cf2b9d3a4f88b75ce1508dfb424c20190886e498aa91a0ee759696102406876f - exitCode: 0 - finishedAt: "2020-07-20T19:51:06Z" - reason: Completed - startedAt: "2020-07-20T19:50:57Z" - - container: step-build-binary - imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e - name: build-binary - terminated: - containerID: docker://0963449726cedd5cca64ff089c0f2687c5321910a665fadb13f5b0352b1760e9 - exitCode: 0 - finishedAt: "2020-07-20T19:55:11Z" - reason: Completed - startedAt: "2020-07-20T19:51:06Z" - - container: step-validate-binary - imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e - name: validate-binary - terminated: - containerID: docker://5fa8e77cfa71de5b0fb8ef8f04fbacedcfe4bff315d210b3de24dd0454dc4223 - exitCode: 0 - finishedAt: "2020-07-20T19:55:12Z" - reason: Completed - startedAt: "2020-07-20T19:55:12Z" - - container: step-build-and-push-image - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-image - terminated: - containerID: docker://ae13ac1ca38d4eba9a15579e24cf3ee7c9ef07b6f5e2b66cf73dd1e6cdd8a7ef - exitCode: 0 - finishedAt: "2020-07-20T19:55:32Z" - reason: Completed - startedAt: "2020-07-20T19:55:12Z" - - container: step-build-and-push-nodejs - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-nodejs - terminated: - containerID: docker://129fb2adbefc19d7048f195a18d15fc50b5d37b89f842950285275b305d92692 - exitCode: 0 - finishedAt: "2020-07-20T19:55:52Z" - reason: Completed - startedAt: "2020-07-20T19:55:32Z" - - container: step-create-dir-workspace-w6cv9 - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: create-dir-workspace-w6cv9 - terminated: - containerID: docker://f7cc84a5b893697eb8e6907000bf7391d53c334bc1e684d732c29b295a59541d - exitCode: 0 - finishedAt: "2020-07-20T19:50:53Z" - reason: Completed - startedAt: "2020-07-20T19:50:53Z" - - container: step-build-and-push-go - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-go - terminated: - containerID: docker://16448a801a725ddcdc8e77402dd79ce7fa47d6b1d38b6e74977093d417bb1935 - exitCode: 0 - finishedAt: "2020-07-20T19:56:31Z" - reason: Completed - startedAt: "2020-07-20T19:56:12Z" - - container: step-build-and-push-go-nodejs - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-go-nodejs - terminated: - containerID: docker://da07e413f75b5936fb142b86fa1017f1821dcccd49831bc846512b48277ab42c - exitCode: 0 - finishedAt: "2020-07-20T19:56:49Z" - reason: Completed - startedAt: "2020-07-20T19:56:31Z" - - container: step-git-source-jenkins-x-jx-pr-7463-boot-vault-9mbgb-6jfk4 - imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 - name: git-source-jenkins-x-jx-pr-7463-boot-vault-9mbgb-6jfk4 - terminated: - containerID: docker://69532706184d73b07d2cf8597d9f857a89df3483880f517f7e1ff74a189c3c34 - exitCode: 0 - finishedAt: "2020-07-20T19:50:57Z" - message: '[{"key":"commit","value":"c47ce72d4e2991a9440e6d954ecbf79d596f9352","resourceRef":{"name":"jenkins-x-jx-pr-7463-boot-vault-9mbgb"}}]' - reason: Completed - startedAt: "2020-07-20T19:50:54Z" - - container: step-source-copy-jenkins-x-jx-pr-7463-boot-vault-9mbgb-x6nv4 - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: source-copy-jenkins-x-jx-pr-7463-boot-vault-9mbgb-x6nv4 - terminated: - containerID: docker://63e982f4bef496b2af836905028375baa1e694f52e634a3420fc7aff1a8cf3f8 - exitCode: 0 - finishedAt: "2020-07-20T19:56:52Z" - reason: Completed - startedAt: "2020-07-20T19:56:50Z" - - container: step-source-mkdir-jenkins-x-jx-pr-7463-boot-vault-9mbgb-tdcg5 - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: source-mkdir-jenkins-x-jx-pr-7463-boot-vault-9mbgb-tdcg5 - terminated: - containerID: docker://d8da3c25e308812ad5798a04519e0692567e9501bdaa219711cef5e0b3cd20e9 - exitCode: 0 - finishedAt: "2020-07-20T19:56:50Z" - reason: Completed - startedAt: "2020-07-20T19:56:50Z" - - container: step-build-and-push-maven - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-maven - terminated: - containerID: docker://a06a114785c5794c13dafa21d0f548037c29c9690450e4a1933ad9e272473df3 - exitCode: 0 - finishedAt: "2020-07-20T19:56:11Z" - reason: Completed - startedAt: "2020-07-20T19:55:52Z" - jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-e2e-tests-ds74m: - pipelineTaskName: e2e-tests - status: - conditions: - - lastTransitionTime: "2020-07-20T19:58:36Z" - message: Not all Steps in the Task have finished executing - reason: Running - status: Unknown - type: Succeeded - podName: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-e2e-tests-ds74m--w4ttd - startTime: "2020-07-20T19:56:53Z" - steps: - - container: step-setup-builder-home - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: setup-builder-home - terminated: - containerID: docker://2a6124bda33744d5710c9ab6d2787db4bfc31aaf1e92725b7c8bbc8dfb0e1f73 - exitCode: 0 - finishedAt: "2020-07-20T19:58:45Z" - reason: Completed - startedAt: "2020-07-20T19:58:44Z" - - container: step-boot-vault-e2e-tests - imageID: docker-pullable://gcr.io/jenkinsxio/builder-go-nodejs@sha256:e46a06e4bb1ef265389fa10d83ecffee6e3e3391c050ed347d32ccae4fcb26e0 - name: boot-vault-e2e-tests - running: - startedAt: "2020-07-20T19:58:12Z" - - container: step-generate-report - imageID: docker-pullable://gcr.io/jenkinsxio/builder-nodejs10x@sha256:e7ff71273ddd8a1a3db7aae0cbbbf294d136ffb22416814dc1ba966061d66a51 - name: generate-report - running: - startedAt: "2020-07-20T19:58:12Z" - - container: step-clear-kubeconfig - imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:6560c7cddfe1712c840ff6f429fedf961c7ad442c3b3e0f48c4f83f1f29156ed - name: clear-kubeconfig - running: - startedAt: "2020-07-20T19:58:36Z" - - container: step-stashhtmlreport - imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:6560c7cddfe1712c840ff6f429fedf961c7ad442c3b3e0f48c4f83f1f29156ed - name: stashhtmlreport - running: - startedAt: "2020-07-20T19:58:36Z" - - container: step-source-copy-workspace-7hpkx - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: source-copy-workspace-7hpkx - terminated: - containerID: docker://d7b36a57400a1efe415311e6b1516e3e0c7a1ab87454eade9caea6f1f739be85 - exitCode: 0 - finishedAt: "2020-07-20T19:58:44Z" - reason: Completed - startedAt: "2020-07-20T19:58:38Z" - - container: step-create-dir-workspace-tncdr - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: create-dir-workspace-tncdr - terminated: - containerID: docker://e899d802cdbd5e93925451244128ef98c95da5c6f219fd51ba5a9c09e59eb296 - exitCode: 0 - finishedAt: "2020-07-20T19:58:38Z" - reason: Completed - startedAt: "2020-07-20T19:58:38Z" + childReferences: + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-build-2jnvr + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-e2e-tests-ds74m diff --git a/pkg/engines/tekton/test_data/activity/running_multiple_tasks/tr.yaml b/pkg/engines/tekton/test_data/activity/running_multiple_tasks/tr.yaml new file mode 100644 index 000000000..31b54aa7a --- /dev/null +++ b/pkg/engines/tekton/test_data/activity/running_multiple_tasks/tr.yaml @@ -0,0 +1,132 @@ +apiVersion: tekton.dev/v1 +kind: TaskRun +metadata: + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-build-2jnvr +status: + completionTime: "2020-07-20T19:56:53Z" + startTime: "2020-07-20T19:50:21Z" + conditions: + - lastTransitionTime: "2020-07-20T19:56:53Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + steps: + - container: step-setup-builder-home + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: setup-builder-home + terminated: + containerID: docker://4e6c91b0b0ade1bd04b96f7f084efadd4b0dcb86499efa90aeae48864f1aad29 + exitCode: 0 + finishedAt: "2020-07-20T19:50:57Z" + reason: Completed + startedAt: "2020-07-20T19:50:57Z" + - container: step-git-merge + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: git-merge + terminated: + containerID: docker://cf2b9d3a4f88b75ce1508dfb424c20190886e498aa91a0ee759696102406876f + exitCode: 0 + finishedAt: "2020-07-20T19:51:06Z" + reason: Completed + startedAt: "2020-07-20T19:50:57Z" + - container: step-build-binary + imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e + name: build-binary + terminated: + containerID: docker://0963449726cedd5cca64ff089c0f2687c5321910a665fadb13f5b0352b1760e9 + exitCode: 0 + finishedAt: "2020-07-20T19:55:11Z" + reason: Completed + startedAt: "2020-07-20T19:51:06Z" + - container: step-validate-binary + imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e + name: validate-binary + terminated: + containerID: docker://5fa8e77cfa71de5b0fb8ef8f04fbacedcfe4bff315d210b3de24dd0454dc4223 + exitCode: 0 + finishedAt: "2020-07-20T19:55:12Z" + reason: Completed + startedAt: "2020-07-20T19:55:12Z" + - container: step-build-and-push-image + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-image + terminated: + containerID: docker://ae13ac1ca38d4eba9a15579e24cf3ee7c9ef07b6f5e2b66cf73dd1e6cdd8a7ef + exitCode: 0 + finishedAt: "2020-07-20T19:55:32Z" + reason: Completed + startedAt: "2020-07-20T19:55:12Z" + - container: step-build-and-push-nodejs + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-nodejs + terminated: + containerID: docker://129fb2adbefc19d7048f195a18d15fc50b5d37b89f842950285275b305d92692 + exitCode: 0 + finishedAt: "2020-07-20T19:55:52Z" + reason: Completed + startedAt: "2020-07-20T19:55:32Z" + - container: step-create-dir-workspace-w6cv9 + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: create-dir-workspace-w6cv9 + terminated: + containerID: docker://f7cc84a5b893697eb8e6907000bf7391d53c334bc1e684d732c29b295a59541d + exitCode: 0 + finishedAt: "2020-07-20T19:50:53Z" + reason: Completed + startedAt: "2020-07-20T19:50:53Z" + - container: step-build-and-push-go + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-go + terminated: + containerID: docker://16448a801a725ddcdc8e77402dd79ce7fa47d6b1d38b6e74977093d417bb1935 + exitCode: 0 + finishedAt: "2020-07-20T19:56:31Z" + reason: Completed + startedAt: "2020-07-20T19:56:12Z" + - container: step-build-and-push-go-nodejs + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-go-nodejs + terminated: + containerID: docker://da07e413f75b5936fb142b86fa1017f1821dcccd49831bc846512b48277ab42c + exitCode: 0 + finishedAt: "2020-07-20T19:56:49Z" + reason: Completed + startedAt: "2020-07-20T19:56:31Z" + - container: step-git-source-jenkins-x-jx-pr-7463-boot-vault-9mbgb-6jfk4 + imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 + name: git-source-jenkins-x-jx-pr-7463-boot-vault-9mbgb-6jfk4 + terminated: + containerID: docker://69532706184d73b07d2cf8597d9f857a89df3483880f517f7e1ff74a189c3c34 + exitCode: 0 + finishedAt: "2020-07-20T19:50:57Z" + message: '[{"key":"commit","value":"c47ce72d4e2991a9440e6d954ecbf79d596f9352","resourceRef":{"name":"jenkins-x-jx-pr-7463-boot-vault-9mbgb"}}]' + reason: Completed + startedAt: "2020-07-20T19:50:54Z" + - container: step-source-copy-jenkins-x-jx-pr-7463-boot-vault-9mbgb-x6nv4 + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: source-copy-jenkins-x-jx-pr-7463-boot-vault-9mbgb-x6nv4 + terminated: + containerID: docker://63e982f4bef496b2af836905028375baa1e694f52e634a3420fc7aff1a8cf3f8 + exitCode: 0 + finishedAt: "2020-07-20T19:56:52Z" + reason: Completed + startedAt: "2020-07-20T19:56:50Z" + - container: step-source-mkdir-jenkins-x-jx-pr-7463-boot-vault-9mbgb-tdcg5 + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: source-mkdir-jenkins-x-jx-pr-7463-boot-vault-9mbgb-tdcg5 + terminated: + containerID: docker://d8da3c25e308812ad5798a04519e0692567e9501bdaa219711cef5e0b3cd20e9 + exitCode: 0 + finishedAt: "2020-07-20T19:56:50Z" + reason: Completed + startedAt: "2020-07-20T19:56:50Z" + - container: step-build-and-push-maven + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-maven + terminated: + containerID: docker://a06a114785c5794c13dafa21d0f548037c29c9690450e4a1933ad9e272473df3 + exitCode: 0 + finishedAt: "2020-07-20T19:56:11Z" + reason: Completed + startedAt: "2020-07-20T19:55:52Z" diff --git a/pkg/engines/tekton/test_data/activity/running_multiple_tasks/tr2.yaml b/pkg/engines/tekton/test_data/activity/running_multiple_tasks/tr2.yaml new file mode 100644 index 000000000..2f8337e24 --- /dev/null +++ b/pkg/engines/tekton/test_data/activity/running_multiple_tasks/tr2.yaml @@ -0,0 +1,60 @@ +apiVersion: tekton.dev/v1 +kind: TaskRun +metadata: + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-e2e-tests-ds74m +status: + startTime: "2020-07-20T19:56:53Z" + conditions: + - lastTransitionTime: "2020-07-20T19:58:36Z" + message: Not all Steps in the Task have finished executing + reason: Running + status: Unknown + type: Succeeded + steps: + - container: step-setup-builder-home + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: setup-builder-home + terminated: + containerID: docker://2a6124bda33744d5710c9ab6d2787db4bfc31aaf1e92725b7c8bbc8dfb0e1f73 + exitCode: 0 + finishedAt: "2020-07-20T19:58:45Z" + reason: Completed + startedAt: "2020-07-20T19:58:44Z" + - container: step-boot-vault-e2e-tests + imageID: docker-pullable://gcr.io/jenkinsxio/builder-go-nodejs@sha256:e46a06e4bb1ef265389fa10d83ecffee6e3e3391c050ed347d32ccae4fcb26e0 + name: boot-vault-e2e-tests + running: + startedAt: "2020-07-20T19:58:12Z" + - container: step-generate-report + imageID: docker-pullable://gcr.io/jenkinsxio/builder-nodejs10x@sha256:e7ff71273ddd8a1a3db7aae0cbbbf294d136ffb22416814dc1ba966061d66a51 + name: generate-report + running: + startedAt: "2020-07-20T19:58:12Z" + - container: step-clear-kubeconfig + imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:6560c7cddfe1712c840ff6f429fedf961c7ad442c3b3e0f48c4f83f1f29156ed + name: clear-kubeconfig + running: + startedAt: "2020-07-20T19:58:36Z" + - container: step-stashhtmlreport + imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:6560c7cddfe1712c840ff6f429fedf961c7ad442c3b3e0f48c4f83f1f29156ed + name: stashhtmlreport + running: + startedAt: "2020-07-20T19:58:36Z" + - container: step-source-copy-workspace-7hpkx + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: source-copy-workspace-7hpkx + terminated: + containerID: docker://d7b36a57400a1efe415311e6b1516e3e0c7a1ab87454eade9caea6f1f739be85 + exitCode: 0 + finishedAt: "2020-07-20T19:58:44Z" + reason: Completed + startedAt: "2020-07-20T19:58:38Z" + - container: step-create-dir-workspace-tncdr + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: create-dir-workspace-tncdr + terminated: + containerID: docker://e899d802cdbd5e93925451244128ef98c95da5c6f219fd51ba5a9c09e59eb296 + exitCode: 0 + finishedAt: "2020-07-20T19:58:38Z" + reason: Completed + startedAt: "2020-07-20T19:58:38Z" diff --git a/pkg/engines/tekton/test_data/activity/running_single_task/pr.yaml b/pkg/engines/tekton/test_data/activity/running_single_task/pr.yaml index 73c816a35..9644c9e74 100644 --- a/pkg/engines/tekton/test_data/activity/running_single_task/pr.yaml +++ b/pkg/engines/tekton/test_data/activity/running_single_task/pr.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -24,7 +24,7 @@ metadata: name: jenkins-x-jx-pr-7463-unit-wbf7v-18 namespace: jx resourceVersion: "16732905" - selfLink: /apis/tekton.dev/v1beta1/namespaces/jx/pipelineruns/jenkins-x-jx-pr-7463-unit-wbf7v-18 + selfLink: /apis/tekton.dev/v1/namespaces/jx/pipelineruns/jenkins-x-jx-pr-7463-unit-wbf7v-18 uid: bc78bda8-cac5-11ea-a610-42010a8400cb spec: params: @@ -33,82 +33,27 @@ spec: - name: build_id value: "18" pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-jx-pr-7463-unit-wbf7v-18 - podTemplate: - schedulerName: "" - resources: + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s + computeResources: - name: jenkins-x-jx-pr-7463-unit-wbf7v resourceRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-jx-pr-7463-unit-wbf7v - serviceAccountName: tekton-bot - timeout: 240h0m0s status: + startTime: "2020-07-20T20:15:20Z" conditions: - lastTransitionTime: "2020-07-20T20:15:20Z" message: 'Tasks Completed: 0, Incomplete: 1, Skipped: 0' reason: Running status: Unknown type: Succeeded - startTime: "2020-07-20T20:15:20Z" - taskRuns: - jenkins-x-jx-pr-7463-unit-wbf7v-18-ci-8r5qw: - pipelineTaskName: ci - status: - conditions: - - lastTransitionTime: "2020-07-20T20:15:32Z" - message: Not all Steps in the Task have finished executing - reason: Running - status: Unknown - type: Succeeded - podName: jenkins-x-jx-pr-7463-unit-wbf7v-18-ci-8r5qw-pod-76qzz - startTime: "2020-07-20T20:15:20Z" - steps: - - container: step-setup-builder-home - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: setup-builder-home - terminated: - containerID: docker://9ff452e9e09706f7ce7fc3ff2b0b769336ea6160a120e6a9c3a8a2098b2afc8e - exitCode: 0 - finishedAt: "2020-07-20T20:15:37Z" - reason: Completed - startedAt: "2020-07-20T20:15:37Z" - - container: step-git-merge - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: git-merge - terminated: - containerID: docker://6b46062c9e0c0a59ed257dc76998180eb165556f5ef636007896f7dbfcb14409 - exitCode: 0 - finishedAt: "2020-07-20T20:15:48Z" - reason: Completed - startedAt: "2020-07-20T20:15:37Z" - - container: step-init-jx - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:ab77416f4eb310c86dde4dc0d7ba9277dba633b9e0dcda2b0d7265742ab28d3d - name: init-jx - terminated: - containerID: docker://557593f6feea5e417bf45debbca0f2e430e427ed0dbf88b37c2fb86619d5290d - exitCode: 0 - finishedAt: "2020-07-20T20:15:51Z" - reason: Completed - startedAt: "2020-07-20T20:15:48Z" - - container: step-build - imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e - name: build - running: - startedAt: "2020-07-20T20:15:31Z" - - container: step-unit-test - imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e - name: unit-test - running: - startedAt: "2020-07-20T20:15:31Z" - - container: step-git-source-jenkins-x-jx-pr-7463-unit-wbf7v-vrx5d - imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 - name: git-source-jenkins-x-jx-pr-7463-unit-wbf7v-vrx5d - terminated: - containerID: docker://40fd861cee402ee184685b7d756a009578a5877c172787fc31ff000c28a6d047 - exitCode: 0 - finishedAt: "2020-07-20T20:15:37Z" - message: '[{"key":"commit","value":"c47ce72d4e2991a9440e6d954ecbf79d596f9352","resourceRef":{"name":"jenkins-x-jx-pr-7463-unit-wbf7v"}}]' - reason: Completed - startedAt: "2020-07-20T20:15:34Z" + childReferences: + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: jenkins-x-jx-pr-7463-unit-wbf7v-18-ci-8r5qw diff --git a/pkg/engines/tekton/test_data/activity/running_single_task/tr.yaml b/pkg/engines/tekton/test_data/activity/running_single_task/tr.yaml new file mode 100644 index 000000000..f1083bb48 --- /dev/null +++ b/pkg/engines/tekton/test_data/activity/running_single_task/tr.yaml @@ -0,0 +1,60 @@ +apiVersion: tekton.dev/v1 +kind: TaskRun +metadata: + name: jenkins-x-jx-pr-7463-unit-wbf7v-18-ci-8r5qw +status: + startTime: "2020-07-20T20:15:20Z" + conditions: + - lastTransitionTime: "2020-07-20T20:15:32Z" + message: Not all Steps in the Task have finished executing + reason: Running + status: Unknown + type: Succeeded + steps: + - container: step-setup-builder-home + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: setup-builder-home + terminated: + containerID: docker://9ff452e9e09706f7ce7fc3ff2b0b769336ea6160a120e6a9c3a8a2098b2afc8e + exitCode: 0 + finishedAt: "2020-07-20T20:15:37Z" + reason: Completed + startedAt: "2020-07-20T20:15:37Z" + - container: step-git-merge + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: git-merge + terminated: + containerID: docker://6b46062c9e0c0a59ed257dc76998180eb165556f5ef636007896f7dbfcb14409 + exitCode: 0 + finishedAt: "2020-07-20T20:15:48Z" + reason: Completed + startedAt: "2020-07-20T20:15:37Z" + - container: step-init-jx + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:ab77416f4eb310c86dde4dc0d7ba9277dba633b9e0dcda2b0d7265742ab28d3d + name: init-jx + terminated: + containerID: docker://557593f6feea5e417bf45debbca0f2e430e427ed0dbf88b37c2fb86619d5290d + exitCode: 0 + finishedAt: "2020-07-20T20:15:51Z" + reason: Completed + startedAt: "2020-07-20T20:15:48Z" + - container: step-build + imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e + name: build + running: + startedAt: "2020-07-20T20:15:31Z" + - container: step-unit-test + imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e + name: unit-test + running: + startedAt: "2020-07-20T20:15:31Z" + - container: step-git-source-jenkins-x-jx-pr-7463-unit-wbf7v-vrx5d + imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 + name: git-source-jenkins-x-jx-pr-7463-unit-wbf7v-vrx5d + terminated: + containerID: docker://40fd861cee402ee184685b7d756a009578a5877c172787fc31ff000c28a6d047 + exitCode: 0 + finishedAt: "2020-07-20T20:15:37Z" + message: '[{"key":"commit","value":"c47ce72d4e2991a9440e6d954ecbf79d596f9352","resourceRef":{"name":"jenkins-x-jx-pr-7463-unit-wbf7v"}}]' + reason: Completed + startedAt: "2020-07-20T20:15:34Z" diff --git a/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/pr.yaml b/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/pr.yaml index 1ea6c8fee..19dc6a6a6 100644 --- a/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/pr.yaml +++ b/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/pr.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -24,7 +24,7 @@ metadata: name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 namespace: jx resourceVersion: "16746634" - selfLink: /apis/tekton.dev/v1beta1/namespaces/jx/pipelineruns/jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 + selfLink: /apis/tekton.dev/v1/namespaces/jx/pipelineruns/jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 uid: 3edf18d1-cac2-11ea-a610-42010a8400cb spec: params: @@ -33,18 +33,20 @@ spec: - name: build_id value: "17" pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17 - podTemplate: - schedulerName: "" - resources: + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s + computeResources: - name: jenkins-x-jx-pr-7463-boot-vault-9mbgb resourceRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-jx-pr-7463-boot-vault-9mbgb - serviceAccountName: tekton-bot - timeout: 240h0m0s status: + startTime: "2020-07-20T19:50:21Z" completionTime: "2020-07-20T20:50:27Z" conditions: - lastTransitionTime: "2020-07-20T20:50:27Z" @@ -52,217 +54,10 @@ status: reason: Succeeded status: "True" type: Succeeded - startTime: "2020-07-20T19:50:21Z" - taskRuns: - jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-build-2jnvr: - pipelineTaskName: build - status: - completionTime: "2020-07-20T19:56:53Z" - conditions: - - lastTransitionTime: "2020-07-20T19:56:53Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-build-2jnvr-pod-kkvlf - resourcesResult: - - key: commit - resourceRef: - name: jenkins-x-jx-pr-7463-boot-vault-9mbgb - value: c47ce72d4e2991a9440e6d954ecbf79d596f9352 - startTime: "2020-07-20T19:50:21Z" - steps: - - container: step-setup-builder-home - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: setup-builder-home - terminated: - containerID: docker://4e6c91b0b0ade1bd04b96f7f084efadd4b0dcb86499efa90aeae48864f1aad29 - exitCode: 0 - finishedAt: "2020-07-20T19:50:57Z" - reason: Completed - startedAt: "2020-07-20T19:50:57Z" - - container: step-git-merge - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: git-merge - terminated: - containerID: docker://cf2b9d3a4f88b75ce1508dfb424c20190886e498aa91a0ee759696102406876f - exitCode: 0 - finishedAt: "2020-07-20T19:51:06Z" - reason: Completed - startedAt: "2020-07-20T19:50:57Z" - - container: step-build-binary - imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e - name: build-binary - terminated: - containerID: docker://0963449726cedd5cca64ff089c0f2687c5321910a665fadb13f5b0352b1760e9 - exitCode: 0 - finishedAt: "2020-07-20T19:55:11Z" - reason: Completed - startedAt: "2020-07-20T19:51:06Z" - - container: step-validate-binary - imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e - name: validate-binary - terminated: - containerID: docker://5fa8e77cfa71de5b0fb8ef8f04fbacedcfe4bff315d210b3de24dd0454dc4223 - exitCode: 0 - finishedAt: "2020-07-20T19:55:12Z" - reason: Completed - startedAt: "2020-07-20T19:55:12Z" - - container: step-build-and-push-image - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-image - terminated: - containerID: docker://ae13ac1ca38d4eba9a15579e24cf3ee7c9ef07b6f5e2b66cf73dd1e6cdd8a7ef - exitCode: 0 - finishedAt: "2020-07-20T19:55:32Z" - reason: Completed - startedAt: "2020-07-20T19:55:12Z" - - container: step-build-and-push-nodejs - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-nodejs - terminated: - containerID: docker://129fb2adbefc19d7048f195a18d15fc50b5d37b89f842950285275b305d92692 - exitCode: 0 - finishedAt: "2020-07-20T19:55:52Z" - reason: Completed - startedAt: "2020-07-20T19:55:32Z" - - container: step-create-dir-workspace-w6cv9 - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: create-dir-workspace-w6cv9 - terminated: - containerID: docker://f7cc84a5b893697eb8e6907000bf7391d53c334bc1e684d732c29b295a59541d - exitCode: 0 - finishedAt: "2020-07-20T19:50:53Z" - reason: Completed - startedAt: "2020-07-20T19:50:53Z" - - container: step-build-and-push-go - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-go - terminated: - containerID: docker://16448a801a725ddcdc8e77402dd79ce7fa47d6b1d38b6e74977093d417bb1935 - exitCode: 0 - finishedAt: "2020-07-20T19:56:31Z" - reason: Completed - startedAt: "2020-07-20T19:56:12Z" - - container: step-build-and-push-go-nodejs - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-go-nodejs - terminated: - containerID: docker://da07e413f75b5936fb142b86fa1017f1821dcccd49831bc846512b48277ab42c - exitCode: 0 - finishedAt: "2020-07-20T19:56:49Z" - reason: Completed - startedAt: "2020-07-20T19:56:31Z" - - container: step-git-source-jenkins-x-jx-pr-7463-boot-vault-9mbgb-6jfk4 - imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 - name: git-source-jenkins-x-jx-pr-7463-boot-vault-9mbgb-6jfk4 - terminated: - containerID: docker://69532706184d73b07d2cf8597d9f857a89df3483880f517f7e1ff74a189c3c34 - exitCode: 0 - finishedAt: "2020-07-20T19:50:57Z" - message: '[{"key":"commit","value":"c47ce72d4e2991a9440e6d954ecbf79d596f9352","resourceRef":{"name":"jenkins-x-jx-pr-7463-boot-vault-9mbgb"}}]' - reason: Completed - startedAt: "2020-07-20T19:50:54Z" - - container: step-source-copy-jenkins-x-jx-pr-7463-boot-vault-9mbgb-x6nv4 - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: source-copy-jenkins-x-jx-pr-7463-boot-vault-9mbgb-x6nv4 - terminated: - containerID: docker://63e982f4bef496b2af836905028375baa1e694f52e634a3420fc7aff1a8cf3f8 - exitCode: 0 - finishedAt: "2020-07-20T19:56:52Z" - reason: Completed - startedAt: "2020-07-20T19:56:50Z" - - container: step-source-mkdir-jenkins-x-jx-pr-7463-boot-vault-9mbgb-tdcg5 - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: source-mkdir-jenkins-x-jx-pr-7463-boot-vault-9mbgb-tdcg5 - terminated: - containerID: docker://d8da3c25e308812ad5798a04519e0692567e9501bdaa219711cef5e0b3cd20e9 - exitCode: 0 - finishedAt: "2020-07-20T19:56:50Z" - reason: Completed - startedAt: "2020-07-20T19:56:50Z" - - container: step-build-and-push-maven - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-maven - terminated: - containerID: docker://a06a114785c5794c13dafa21d0f548037c29c9690450e4a1933ad9e272473df3 - exitCode: 0 - finishedAt: "2020-07-20T19:56:11Z" - reason: Completed - startedAt: "2020-07-20T19:55:52Z" - jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-e2e-tests-ds74m: - pipelineTaskName: e2e-tests - status: - completionTime: "2020-07-20T20:50:27Z" - conditions: - - lastTransitionTime: "2020-07-20T20:50:27Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-e2e-tests-ds74m--w4ttd - startTime: "2020-07-20T19:56:53Z" - steps: - - container: step-setup-builder-home - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: setup-builder-home - terminated: - containerID: docker://2a6124bda33744d5710c9ab6d2787db4bfc31aaf1e92725b7c8bbc8dfb0e1f73 - exitCode: 0 - finishedAt: "2020-07-20T19:58:45Z" - reason: Completed - startedAt: "2020-07-20T19:58:44Z" - - container: step-boot-vault-e2e-tests - imageID: docker-pullable://gcr.io/jenkinsxio/builder-go-nodejs@sha256:e46a06e4bb1ef265389fa10d83ecffee6e3e3391c050ed347d32ccae4fcb26e0 - name: boot-vault-e2e-tests - terminated: - containerID: docker://cedafbbe02258458082815cfc995c9a9e8c37648ad186b6f6ca07b85fd5f2600 - exitCode: 0 - finishedAt: "2020-07-20T20:50:15Z" - reason: Completed - startedAt: "2020-07-20T19:58:45Z" - - container: step-generate-report - imageID: docker-pullable://gcr.io/jenkinsxio/builder-nodejs10x@sha256:e7ff71273ddd8a1a3db7aae0cbbbf294d136ffb22416814dc1ba966061d66a51 - name: generate-report - terminated: - containerID: docker://6cc219a3409ee347c035c46fc8b5a14e8b922ca0d9d65006b66abdd0c5a120b9 - exitCode: 0 - finishedAt: "2020-07-20T20:50:25Z" - reason: Completed - startedAt: "2020-07-20T20:50:15Z" - - container: step-clear-kubeconfig - imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:6560c7cddfe1712c840ff6f429fedf961c7ad442c3b3e0f48c4f83f1f29156ed - name: clear-kubeconfig - terminated: - containerID: docker://c0da5c57d35010089e8b1d1417b7cb5334aa0355e6b663aba45066219ddabcb6 - exitCode: 0 - finishedAt: "2020-07-20T20:50:26Z" - reason: Completed - startedAt: "2020-07-20T20:50:26Z" - - container: step-stashhtmlreport - imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:6560c7cddfe1712c840ff6f429fedf961c7ad442c3b3e0f48c4f83f1f29156ed - name: stashhtmlreport - terminated: - containerID: docker://e0cdd4b5eec880ec2eff3436d6e355910e415abd341fb181eec8fa65b5982136 - exitCode: 0 - finishedAt: "2020-07-20T20:50:27Z" - reason: Completed - startedAt: "2020-07-20T20:50:26Z" - - container: step-source-copy-workspace-7hpkx - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: source-copy-workspace-7hpkx - terminated: - containerID: docker://d7b36a57400a1efe415311e6b1516e3e0c7a1ab87454eade9caea6f1f739be85 - exitCode: 0 - finishedAt: "2020-07-20T19:58:44Z" - reason: Completed - startedAt: "2020-07-20T19:58:38Z" - - container: step-create-dir-workspace-tncdr - imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 - name: create-dir-workspace-tncdr - terminated: - containerID: docker://e899d802cdbd5e93925451244128ef98c95da5c6f219fd51ba5a9c09e59eb296 - exitCode: 0 - finishedAt: "2020-07-20T19:58:38Z" - reason: Completed - startedAt: "2020-07-20T19:58:38Z" + childReferences: + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-build-2jnvr + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-e2e-tests-ds74m diff --git a/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/tr.yaml b/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/tr.yaml new file mode 100644 index 000000000..31b54aa7a --- /dev/null +++ b/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/tr.yaml @@ -0,0 +1,132 @@ +apiVersion: tekton.dev/v1 +kind: TaskRun +metadata: + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-build-2jnvr +status: + completionTime: "2020-07-20T19:56:53Z" + startTime: "2020-07-20T19:50:21Z" + conditions: + - lastTransitionTime: "2020-07-20T19:56:53Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + steps: + - container: step-setup-builder-home + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: setup-builder-home + terminated: + containerID: docker://4e6c91b0b0ade1bd04b96f7f084efadd4b0dcb86499efa90aeae48864f1aad29 + exitCode: 0 + finishedAt: "2020-07-20T19:50:57Z" + reason: Completed + startedAt: "2020-07-20T19:50:57Z" + - container: step-git-merge + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: git-merge + terminated: + containerID: docker://cf2b9d3a4f88b75ce1508dfb424c20190886e498aa91a0ee759696102406876f + exitCode: 0 + finishedAt: "2020-07-20T19:51:06Z" + reason: Completed + startedAt: "2020-07-20T19:50:57Z" + - container: step-build-binary + imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e + name: build-binary + terminated: + containerID: docker://0963449726cedd5cca64ff089c0f2687c5321910a665fadb13f5b0352b1760e9 + exitCode: 0 + finishedAt: "2020-07-20T19:55:11Z" + reason: Completed + startedAt: "2020-07-20T19:51:06Z" + - container: step-validate-binary + imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e + name: validate-binary + terminated: + containerID: docker://5fa8e77cfa71de5b0fb8ef8f04fbacedcfe4bff315d210b3de24dd0454dc4223 + exitCode: 0 + finishedAt: "2020-07-20T19:55:12Z" + reason: Completed + startedAt: "2020-07-20T19:55:12Z" + - container: step-build-and-push-image + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-image + terminated: + containerID: docker://ae13ac1ca38d4eba9a15579e24cf3ee7c9ef07b6f5e2b66cf73dd1e6cdd8a7ef + exitCode: 0 + finishedAt: "2020-07-20T19:55:32Z" + reason: Completed + startedAt: "2020-07-20T19:55:12Z" + - container: step-build-and-push-nodejs + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-nodejs + terminated: + containerID: docker://129fb2adbefc19d7048f195a18d15fc50b5d37b89f842950285275b305d92692 + exitCode: 0 + finishedAt: "2020-07-20T19:55:52Z" + reason: Completed + startedAt: "2020-07-20T19:55:32Z" + - container: step-create-dir-workspace-w6cv9 + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: create-dir-workspace-w6cv9 + terminated: + containerID: docker://f7cc84a5b893697eb8e6907000bf7391d53c334bc1e684d732c29b295a59541d + exitCode: 0 + finishedAt: "2020-07-20T19:50:53Z" + reason: Completed + startedAt: "2020-07-20T19:50:53Z" + - container: step-build-and-push-go + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-go + terminated: + containerID: docker://16448a801a725ddcdc8e77402dd79ce7fa47d6b1d38b6e74977093d417bb1935 + exitCode: 0 + finishedAt: "2020-07-20T19:56:31Z" + reason: Completed + startedAt: "2020-07-20T19:56:12Z" + - container: step-build-and-push-go-nodejs + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-go-nodejs + terminated: + containerID: docker://da07e413f75b5936fb142b86fa1017f1821dcccd49831bc846512b48277ab42c + exitCode: 0 + finishedAt: "2020-07-20T19:56:49Z" + reason: Completed + startedAt: "2020-07-20T19:56:31Z" + - container: step-git-source-jenkins-x-jx-pr-7463-boot-vault-9mbgb-6jfk4 + imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 + name: git-source-jenkins-x-jx-pr-7463-boot-vault-9mbgb-6jfk4 + terminated: + containerID: docker://69532706184d73b07d2cf8597d9f857a89df3483880f517f7e1ff74a189c3c34 + exitCode: 0 + finishedAt: "2020-07-20T19:50:57Z" + message: '[{"key":"commit","value":"c47ce72d4e2991a9440e6d954ecbf79d596f9352","resourceRef":{"name":"jenkins-x-jx-pr-7463-boot-vault-9mbgb"}}]' + reason: Completed + startedAt: "2020-07-20T19:50:54Z" + - container: step-source-copy-jenkins-x-jx-pr-7463-boot-vault-9mbgb-x6nv4 + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: source-copy-jenkins-x-jx-pr-7463-boot-vault-9mbgb-x6nv4 + terminated: + containerID: docker://63e982f4bef496b2af836905028375baa1e694f52e634a3420fc7aff1a8cf3f8 + exitCode: 0 + finishedAt: "2020-07-20T19:56:52Z" + reason: Completed + startedAt: "2020-07-20T19:56:50Z" + - container: step-source-mkdir-jenkins-x-jx-pr-7463-boot-vault-9mbgb-tdcg5 + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: source-mkdir-jenkins-x-jx-pr-7463-boot-vault-9mbgb-tdcg5 + terminated: + containerID: docker://d8da3c25e308812ad5798a04519e0692567e9501bdaa219711cef5e0b3cd20e9 + exitCode: 0 + finishedAt: "2020-07-20T19:56:50Z" + reason: Completed + startedAt: "2020-07-20T19:56:50Z" + - container: step-build-and-push-maven + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-maven + terminated: + containerID: docker://a06a114785c5794c13dafa21d0f548037c29c9690450e4a1933ad9e272473df3 + exitCode: 0 + finishedAt: "2020-07-20T19:56:11Z" + reason: Completed + startedAt: "2020-07-20T19:55:52Z" diff --git a/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/tr2.yaml b/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/tr2.yaml new file mode 100644 index 000000000..6a479f8e5 --- /dev/null +++ b/pkg/engines/tekton/test_data/activity/successful_multiple_tasks/tr2.yaml @@ -0,0 +1,77 @@ +apiVersion: tekton.dev/v1 +kind: TaskRun +metadata: + name: jenkins-x-jx-pr-7463-boot-vault-9mbgb-17-e2e-tests-ds74m +status: + completionTime: "2020-07-20T20:50:27Z" + startTime: "2020-07-20T19:56:53Z" + conditions: + - lastTransitionTime: "2020-07-20T20:50:27Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + steps: + - container: step-setup-builder-home + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: setup-builder-home + terminated: + containerID: docker://2a6124bda33744d5710c9ab6d2787db4bfc31aaf1e92725b7c8bbc8dfb0e1f73 + exitCode: 0 + finishedAt: "2020-07-20T19:58:45Z" + reason: Completed + startedAt: "2020-07-20T19:58:44Z" + - container: step-boot-vault-e2e-tests + imageID: docker-pullable://gcr.io/jenkinsxio/builder-go-nodejs@sha256:e46a06e4bb1ef265389fa10d83ecffee6e3e3391c050ed347d32ccae4fcb26e0 + name: boot-vault-e2e-tests + terminated: + containerID: docker://cedafbbe02258458082815cfc995c9a9e8c37648ad186b6f6ca07b85fd5f2600 + exitCode: 0 + finishedAt: "2020-07-20T20:50:15Z" + reason: Completed + startedAt: "2020-07-20T19:58:45Z" + - container: step-generate-report + imageID: docker-pullable://gcr.io/jenkinsxio/builder-nodejs10x@sha256:e7ff71273ddd8a1a3db7aae0cbbbf294d136ffb22416814dc1ba966061d66a51 + name: generate-report + terminated: + containerID: docker://6cc219a3409ee347c035c46fc8b5a14e8b922ca0d9d65006b66abdd0c5a120b9 + exitCode: 0 + finishedAt: "2020-07-20T20:50:25Z" + reason: Completed + startedAt: "2020-07-20T20:50:15Z" + - container: step-clear-kubeconfig + imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:6560c7cddfe1712c840ff6f429fedf961c7ad442c3b3e0f48c4f83f1f29156ed + name: clear-kubeconfig + terminated: + containerID: docker://c0da5c57d35010089e8b1d1417b7cb5334aa0355e6b663aba45066219ddabcb6 + exitCode: 0 + finishedAt: "2020-07-20T20:50:26Z" + reason: Completed + startedAt: "2020-07-20T20:50:26Z" + - container: step-stashhtmlreport + imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:6560c7cddfe1712c840ff6f429fedf961c7ad442c3b3e0f48c4f83f1f29156ed + name: stashhtmlreport + terminated: + containerID: docker://e0cdd4b5eec880ec2eff3436d6e355910e415abd341fb181eec8fa65b5982136 + exitCode: 0 + finishedAt: "2020-07-20T20:50:27Z" + reason: Completed + startedAt: "2020-07-20T20:50:26Z" + - container: step-source-copy-workspace-7hpkx + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: source-copy-workspace-7hpkx + terminated: + containerID: docker://d7b36a57400a1efe415311e6b1516e3e0c7a1ab87454eade9caea6f1f739be85 + exitCode: 0 + finishedAt: "2020-07-20T19:58:44Z" + reason: Completed + startedAt: "2020-07-20T19:58:38Z" + - container: step-create-dir-workspace-tncdr + imageID: docker-pullable://busybox@sha256:2131f09e4044327fd101ca1fd4043e6f3ad921ae7ee901e9142e6e36b354a907 + name: create-dir-workspace-tncdr + terminated: + containerID: docker://e899d802cdbd5e93925451244128ef98c95da5c6f219fd51ba5a9c09e59eb296 + exitCode: 0 + finishedAt: "2020-07-20T19:58:38Z" + reason: Completed + startedAt: "2020-07-20T19:58:38Z" diff --git a/pkg/engines/tekton/test_data/activity/successful_single_task/pr.yaml b/pkg/engines/tekton/test_data/activity/successful_single_task/pr.yaml index 04c56d1d7..254aa1840 100644 --- a/pkg/engines/tekton/test_data/activity/successful_single_task/pr.yaml +++ b/pkg/engines/tekton/test_data/activity/successful_single_task/pr.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: PipelineRun metadata: annotations: @@ -24,7 +24,7 @@ metadata: name: jenkins-x-lighthouse-pr-854-bbs-d5q9c-4 namespace: jx resourceVersion: "16679114" - selfLink: /apis/tekton.dev/v1beta1/namespaces/jx/pipelineruns/jenkins-x-lighthouse-pr-854-bbs-d5q9c-4 + selfLink: /apis/tekton.dev/v1/namespaces/jx/pipelineruns/jenkins-x-lighthouse-pr-854-bbs-d5q9c-4 uid: 8e1712a0-caae-11ea-a610-42010a8400cb spec: params: @@ -33,18 +33,20 @@ spec: - name: build_id value: "4" pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-lighthouse-pr-854-bbs-d5q9c-4 - podTemplate: - schedulerName: "" - resources: + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s + computeResources: - name: jenkins-x-lighthouse-pr-854-bbs-d5q9c resourceRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-lighthouse-pr-854-bbs-d5q9c - serviceAccountName: tekton-bot - timeout: 240h0m0s status: + startTime: "2020-07-20T17:29:24Z" completionTime: "2020-07-20T18:00:05Z" conditions: - lastTransitionTime: "2020-07-20T18:00:05Z" @@ -52,114 +54,7 @@ status: reason: Succeeded status: "True" type: Succeeded - startTime: "2020-07-20T17:29:24Z" - taskRuns: - jenkins-x-lighthouse-pr-854-bbs-d5q9c-4-ci-wbnrf: - pipelineTaskName: ci - status: - completionTime: "2020-07-20T18:00:05Z" - conditions: - - lastTransitionTime: "2020-07-20T18:00:05Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: jenkins-x-lighthouse-pr-854-bbs-d5q9c-4-ci-wbnrf-pod-h6dc8 - resourcesResult: - - key: commit - resourceRef: - name: jenkins-x-lighthouse-pr-854-bbs-d5q9c - value: 82747f50259ef389d4ec8e7185c327c657faec02 - startTime: "2020-07-20T17:29:24Z" - steps: - - container: step-setup-builder-home - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: setup-builder-home - terminated: - containerID: docker://f6979cbac5116c55913eb89ff634339501f01fbcc912fc06b9d517a5ba2d6a7b - exitCode: 0 - finishedAt: "2020-07-20T17:29:38Z" - reason: Completed - startedAt: "2020-07-20T17:29:38Z" - - container: step-git-merge - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: git-merge - terminated: - containerID: docker://55082aa793082d50fecd06d93b193e8f9131a8cd9cac55ddc32222a26cd6c645 - exitCode: 0 - finishedAt: "2020-07-20T17:29:42Z" - reason: Completed - startedAt: "2020-07-20T17:29:39Z" - - container: step-build-binaries - imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:e07b1253adee49f22be8011a306892cb5e4f3bb31820a48af602a1d22175d194 - name: build-binaries - terminated: - containerID: docker://fd3a7c82432c857b985b1efcda3693732178b7e56952a5a1bbae54f15017c2ff - exitCode: 0 - finishedAt: "2020-07-20T17:32:19Z" - reason: Completed - startedAt: "2020-07-20T17:29:42Z" - - container: step-build-and-push-webhooks - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-webhooks - terminated: - containerID: docker://ff3b683846fe1ac8bb17bf7f11776022c67db0eec294b3168a5fef4a7172fa25 - exitCode: 0 - finishedAt: "2020-07-20T17:34:39Z" - reason: Completed - startedAt: "2020-07-20T17:32:19Z" - - container: step-build-and-push-keeper - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-keeper - terminated: - containerID: docker://fa844b75e8ee20fefef254b8cfb4e37b31e2fc47b416d7d6e2e020e5b6ffcf82 - exitCode: 0 - finishedAt: "2020-07-20T17:34:55Z" - reason: Completed - startedAt: "2020-07-20T17:34:39Z" - - container: step-build-and-push-foghorn - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-foghorn - terminated: - containerID: docker://dbb3aafdb74f9e631a91efb46776831bc67591daa109b77201c826441331e243 - exitCode: 0 - finishedAt: "2020-07-20T17:35:42Z" - reason: Completed - startedAt: "2020-07-20T17:34:55Z" - - container: step-build-and-push-jx-controller - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-jx-controller - terminated: - containerID: docker://74fbed0c4b55690cf940c29f3e0bd34dfe619bf984102adab20163002f5e79ad - exitCode: 0 - finishedAt: "2020-07-20T17:36:00Z" - reason: Completed - startedAt: "2020-07-20T17:35:42Z" - - container: step-build-and-push-gc-jobs - imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 - name: build-and-push-gc-jobs - terminated: - containerID: docker://af701bb74d066643752d03e79af3f0c337232eea710d0905c0b3d8693628ddc8 - exitCode: 0 - finishedAt: "2020-07-20T17:36:18Z" - reason: Completed - startedAt: "2020-07-20T17:36:00Z" - - container: step-runci - imageID: docker-pullable://gcr.io/jenkinsxio/builder-go-nodejs@sha256:5dd5fd06be6092169a67f3f8101597fac38b9c2267396920029ff466376f86d9 - name: runci - terminated: - containerID: docker://c703a3456523e67054b21a9c9bd72bcb53d8c9a54340580f902972361f3acaca - exitCode: 0 - finishedAt: "2020-07-20T18:00:03Z" - reason: Completed - startedAt: "2020-07-20T17:36:18Z" - - container: step-git-source-jenkins-x-lighthouse-pr-854-bbs-d5q9c-7btdc - imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 - name: git-source-jenkins-x-lighthouse-pr-854-bbs-d5q9c-7btdc - terminated: - containerID: docker://e6d77435b8309a85d493399a9570ebf6b1260bbbdc576ce8c4daeb3a62330020 - exitCode: 0 - finishedAt: "2020-07-20T17:29:38Z" - message: '[{"key":"commit","value":"82747f50259ef389d4ec8e7185c327c657faec02","resourceRef":{"name":"jenkins-x-lighthouse-pr-854-bbs-d5q9c"}}]' - reason: Completed - startedAt: "2020-07-20T17:29:34Z" + childReferences: + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: jenkins-x-lighthouse-pr-854-bbs-d5q9c-4-ci-wbnrf diff --git a/pkg/engines/tekton/test_data/activity/successful_single_task/tr.yaml b/pkg/engines/tekton/test_data/activity/successful_single_task/tr.yaml new file mode 100644 index 000000000..b1ab34a4c --- /dev/null +++ b/pkg/engines/tekton/test_data/activity/successful_single_task/tr.yaml @@ -0,0 +1,105 @@ +apiVersion: tekton.dev/v1 +kind: TaskRun +metadata: + name: jenkins-x-lighthouse-pr-854-bbs-d5q9c-4-ci-wbnrf +status: + completionTime: "2020-07-20T18:00:05Z" + startTime: "2020-07-20T17:29:24Z" + conditions: + - lastTransitionTime: "2020-07-20T18:00:05Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + steps: + - container: step-setup-builder-home + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: setup-builder-home + terminated: + containerID: docker://f6979cbac5116c55913eb89ff634339501f01fbcc912fc06b9d517a5ba2d6a7b + exitCode: 0 + finishedAt: "2020-07-20T17:29:38Z" + reason: Completed + startedAt: "2020-07-20T17:29:38Z" + - container: step-git-merge + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: git-merge + terminated: + containerID: docker://55082aa793082d50fecd06d93b193e8f9131a8cd9cac55ddc32222a26cd6c645 + exitCode: 0 + finishedAt: "2020-07-20T17:29:42Z" + reason: Completed + startedAt: "2020-07-20T17:29:39Z" + - container: step-build-binaries + imageID: docker-pullable://gcr.io/jenkinsxio/builder-go@sha256:e07b1253adee49f22be8011a306892cb5e4f3bb31820a48af602a1d22175d194 + name: build-binaries + terminated: + containerID: docker://fd3a7c82432c857b985b1efcda3693732178b7e56952a5a1bbae54f15017c2ff + exitCode: 0 + finishedAt: "2020-07-20T17:32:19Z" + reason: Completed + startedAt: "2020-07-20T17:29:42Z" + - container: step-build-and-push-webhooks + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-webhooks + terminated: + containerID: docker://ff3b683846fe1ac8bb17bf7f11776022c67db0eec294b3168a5fef4a7172fa25 + exitCode: 0 + finishedAt: "2020-07-20T17:34:39Z" + reason: Completed + startedAt: "2020-07-20T17:32:19Z" + - container: step-build-and-push-keeper + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-keeper + terminated: + containerID: docker://fa844b75e8ee20fefef254b8cfb4e37b31e2fc47b416d7d6e2e020e5b6ffcf82 + exitCode: 0 + finishedAt: "2020-07-20T17:34:55Z" + reason: Completed + startedAt: "2020-07-20T17:34:39Z" + - container: step-build-and-push-foghorn + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-foghorn + terminated: + containerID: docker://dbb3aafdb74f9e631a91efb46776831bc67591daa109b77201c826441331e243 + exitCode: 0 + finishedAt: "2020-07-20T17:35:42Z" + reason: Completed + startedAt: "2020-07-20T17:34:55Z" + - container: step-build-and-push-jx-controller + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-jx-controller + terminated: + containerID: docker://74fbed0c4b55690cf940c29f3e0bd34dfe619bf984102adab20163002f5e79ad + exitCode: 0 + finishedAt: "2020-07-20T17:36:00Z" + reason: Completed + startedAt: "2020-07-20T17:35:42Z" + - container: step-build-and-push-gc-jobs + imageID: docker-pullable://gcr.io/kaniko-project/executor@sha256:a0756adbb79d48e04ac9ffb7e7291c4a86fd2ffc55adc9db61480aba74ca4674 + name: build-and-push-gc-jobs + terminated: + containerID: docker://af701bb74d066643752d03e79af3f0c337232eea710d0905c0b3d8693628ddc8 + exitCode: 0 + finishedAt: "2020-07-20T17:36:18Z" + reason: Completed + startedAt: "2020-07-20T17:36:00Z" + - container: step-runci + imageID: docker-pullable://gcr.io/jenkinsxio/builder-go-nodejs@sha256:5dd5fd06be6092169a67f3f8101597fac38b9c2267396920029ff466376f86d9 + name: runci + terminated: + containerID: docker://c703a3456523e67054b21a9c9bd72bcb53d8c9a54340580f902972361f3acaca + exitCode: 0 + finishedAt: "2020-07-20T18:00:03Z" + reason: Completed + startedAt: "2020-07-20T17:36:18Z" + - container: step-git-source-jenkins-x-lighthouse-pr-854-bbs-d5q9c-7btdc + imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 + name: git-source-jenkins-x-lighthouse-pr-854-bbs-d5q9c-7btdc + terminated: + containerID: docker://e6d77435b8309a85d493399a9570ebf6b1260bbbdc576ce8c4daeb3a62330020 + exitCode: 0 + finishedAt: "2020-07-20T17:29:38Z" + message: '[{"key":"commit","value":"82747f50259ef389d4ec8e7185c327c657faec02","resourceRef":{"name":"jenkins-x-lighthouse-pr-854-bbs-d5q9c"}}]' + reason: Completed + startedAt: "2020-07-20T17:29:34Z" diff --git a/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/expected-lhjob.yml b/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/expected-lhjob.yml index 624122e65..f84b85e9e 100644 --- a/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/expected-lhjob.yml +++ b/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/expected-lhjob.yml @@ -9,7 +9,6 @@ metadata: lighthouse.jenkins-x.io/branch: PR-813 lighthouse.jenkins-x.io/buildNum: "7828158075477027098" lighthouse.jenkins-x.io/context: github - lighthouse.jenkins-x.io/id: f46327af-b47e-11ea-b797-9256b7b8d9b0 lighthouse.jenkins-x.io/job: github lighthouse.jenkins-x.io/refs.org: jenkins-x lighthouse.jenkins-x.io/refs.pull: "813" @@ -33,10 +32,11 @@ spec: value_template: '{{ .Refs.CloneURI }}' pipeline_run_spec: pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: {} - serviceAccountName: tekton-bot + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot refs: base_link: https://github.com/jenkins-x/lighthouse/commit/e8d56b5ee9671599c75644af574a251dd3b94a5c base_ref: master diff --git a/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/expected-pr.yml b/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/expected-pr.yml index d67dbe592..0bdea2cd8 100644 --- a/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/expected-pr.yml +++ b/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/expected-pr.yml @@ -61,9 +61,11 @@ spec: - name: repo-url value: https://github.com/jenkins-x/lighthouse.git pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: {} - serviceAccountName: tekton-bot - timeout: 24h0m0s + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/observed-lhjob.yml b/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/observed-lhjob.yml index dab287849..03dab48c9 100644 --- a/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/observed-lhjob.yml +++ b/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/observed-lhjob.yml @@ -8,6 +8,7 @@ metadata: lighthouse.jenkins-x.io/branch: PR-813 lighthouse.jenkins-x.io/context: github lighthouse.jenkins-x.io/job: github + lighthouse.jenkins-x.io/buildNum: "7828158075477027098" lighthouse.jenkins-x.io/refs.org: jenkins-x lighthouse.jenkins-x.io/refs.pull: "813" lighthouse.jenkins-x.io/refs.repo: lighthouse @@ -21,11 +22,12 @@ spec: namespace: jx pipeline_run_spec: pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: - schedulerName: "" - serviceAccountName: tekton-bot + taskRunTemplate: + podTemplate: + schedulerName: "" + serviceAccountName: tekton-bot pipeline_run_params: - name: batch-refs value_template: '{{ range $i, $v := .Refs.Pulls }}{{if $i}} {{end}}{{ $v.Ref }}{{ end }}' diff --git a/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/observed-pipeline.yml b/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/observed-pipeline.yml index c0d64a37c..164a7055d 100644 --- a/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/observed-pipeline.yml +++ b/pkg/engines/tekton/test_data/controller/start-batch-pullrequest/observed-pipeline.yml @@ -1,5 +1,5 @@ # Note that this doesn't need to match the run we're actually expecting, just has to have the git-clone task. -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: Pipeline metadata: name: jenkins-x-charts-jx-build-templ-wbbx6-7 diff --git a/pkg/engines/tekton/test_data/controller/start-pullrequest/expected-lhjob.yml b/pkg/engines/tekton/test_data/controller/start-pullrequest/expected-lhjob.yml index 0919ab384..6c0ab990d 100644 --- a/pkg/engines/tekton/test_data/controller/start-pullrequest/expected-lhjob.yml +++ b/pkg/engines/tekton/test_data/controller/start-pullrequest/expected-lhjob.yml @@ -9,7 +9,6 @@ metadata: lighthouse.jenkins-x.io/branch: PR-813 lighthouse.jenkins-x.io/buildNum: "7828158075477027098" lighthouse.jenkins-x.io/context: github - lighthouse.jenkins-x.io/id: f46327af-b47e-11ea-b797-9256b7b8d9b0 lighthouse.jenkins-x.io/job: github lighthouse.jenkins-x.io/refs.org: jenkins-x lighthouse.jenkins-x.io/refs.pull: "813" @@ -33,10 +32,11 @@ spec: value_template: bar-value pipeline_run_spec: pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: {} - serviceAccountName: tekton-bot + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot refs: base_link: https://github.com/jenkins-x/lighthouse/commit/e8d56b5ee9671599c75644af574a251dd3b94a5c base_ref: master diff --git a/pkg/engines/tekton/test_data/controller/start-pullrequest/expected-pr.yml b/pkg/engines/tekton/test_data/controller/start-pullrequest/expected-pr.yml index 2b1dada12..bf3331068 100644 --- a/pkg/engines/tekton/test_data/controller/start-pullrequest/expected-pr.yml +++ b/pkg/engines/tekton/test_data/controller/start-pullrequest/expected-pr.yml @@ -59,9 +59,11 @@ spec: - name: repo-url value: https://github.com/jenkins-x/lighthouse.git pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: {} - serviceAccountName: tekton-bot - timeout: 24h0m0s + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/engines/tekton/test_data/controller/start-pullrequest/observed-lhjob.yml b/pkg/engines/tekton/test_data/controller/start-pullrequest/observed-lhjob.yml index 3b318c11b..e643d0937 100644 --- a/pkg/engines/tekton/test_data/controller/start-pullrequest/observed-lhjob.yml +++ b/pkg/engines/tekton/test_data/controller/start-pullrequest/observed-lhjob.yml @@ -7,6 +7,7 @@ metadata: created-by-lighthouse: "true" lighthouse.jenkins-x.io/branch: PR-813 lighthouse.jenkins-x.io/context: github + lighthouse.jenkins-x.io/buildNum: "7828158075477027098" lighthouse.jenkins-x.io/job: github lighthouse.jenkins-x.io/refs.org: jenkins-x lighthouse.jenkins-x.io/refs.pull: "813" @@ -21,11 +22,12 @@ spec: namespace: jx pipeline_run_spec: pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: - schedulerName: "" - serviceAccountName: tekton-bot + taskRunTemplate: + podTemplate: + schedulerName: "" + serviceAccountName: tekton-bot pipeline_run_params: - name: branch-name value_template: '{{ range $i, $v := .Refs.Pulls }}{{if $i}} {{end}}{{ $v.SHA }}{{ end }}' diff --git a/pkg/engines/tekton/test_data/controller/start-pullrequest/observed-pipeline.yml b/pkg/engines/tekton/test_data/controller/start-pullrequest/observed-pipeline.yml index e2fc9c7bc..b17f58e83 100644 --- a/pkg/engines/tekton/test_data/controller/start-pullrequest/observed-pipeline.yml +++ b/pkg/engines/tekton/test_data/controller/start-pullrequest/observed-pipeline.yml @@ -1,5 +1,5 @@ # Note that this doesn't need to match the run we're actually expecting, just has to have the git-clone task. -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: Pipeline metadata: name: jenkins-x-charts-jx-build-templ-wbbx6-7 diff --git a/pkg/engines/tekton/test_data/controller/start-push/expected-lhjob.yml b/pkg/engines/tekton/test_data/controller/start-push/expected-lhjob.yml index 97047ad81..35df04a7f 100644 --- a/pkg/engines/tekton/test_data/controller/start-push/expected-lhjob.yml +++ b/pkg/engines/tekton/test_data/controller/start-push/expected-lhjob.yml @@ -9,7 +9,6 @@ metadata: lighthouse.jenkins-x.io/branch: main lighthouse.jenkins-x.io/buildNum: "7828158075477027098" lighthouse.jenkins-x.io/context: github - lighthouse.jenkins-x.io/id: f46327af-b47e-11ea-b797-9256b7b8d9b0 lighthouse.jenkins-x.io/job: github lighthouse.jenkins-x.io/refs.org: jenkins-x lighthouse.jenkins-x.io/refs.repo: lighthouse @@ -24,10 +23,11 @@ spec: namespace: jx pipeline_run_spec: pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: {} - serviceAccountName: tekton-bot + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot refs: base_link: https://github.com/jenkins-x/lighthouse/commit/e8d56b5ee9671599c75644af574a251dd3b94a5c base_ref: main diff --git a/pkg/engines/tekton/test_data/controller/start-push/expected-pr.yml b/pkg/engines/tekton/test_data/controller/start-push/expected-pr.yml index 103b1bafa..7e8498716 100644 --- a/pkg/engines/tekton/test_data/controller/start-push/expected-pr.yml +++ b/pkg/engines/tekton/test_data/controller/start-push/expected-pr.yml @@ -52,9 +52,11 @@ spec: - name: repo-url value: https://github.com/jenkins-x/lighthouse.git pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: {} - serviceAccountName: tekton-bot - timeout: 24h0m0s + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 24h0m0s status: {} diff --git a/pkg/engines/tekton/test_data/controller/start-push/observed-lhjob.yml b/pkg/engines/tekton/test_data/controller/start-push/observed-lhjob.yml index 5cde666a8..678e43a2b 100644 --- a/pkg/engines/tekton/test_data/controller/start-push/observed-lhjob.yml +++ b/pkg/engines/tekton/test_data/controller/start-push/observed-lhjob.yml @@ -8,6 +8,7 @@ metadata: lighthouse.jenkins-x.io/branch: main lighthouse.jenkins-x.io/context: github lighthouse.jenkins-x.io/job: github + lighthouse.jenkins-x.io/buildNum: "7828158075477027098" lighthouse.jenkins-x.io/refs.org: jenkins-x lighthouse.jenkins-x.io/refs.repo: lighthouse lighthouse.jenkins-x.io/type: postsubmit @@ -20,11 +21,12 @@ spec: namespace: jx pipeline_run_spec: pipelineRef: - apiVersion: tekton.dev/v1beta1 + apiVersion: tekton.dev/v1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: - schedulerName: "" - serviceAccountName: tekton-bot + taskRunTemplate: + podTemplate: + schedulerName: "" + serviceAccountName: tekton-bot refs: base_link: https://github.com/jenkins-x/lighthouse/commit/e8d56b5ee9671599c75644af574a251dd3b94a5c base_ref: main diff --git a/pkg/engines/tekton/test_data/controller/start-push/observed-pipeline.yml b/pkg/engines/tekton/test_data/controller/start-push/observed-pipeline.yml index e2fc9c7bc..b17f58e83 100644 --- a/pkg/engines/tekton/test_data/controller/start-push/observed-pipeline.yml +++ b/pkg/engines/tekton/test_data/controller/start-push/observed-pipeline.yml @@ -1,5 +1,5 @@ # Note that this doesn't need to match the run we're actually expecting, just has to have the git-clone task. -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: Pipeline metadata: name: jenkins-x-charts-jx-build-templ-wbbx6-7 diff --git a/pkg/engines/tekton/test_data/controller/update-job/expected-lhjob.yml b/pkg/engines/tekton/test_data/controller/update-job/expected-lhjob.yml index f62a16f83..6a5fe701c 100644 --- a/pkg/engines/tekton/test_data/controller/update-job/expected-lhjob.yml +++ b/pkg/engines/tekton/test_data/controller/update-job/expected-lhjob.yml @@ -9,7 +9,6 @@ metadata: lighthouse.jenkins-x.io/branch: PR-813 lighthouse.jenkins-x.io/buildNum: "7828158075477027098" lighthouse.jenkins-x.io/context: github - lighthouse.jenkins-x.io/id: f46327af-b47e-11ea-b797-9256b7b8d9b0 lighthouse.jenkins-x.io/job: github lighthouse.jenkins-x.io/refs.org: jenkins-x lighthouse.jenkins-x.io/refs.pull: "813" @@ -27,9 +26,16 @@ spec: pipelineRef: apiVersion: tekton.dev/v1beta1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: {} - serviceAccountName: tekton-bot - timeout: 240h0m0s + computeResources: + - name: jenkins-x-charts-jx-build-templ-wbbx6 + resourceRef: + apiVersion: tekton.dev/v1beta1 + name: jenkins-x-charts-jx-build-templ-wbbx6 + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 240h0m0s refs: base_link: https://github.com/jenkins-x/lighthouse/commit/e8d56b5ee9671599c75644af574a251dd3b94a5c base_ref: master diff --git a/pkg/engines/tekton/test_data/controller/update-job/expected-pr.yml b/pkg/engines/tekton/test_data/controller/update-job/expected-pr.yml index bef97f7fa..89684bf99 100644 --- a/pkg/engines/tekton/test_data/controller/update-job/expected-pr.yml +++ b/pkg/engines/tekton/test_data/controller/update-job/expected-pr.yml @@ -18,6 +18,12 @@ metadata: lighthouse.jenkins-x.io/type: presubmit name: f46327af-b47e-11ea-b797-9256b7b8d9b0 namespace: jx + ownerReferences: + - apiVersion: lighthouse.jenkins.io/v1alpha1 + controller: true + kind: LighthouseJob + name: f46327af-b47e-11ea-b797-9256b7b8d9b0 + uid: "" resourceVersion: "999" spec: params: @@ -46,15 +52,21 @@ spec: pipelineRef: apiVersion: tekton.dev/v1beta1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: {} resources: - name: jenkins-x-charts-jx-build-templ-wbbx6 resourceRef: apiVersion: tekton.dev/v1beta1 name: jenkins-x-charts-jx-build-templ-wbbx6 - serviceAccountName: tekton-bot - timeout: 240h0m0s + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot + timeouts: + pipeline: 24h0m0s status: + childReferences: + - apiVersion: tekton.dev/v1beta1 + kind: TaskRun + name: jenkins-x-jx-pr-7463-unit-wbf7v-18-ci-8r5qw conditions: - lastTransitionTime: "2020-07-20T20:15:20Z" message: 'Tasks Completed: 0, Incomplete: 1, Skipped: 0' diff --git a/pkg/engines/tekton/test_data/controller/update-job/observed-lhjob.yml b/pkg/engines/tekton/test_data/controller/update-job/observed-lhjob.yml index 82346b243..e6b193f02 100644 --- a/pkg/engines/tekton/test_data/controller/update-job/observed-lhjob.yml +++ b/pkg/engines/tekton/test_data/controller/update-job/observed-lhjob.yml @@ -1,56 +1,52 @@ -apiVersion: lighthouse.jenkins.io/v1alpha1 kind: LighthouseJob +apiVersion: lighthouse.jenkins.io/v1alpha1 metadata: - annotations: - lighthouse.jenkins-x.io/job: github + name: f46327af-b47e-11ea-b797-9256b7b8d9b0 + namespace: jx + resourceVersion: '3' + creationTimestamp: labels: - created-by-lighthouse: "true" + created-by-lighthouse: 'true' lighthouse.jenkins-x.io/branch: PR-813 - lighthouse.jenkins-x.io/buildNum: "7828158075477027098" + lighthouse.jenkins-x.io/buildNum: '7828158075477027098' lighthouse.jenkins-x.io/context: github - lighthouse.jenkins-x.io/id: f46327af-b47e-11ea-b797-9256b7b8d9b0 lighthouse.jenkins-x.io/job: github lighthouse.jenkins-x.io/refs.org: jenkins-x - lighthouse.jenkins-x.io/refs.pull: "813" + lighthouse.jenkins-x.io/refs.pull: '813' lighthouse.jenkins-x.io/refs.repo: lighthouse lighthouse.jenkins-x.io/type: presubmit - name: f46327af-b47e-11ea-b797-9256b7b8d9b0 - namespace: jx - resourceVersion: "3" + annotations: + lighthouse.jenkins-x.io/job: github spec: + type: presubmit agent: tekton-pipeline - context: github - job: github namespace: jx - pipeline_run_spec: - pipelineRef: - apiVersion: tekton.dev/v1beta1 - name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: - schedulerName: "" - resources: - - name: jenkins-x-charts-jx-build-templ-wbbx6 - resourceRef: - apiVersion: tekton.dev/v1beta1 - name: jenkins-x-charts-jx-build-templ-wbbx6 - serviceAccountName: tekton-bot - timeout: 240h0m0s + job: github refs: - base_link: https://github.com/jenkins-x/lighthouse/commit/e8d56b5ee9671599c75644af574a251dd3b94a5c - base_ref: master - base_sha: e8d56b5ee9671599c75644af574a251dd3b94a5c - clone_uri: https://github.com/jenkins-x/lighthouse.git org: jenkins-x - pulls: - - author: abayer - author_link: https://github.com/abayer - commit_link: https://github.com/jenkins-x/lighthouse/pull/813/commits/dd64c739442d505cf5381e2a14b60968e8a0d86e - link: https://github.com/jenkins-x/lighthouse/pull/813.diff - number: 813 - sha: dd64c739442d505cf5381e2a14b60968e8a0d86e repo: lighthouse repo_link: https://github.com/jenkins-x/lighthouse - rerun_command: /test github - type: presubmit + base_ref: master + base_sha: e8d56b5ee9671599c75644af574a251dd3b94a5c + base_link: https://github.com/jenkins-x/lighthouse/commit/e8d56b5ee9671599c75644af574a251dd3b94a5c + pulls: + - number: 813 + author: abayer + sha: dd64c739442d505cf5381e2a14b60968e8a0d86e + link: https://github.com/jenkins-x/lighthouse/pull/813.diff + commit_link: https://github.com/jenkins-x/lighthouse/pull/813/commits/dd64c739442d505cf5381e2a14b60968e8a0d86e + author_link: https://github.com/abayer + clone_uri: https://github.com/jenkins-x/lighthouse.git + context: github + rerun_command: "/test github" + pipeline_run_spec: + pipelineRef: + name: jenkins-x-charts-jx-build-templ-wbbx6-7 + apiVersion: tekton.dev/v1beta1 + timeouts: + pipeline: 240h0m0s + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot status: state: pending diff --git a/pkg/engines/tekton/test_data/controller/update-job/observed-pr.yml b/pkg/engines/tekton/test_data/controller/update-job/observed-pr.yml index 0de6450ef..93d0b40cb 100644 --- a/pkg/engines/tekton/test_data/controller/update-job/observed-pr.yml +++ b/pkg/engines/tekton/test_data/controller/update-job/observed-pr.yml @@ -1,123 +1,71 @@ metadata: - annotations: - lighthouse.jenkins-x.io/cloneURI: https://github.com/jenkins-x/lighthouse.git - lighthouse.jenkins-x.io/job: github + name: f46327af-b47e-11ea-b797-9256b7b8d9b0 + namespace: jx + ownerReferences: + - apiVersion: lighthouse.jenkins.io/v1alpha1 + controller: true + kind: LighthouseJob + name: f46327af-b47e-11ea-b797-9256b7b8d9b0 + uid: "" + resourceVersion: '999' + creationTimestamp: labels: - created-by-lighthouse: "true" + created-by-lighthouse: 'true' lighthouse.jenkins-x.io/baseSHA: e8d56b5ee9671599c75644af574a251dd3b94a5c lighthouse.jenkins-x.io/branch: PR-813 - lighthouse.jenkins-x.io/buildNum: "7828158075477027098" + lighthouse.jenkins-x.io/buildNum: '7828158075477027098' lighthouse.jenkins-x.io/context: github lighthouse.jenkins-x.io/id: f46327af-b47e-11ea-b797-9256b7b8d9b0 lighthouse.jenkins-x.io/job: github lighthouse.jenkins-x.io/lastCommitSHA: dd64c739442d505cf5381e2a14b60968e8a0d86e lighthouse.jenkins-x.io/refs.org: jenkins-x - lighthouse.jenkins-x.io/refs.pull: "813" + lighthouse.jenkins-x.io/refs.pull: '813' lighthouse.jenkins-x.io/refs.repo: lighthouse lighthouse.jenkins-x.io/type: presubmit - name: f46327af-b47e-11ea-b797-9256b7b8d9b0 - namespace: jx + annotations: + lighthouse.jenkins-x.io/cloneURI: https://github.com/jenkins-x/lighthouse.git + lighthouse.jenkins-x.io/job: github spec: - params: - - name: BUILD_ID - value: "7828158075477027098" - - name: JOB_NAME - value: github - - name: JOB_SPEC - value: type:presubmit - - name: JOB_TYPE - value: presubmit - - name: PULL_BASE_REF - value: master - - name: PULL_BASE_SHA - value: e8d56b5ee9671599c75644af574a251dd3b94a5c - - name: PULL_NUMBER - value: "813" - - name: PULL_PULL_SHA - value: dd64c739442d505cf5381e2a14b60968e8a0d86e - - name: PULL_REFS - value: master:e8d56b5ee9671599c75644af574a251dd3b94a5c,813:dd64c739442d505cf5381e2a14b60968e8a0d86e - - name: REPO_NAME - value: lighthouse - - name: REPO_OWNER - value: jenkins-x pipelineRef: - apiVersion: tekton.dev/v1beta1 name: jenkins-x-charts-jx-build-templ-wbbx6-7 - podTemplate: - schedulerName: "" - resources: - - name: jenkins-x-charts-jx-build-templ-wbbx6 - resourceRef: - apiVersion: tekton.dev/v1beta1 - name: jenkins-x-charts-jx-build-templ-wbbx6 - serviceAccountName: tekton-bot - timeout: 240h0m0s + apiVersion: tekton.dev/v1beta1 + params: + - name: BUILD_ID + value: '7828158075477027098' + - name: JOB_NAME + value: github + - name: JOB_SPEC + value: type:presubmit + - name: JOB_TYPE + value: presubmit + - name: PULL_BASE_REF + value: master + - name: PULL_BASE_SHA + value: e8d56b5ee9671599c75644af574a251dd3b94a5c + - name: PULL_NUMBER + value: '813' + - name: PULL_PULL_SHA + value: dd64c739442d505cf5381e2a14b60968e8a0d86e + - name: PULL_REFS + value: master:e8d56b5ee9671599c75644af574a251dd3b94a5c,813:dd64c739442d505cf5381e2a14b60968e8a0d86e + - name: REPO_NAME + value: lighthouse + - name: REPO_OWNER + value: jenkins-x + timeouts: + pipeline: 24h0m0s + taskRunTemplate: + podTemplate: {} + serviceAccountName: tekton-bot status: conditions: - - lastTransitionTime: "2020-07-20T20:15:20Z" - message: 'Tasks Completed: 0, Incomplete: 1, Skipped: 0' - reason: Running - status: Unknown - type: Succeeded - startTime: "2020-07-20T20:15:20Z" - taskRuns: - jenkins-x-jx-pr-7463-unit-wbf7v-18-ci-8r5qw: - pipelineTaskName: ci - status: - conditions: - - lastTransitionTime: "2020-07-20T20:15:32Z" - message: Not all Steps in the Task have finished executing - reason: Running - status: Unknown - type: Succeeded - podName: jenkins-x-jx-pr-7463-unit-wbf7v-18-ci-8r5qw-pod-76qzz - startTime: "2020-07-20T20:15:20Z" - steps: - - container: step-setup-builder-home - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: setup-builder-home - terminated: - containerID: docker://9ff452e9e09706f7ce7fc3ff2b0b769336ea6160a120e6a9c3a8a2098b2afc8e - exitCode: 0 - finishedAt: "2020-07-20T20:15:37Z" - reason: Completed - startedAt: "2020-07-20T20:15:37Z" - - container: step-git-merge - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e - name: git-merge - terminated: - containerID: docker://6b46062c9e0c0a59ed257dc76998180eb165556f5ef636007896f7dbfcb14409 - exitCode: 0 - finishedAt: "2020-07-20T20:15:48Z" - reason: Completed - startedAt: "2020-07-20T20:15:37Z" - - container: step-init-jx - imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:ab77416f4eb310c86dde4dc0d7ba9277dba633b9e0dcda2b0d7265742ab28d3d - name: init-jx - terminated: - containerID: docker://557593f6feea5e417bf45debbca0f2e430e427ed0dbf88b37c2fb86619d5290d - exitCode: 0 - finishedAt: "2020-07-20T20:15:51Z" - reason: Completed - startedAt: "2020-07-20T20:15:48Z" - - container: step-build - imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e - name: build - running: - startedAt: "2020-07-20T20:15:31Z" - - container: step-unit-test - imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e - name: unit-test - running: - startedAt: "2020-07-20T20:15:31Z" - - container: step-git-source-jenkins-x-jx-pr-7463-unit-wbf7v-vrx5d - imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 - name: git-source-jenkins-x-jx-pr-7463-unit-wbf7v-vrx5d - terminated: - containerID: docker://40fd861cee402ee184685b7d756a009578a5877c172787fc31ff000c28a6d047 - exitCode: 0 - finishedAt: "2020-07-20T20:15:37Z" - message: '[{"key":"commit","value":"c47ce72d4e2991a9440e6d954ecbf79d596f9352","resourceRef":{"name":"jenkins-x-jx-pr-7463-unit-wbf7v"}}]' - reason: Completed - startedAt: "2020-07-20T20:15:34Z" + - type: Succeeded + status: Unknown + lastTransitionTime: '2020-07-20T20:15:20Z' + reason: Running + message: 'Tasks Completed: 0, Incomplete: 1, Skipped: 0' + startTime: '2020-07-20T20:15:20Z' + childReferences: + - apiVersion: tekton.dev/v1beta1 + kind: TaskRun + name: jenkins-x-jx-pr-7463-unit-wbf7v-18-ci-8r5qw diff --git a/pkg/engines/tekton/test_data/controller/update-job/observed-tr.yml b/pkg/engines/tekton/test_data/controller/update-job/observed-tr.yml new file mode 100644 index 000000000..5528e52ae --- /dev/null +++ b/pkg/engines/tekton/test_data/controller/update-job/observed-tr.yml @@ -0,0 +1,60 @@ +apiVersion: tekton.dev/v1beta1 +kind: TaskRun +metadata: + name: jenkins-x-jx-pr-7463-unit-wbf7v-18-ci-8r5qw +status: + startTime: "2020-07-20T20:15:20Z" + conditions: + - lastTransitionTime: "2020-07-20T20:15:32Z" + message: Not all Steps in the Task have finished executing + reason: Running + status: Unknown + type: Succeeded + steps: + - container: step-setup-builder-home + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: setup-builder-home + terminated: + containerID: docker://9ff452e9e09706f7ce7fc3ff2b0b769336ea6160a120e6a9c3a8a2098b2afc8e + exitCode: 0 + finishedAt: "2020-07-20T20:15:37Z" + reason: Completed + startedAt: "2020-07-20T20:15:37Z" + - container: step-git-merge + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:74e5c1ea05f84329f5fb150a46c55ae89288b950c8edb1041af1911516a86b0e + name: git-merge + terminated: + containerID: docker://6b46062c9e0c0a59ed257dc76998180eb165556f5ef636007896f7dbfcb14409 + exitCode: 0 + finishedAt: "2020-07-20T20:15:48Z" + reason: Completed + startedAt: "2020-07-20T20:15:37Z" + - container: step-init-jx + imageID: docker-pullable://gcr.io/jenkinsxio/builder-jx@sha256:ab77416f4eb310c86dde4dc0d7ba9277dba633b9e0dcda2b0d7265742ab28d3d + name: init-jx + terminated: + containerID: docker://557593f6feea5e417bf45debbca0f2e430e427ed0dbf88b37c2fb86619d5290d + exitCode: 0 + finishedAt: "2020-07-20T20:15:51Z" + reason: Completed + startedAt: "2020-07-20T20:15:48Z" + - container: step-build + imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e + name: build + running: + startedAt: "2020-07-20T20:15:31Z" + - container: step-unit-test + imageID: docker-pullable://golang@sha256:d7e0b99badf7f34b5096089484a733897c9b89aa12ffb9f67f81da054f8a403e + name: unit-test + running: + startedAt: "2020-07-20T20:15:31Z" + - container: step-git-source-jenkins-x-jx-pr-7463-unit-wbf7v-vrx5d + imageID: docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:add85f33c5ac0aa02712ec6e6caad3d4bb7faa33043c5ca252a824b050b4b8e2 + name: git-source-jenkins-x-jx-pr-7463-unit-wbf7v-vrx5d + terminated: + containerID: docker://40fd861cee402ee184685b7d756a009578a5877c172787fc31ff000c28a6d047 + exitCode: 0 + finishedAt: "2020-07-20T20:15:37Z" + message: '[{"key":"commit","value":"c47ce72d4e2991a9440e6d954ecbf79d596f9352","resourceRef":{"name":"jenkins-x-jx-pr-7463-unit-wbf7v"}}]' + reason: Completed + startedAt: "2020-07-20T20:15:34Z" From 1345fd57d0b3563429cb1bec2010eec05368fae3 Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Wed, 19 Mar 2025 10:46:43 +0100 Subject: [PATCH 22/23] chore(tests): fix remaining tests --- Makefile | 2 +- go.mod | 8 +++----- go.sum | 8 ++++---- pkg/apis/lighthouse/v1alpha1/breakpoint_test.go | 14 ++++++++++---- pkg/keeper/pipelinerun_monitor_test.go | 4 +++- pkg/plugins/updateconfig/updateconfig.go | 4 ++-- 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 5046a8e5d..bd2203bbf 100644 --- a/Makefile +++ b/Makefile @@ -133,7 +133,7 @@ importfmt: get-fmt-deps ## Checks the import format of the Go source files fmt: importfmt @echo "FORMATTING SOURCE" FORMATTED=`$(GO) fmt ./...` - @([[ ! -z "$(FORMATTED)" ]] && printf "Fixed un-formatted files:\n$(FORMATTED)") || true + @([ ! -z "$(FORMATTED)" ] && printf "Fixed un-formatted files:\n$(FORMATTED)") || true GOLINT := $(GOPATH)/bin/golint $(GOLINT): diff --git a/go.mod b/go.mod index 7ec73066b..2cb1c0ebc 100644 --- a/go.mod +++ b/go.mod @@ -25,9 +25,10 @@ require ( github.com/tektoncd/pipeline v0.65.3 golang.org/x/oauth2 v0.23.0 gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 - k8s.io/api v0.32.1 + k8s.io/api v0.32.3 + k8s.io/apiextensions-apiserver v0.32.3 // indirect k8s.io/apimachinery v0.32.3 - k8s.io/client-go v0.32.1 + k8s.io/client-go v0.32.3 k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 knative.dev/pkg v0.0.0-20240416145024-0f34a8815650 sigs.k8s.io/controller-runtime v0.20.3 @@ -111,7 +112,6 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.32.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect @@ -128,8 +128,6 @@ replace ( // gomodules.xyz breaks in Athens proxying gomodules.xyz/jsonpatch/v2 => github.com/gomodules/jsonpatch/v2 v2.2.0 - k8s.io/api => k8s.io/api v0.32.3 - k8s.io/apimachinery => k8s.io/apimachinery v0.32.3 ) go 1.23.0 diff --git a/go.sum b/go.sum index 206b4328f..e42893418 100644 --- a/go.sum +++ b/go.sum @@ -755,12 +755,12 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= -k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw= -k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto= +k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY= +k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss= k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU= -k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg= +k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU= +k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= diff --git a/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go b/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go index 726ef4fe8..c8bcb831c 100644 --- a/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go +++ b/pkg/apis/lighthouse/v1alpha1/breakpoint_test.go @@ -22,7 +22,9 @@ func TestBreakpointResolveDebug(t *testing.T) { Task: "sometask", }, Debug: pipelinev1.TaskRunDebug{ - Breakpoint: []string{"onFailure"}, + Breakpoints: &pipelinev1.TaskBreakpoints{ + OnFailure: "onFailure", + }, }, }, }, @@ -32,7 +34,9 @@ func TestBreakpointResolveDebug(t *testing.T) { Task: "special-task", }, Debug: pipelinev1.TaskRunDebug{ - Breakpoint: []string{"something"}, + Breakpoints: &pipelinev1.TaskBreakpoints{ + OnFailure: "something", + }, }, }, }, @@ -54,7 +58,9 @@ func TestBreakpointResolveDebug(t *testing.T) { Task: "sometask", }, expected: &pipelinev1.TaskRunDebug{ - Breakpoint: []string{"onFailure"}, + Breakpoints: &pipelinev1.TaskBreakpoints{ + OnFailure: "onFailure", + }, }, }, { @@ -91,7 +97,7 @@ func TestBreakpointResolveDebug(t *testing.T) { }, expected: &pipelinev1.TaskRunDebug{ Breakpoints: &pipelinev1.TaskBreakpoints{ - BeforeSteps: []string{"something"}, + OnFailure: "something", }, }, }, diff --git a/pkg/keeper/pipelinerun_monitor_test.go b/pkg/keeper/pipelinerun_monitor_test.go index 52a3e72e6..6a8cc3bc3 100644 --- a/pkg/keeper/pipelinerun_monitor_test.go +++ b/pkg/keeper/pipelinerun_monitor_test.go @@ -186,7 +186,9 @@ func makeTestPipelineRun(condition *kpgapis.Condition, baseRunName string, pipel APIVersion: tektonAPIVersion, Name: pipelineName, }, - ServiceAccountName: sa, + TaskRunTemplate: pipelinev1.PipelineTaskRunTemplate{ + ServiceAccountName: sa, + }, }, Status: pipelinev1.PipelineRunStatus{}, } diff --git a/pkg/plugins/updateconfig/updateconfig.go b/pkg/plugins/updateconfig/updateconfig.go index b570d6867..aa88bf059 100644 --- a/pkg/plugins/updateconfig/updateconfig.go +++ b/pkg/plugins/updateconfig/updateconfig.go @@ -119,7 +119,7 @@ func Update(fg FileGetter, kc corev1.ConfigMapInterface, name, namespace string, return fmt.Errorf("failed to fetch current state of configmap: %v", getErr) } - if cm == nil { + if cm == nil || isNotFound { cm = &coreapi.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -149,7 +149,7 @@ func Update(fg FileGetter, kc corev1.ConfigMapInterface, name, namespace string, logger.WithFields(logrus.Fields{"key": upd.Key, "cmName": upd.Filename}).Debug("Populating key.") value := content if upd.GZIP { - buff := bytes.NewBuffer([]byte{}) + buff := new(bytes.Buffer) // TODO: this error is wildly unlikely for anything that // would actually fit in a configmap, we could just as well return // the error instead of falling back to the raw content From 16bbbd7aacf7990f17029cdb9b235abfe819216f Mon Sep 17 00:00:00 2001 From: JordanGoasdoue Date: Wed, 19 Mar 2025 12:16:43 +0100 Subject: [PATCH 23/23] chore: upgrade tektoncd to latest 0.69.0 --- go.mod | 63 +++++++++++---------------- go.sum | 134 +++++++++++++++++++++++++++++++-------------------------- 2 files changed, 98 insertions(+), 99 deletions(-) diff --git a/go.mod b/go.mod index 2cb1c0ebc..b4eea6295 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/bwmarrin/snowflake v0.0.0 github.com/cenkalti/backoff v2.2.1+incompatible - github.com/evanphx/json-patch v4.12.0+incompatible + github.com/evanphx/json-patch v5.9.0+incompatible github.com/go-stack/stack v1.8.0 - github.com/google/go-cmp v0.6.0 + github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 github.com/gorilla/sessions v1.2.1 github.com/h2non/gock v1.0.9 @@ -21,26 +21,27 @@ require ( github.com/prometheus/client_golang v1.19.1 github.com/shurcooL/githubv4 v0.0.0-20191102174205-af46314aec7b github.com/sirupsen/logrus v1.9.3 - github.com/stretchr/testify v1.9.0 - github.com/tektoncd/pipeline v0.65.3 - golang.org/x/oauth2 v0.23.0 + github.com/stretchr/testify v1.10.0 + github.com/tektoncd/pipeline v0.69.0 + golang.org/x/oauth2 v0.26.0 gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 k8s.io/api v0.32.3 k8s.io/apiextensions-apiserver v0.32.3 // indirect k8s.io/apimachinery v0.32.3 k8s.io/client-go v0.32.3 k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 - knative.dev/pkg v0.0.0-20240416145024-0f34a8815650 + knative.dev/pkg v0.0.0-20250117084104-c43477f0052b sigs.k8s.io/controller-runtime v0.20.3 sigs.k8s.io/yaml v1.4.0 ) require ( - cel.dev/expr v0.18.0 // indirect - code.gitea.io/sdk/gitea v0.18.0 // indirect + cel.dev/expr v0.19.1 // indirect + code.gitea.io/sdk/gitea v0.20.0 // indirect contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect fortio.org/safecast v1.0.0 // indirect + github.com/42wim/httpsig v1.2.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blendle/zapdriver v1.3.1 // indirect @@ -49,7 +50,7 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidmz/go-pageant v1.0.2 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect @@ -58,17 +59,17 @@ require ( github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/cel-go v0.22.0 // indirect + github.com/google/cel-go v0.23.2 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/gorilla/securecookie v1.1.1 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -93,20 +94,20 @@ require ( go.opencensus.io v0.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect - golang.org/x/time v0.7.0 // indirect + golang.org/x/crypto v0.32.0 // indirect + golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect + golang.org/x/net v0.34.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/sys v0.29.0 // indirect + golang.org/x/term v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/time v0.9.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.181.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect - google.golang.org/grpc v1.67.0 // indirect - google.golang.org/protobuf v1.35.1 // indirect + google.golang.org/api v0.217.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect + google.golang.org/grpc v1.70.0 // indirect + google.golang.org/protobuf v1.36.5 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect @@ -118,18 +119,6 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect ) -replace ( - // Knative deps (release-0.20) - contrib.go.opencensus.io/exporter/stackdriver => contrib.go.opencensus.io/exporter/stackdriver v0.13.4 - github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v38.2.0+incompatible - - // lets override the go-scm version from tektoncd - github.com/jenkins-x/go-scm => github.com/jenkins-x/go-scm v1.14.56 - - // gomodules.xyz breaks in Athens proxying - gomodules.xyz/jsonpatch/v2 => github.com/gomodules/jsonpatch/v2 v2.2.0 -) - go 1.23.0 toolchain go1.23.2 diff --git a/go.sum b/go.sum index e42893418..865d6d756 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= -cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= +cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -32,8 +32,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -code.gitea.io/sdk/gitea v0.18.0 h1:+zZrwVmujIrgobt6wVBWCqITz6bn1aBjnCUHmpZrerI= -code.gitea.io/sdk/gitea v0.18.0/go.mod h1:IG9xZJoltDNeDSW0qiF2Vqx5orMWa7OhVWrjvrd5NpI= +code.gitea.io/sdk/gitea v0.20.0 h1:Zm/QDwwZK1awoM4AxdjeAQbxolzx2rIP8dDfmKu+KoU= +code.gitea.io/sdk/gitea v0.20.0/go.mod h1:faouBHC/zyx5wLgjmRKR62ydyvMzwWf3QnU0bH7Cw6U= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= @@ -41,6 +41,8 @@ contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= fortio.org/safecast v1.0.0 h1:dr3131WPX8iS1pTf76+39WeXbTrerDYLvi9s7Oi3wiY= fortio.org/safecast v1.0.0/go.mod h1:xZmcPk3vi4kuUFf+tq4SvnlVdwViqf6ZSZl91Jr9Jdg= +github.com/42wim/httpsig v1.2.1 h1:oLBxptMe9U4ZmSGtkosT8Dlfg31P3VQnAGq6psXv82Y= +github.com/42wim/httpsig v1.2.1/go.mod h1:P/UYo7ytNBFwc+dg35IubuAUIs8zj5zzFIgUCEl55WY= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -82,22 +84,20 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudevents/sdk-go/v2 v2.15.2 h1:54+I5xQEnI73RBhWHxbI1XJcqOFOVJN85vb41+8mHUc= github.com/cloudevents/sdk-go/v2 v2.15.2/go.mod h1:lL7kSWAE/V8VI4Wh0jbL2v/jvqsm6tjmaQBSvxcv4uE= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0= github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= +github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -125,14 +125,14 @@ github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNV github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= @@ -175,14 +175,12 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/gomodules/jsonpatch/v2 v2.2.0 h1:QBjDK/nX43P4z/Os3gnk8VeFdLDgBuMns1Wljyo607U= -github.com/gomodules/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= -github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= +github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= +github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -197,8 +195,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -224,8 +222,8 @@ github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ= github.com/h2non/gock v1.0.9 h1:17gCehSo8ZOgEsFKpQgqHiR7VLyjxdAG3lkhVvO9QZU= github.com/h2non/gock v1.0.9/go.mod h1:CZMcB0Lg5IWnr9bF79pPMg9WeV6WumxQiUJ1UvdO1iE= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= @@ -245,7 +243,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jenkins-x/go-scm v1.14.56 h1:+kKwbTv+6ymaxx4bBCEMLvkrjLmFkWX39qxYe4DDHPI= github.com/jenkins-x/go-scm v1.14.56/go.mod h1:1RPxLZndnvu31XhFZ+RTvXiHmMX70HkQ17bRupTQxGs= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -266,7 +263,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -378,11 +374,11 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/tektoncd/pipeline v0.65.3 h1:/HXL62kx1LTu76dvrCurafjl+KU2FjEwvcKeQ4WOjbk= -github.com/tektoncd/pipeline v0.65.3/go.mod h1:V3cyfxxc7b3GLT2a13GX2mWA86qmxWhh4mOp4gfFQwQ= +github.com/tektoncd/pipeline v0.69.0 h1:1KgeNXfsuebg/HQ0lEKO79CDFqKUPrA7gSad5ZbeiHE= +github.com/tektoncd/pipeline v0.69.0/go.mod h1:n8pgdQTRngXJC06Rii2zunb2GxBz/ZHE5n8AZFx4MdM= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -397,6 +393,18 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= +go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= +go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= +go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -413,8 +421,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -425,8 +433,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -447,8 +455,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -486,8 +494,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -495,8 +503,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= +golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -508,8 +516,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -557,12 +565,12 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= 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.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -570,13 +578,13 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -620,12 +628,14 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -643,8 +653,8 @@ google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.181.0 h1:rPdjwnWgiPPOJx3IcSAQ2III5aX5tCer6wMpa/xmZi4= -google.golang.org/api v0.181.0/go.mod h1:MnQ+M0CFsfUwA5beZ+g/vCBCPXvtmZwRz2qzZk8ih1k= +google.golang.org/api v0.217.0 h1:GYrUtD289o4zl1AhiTZL0jvQGa2RDLyC+kX1N/lfGOU= +google.golang.org/api v0.217.0/go.mod h1:qMc2E8cBAbQlRypBTBWHklNJlaZZJBwDv81B1Iu8oSI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -682,10 +692,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw= -google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f h1:gap6+3Gk41EItBuyi4XX/bp4oqJ3UwuIMl25yGinuAA= +google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:Ic02D47M+zbarjYYUlK57y316f2MoN0gjAwI3f2S95o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -699,8 +709,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -715,8 +725,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -767,8 +777,8 @@ k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJ k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/pkg v0.0.0-20240416145024-0f34a8815650 h1:m2ahFUO0L2VrgGDYdyOUFdE6xBd3pLXAJozLJwqLRQM= -knative.dev/pkg v0.0.0-20240416145024-0f34a8815650/go.mod h1:soFw5ss08G4PU3JiFDKqiZRd2U7xoqcfNpJP1coIXkY= +knative.dev/pkg v0.0.0-20250117084104-c43477f0052b h1:a+gP7Yzu5NmoX2w1p8nfTgmSKF+aHLKGzqYT82ijJTw= +knative.dev/pkg v0.0.0-20250117084104-c43477f0052b/go.mod h1:bedSpkdLybR6JhL1J7XDLpd+JMKM/x8M5Apr80i5TeE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=