From f1e3fcb7962b669d085a0979b8c83c2ad64c27ec Mon Sep 17 00:00:00 2001 From: encalada Date: Wed, 18 Oct 2023 14:27:38 +0200 Subject: [PATCH] Add proper source type to Builds The type was missing, which should be Git --- docs/build.md | 20 +++++++++-- docs/buildrun.md | 1 + ...ld_buildah_shipwright_managed_push_cr.yaml | 1 + ...uild_buildah_strategy_managed_push_cr.yaml | 1 + samples/v1beta1/build/build_buildkit_cr.yaml | 1 + .../build/build_buildpacks-v3-heroku_cr.yaml | 1 + ...ld_buildpacks-v3-heroku_namespaced_cr.yaml | 1 + .../v1beta1/build/build_buildpacks-v3_cr.yaml | 1 + .../build_buildpacks-v3_namespaced_cr.yaml | 1 + .../build/build_kaniko-trivy-bad_cr.yaml | 1 + .../build/build_kaniko-trivy-good_cr.yaml | 1 + samples/v1beta1/build/build_kaniko_cr.yaml | 1 + samples/v1beta1/build/build_ko_cr.yaml | 1 + .../build/build_source-to-image_cr.yaml | 1 + test/v1beta1_samples/build_samples.go | 33 ++++++++++++++++++- 15 files changed, 63 insertions(+), 3 deletions(-) diff --git a/docs/build.md b/docs/build.md index d378f5dd9d..a5f7ca1dc4 100644 --- a/docs/build.md +++ b/docs/build.md @@ -118,6 +118,7 @@ metadata: build.shipwright.io/verify.repository: "true" spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go contextDir: docker-build @@ -134,6 +135,7 @@ metadata: name: buildpack-nodejs-build spec: source: + type: Git git: url: https://github.com/sclorg/nodejs-ex cloneSecret: source-repository-credentials @@ -148,6 +150,7 @@ metadata: name: buildah-custom-context-dockerfile spec: source: + type: Git git: url: https://github.com/SaschaSchwarze0/npm-simple contextDir: renamed @@ -162,6 +165,7 @@ metadata: name: buildah-golang-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go revision: v0.1.0 @@ -177,6 +181,7 @@ metadata: name: buildah-golang-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go contextDir: docker-build @@ -197,6 +202,7 @@ metadata: name: buildah-golang-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go contextDir: docker-build @@ -217,6 +223,7 @@ metadata: name: buildah-golang-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go contextDir: docker-build @@ -429,7 +436,9 @@ metadata: name: buildah-golang-build spec: source: - url: https://github.com/shipwright-io/sample-go + type: Git + git: + url: https://github.com/shipwright-io/sample-go contextDir: docker-build strategy: name: buildah @@ -448,7 +457,9 @@ metadata: name: s2i-nodejs-build spec: source: - url: https://github.com/shipwright-io/sample-nodejs + type: Git + git: + url: https://github.com/shipwright-io/sample-nodejs contextDir: source-build/ strategy: name: source-to-image @@ -473,6 +484,7 @@ metadata: name: s2i-nodejs-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-nodejs contextDir: source-build/ @@ -518,6 +530,7 @@ metadata: name: s2i-nodejs-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-nodejs contextDir: source-build/ @@ -571,6 +584,7 @@ An example of a user using both TTL and Limit retention fields. In case of such name: build-retention-ttl spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" contextDir: docker-build @@ -604,6 +618,7 @@ metadata: name: build-name spec: source: + type: Git git: url: https://github.com/example/url strategy: @@ -633,6 +648,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go cloneSecret: webhook-secret diff --git a/docs/buildrun.md b/docs/buildrun.md index ba3c4cb624..f79a9955bd 100644 --- a/docs/buildrun.md +++ b/docs/buildrun.md @@ -100,6 +100,7 @@ spec: build: spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go.git contextDir: source-build diff --git a/samples/v1beta1/build/build_buildah_shipwright_managed_push_cr.yaml b/samples/v1beta1/build/build_buildah_shipwright_managed_push_cr.yaml index cd7d04a6de..d866e95415 100644 --- a/samples/v1beta1/build/build_buildah_shipwright_managed_push_cr.yaml +++ b/samples/v1beta1/build/build_buildah_shipwright_managed_push_cr.yaml @@ -5,6 +5,7 @@ metadata: name: buildah-golang-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go contextDir: docker-build diff --git a/samples/v1beta1/build/build_buildah_strategy_managed_push_cr.yaml b/samples/v1beta1/build/build_buildah_strategy_managed_push_cr.yaml index e16d934d30..f74444adaf 100644 --- a/samples/v1beta1/build/build_buildah_strategy_managed_push_cr.yaml +++ b/samples/v1beta1/build/build_buildah_strategy_managed_push_cr.yaml @@ -5,6 +5,7 @@ metadata: name: buildah-golang-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go contextDir: docker-build diff --git a/samples/v1beta1/build/build_buildkit_cr.yaml b/samples/v1beta1/build/build_buildkit_cr.yaml index f6e435751d..44117c5aaf 100644 --- a/samples/v1beta1/build/build_buildkit_cr.yaml +++ b/samples/v1beta1/build/build_buildkit_cr.yaml @@ -5,6 +5,7 @@ metadata: name: buildkit-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go contextDir: docker-build diff --git a/samples/v1beta1/build/build_buildpacks-v3-heroku_cr.yaml b/samples/v1beta1/build/build_buildpacks-v3-heroku_cr.yaml index eaaf1e5bfa..f938e76401 100644 --- a/samples/v1beta1/build/build_buildpacks-v3-heroku_cr.yaml +++ b/samples/v1beta1/build/build_buildpacks-v3-heroku_cr.yaml @@ -5,6 +5,7 @@ metadata: name: buildpack-nodejs-build-heroku spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-nodejs contextDir: source-build-heroku diff --git a/samples/v1beta1/build/build_buildpacks-v3-heroku_namespaced_cr.yaml b/samples/v1beta1/build/build_buildpacks-v3-heroku_namespaced_cr.yaml index eb607cb70e..85416b69a0 100644 --- a/samples/v1beta1/build/build_buildpacks-v3-heroku_namespaced_cr.yaml +++ b/samples/v1beta1/build/build_buildpacks-v3-heroku_namespaced_cr.yaml @@ -5,6 +5,7 @@ metadata: name: buildpack-nodejs-build-namespaced-heroku spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-nodejs contextDir: source-build-heroku diff --git a/samples/v1beta1/build/build_buildpacks-v3_cr.yaml b/samples/v1beta1/build/build_buildpacks-v3_cr.yaml index da177dd247..b8f95620a5 100644 --- a/samples/v1beta1/build/build_buildpacks-v3_cr.yaml +++ b/samples/v1beta1/build/build_buildpacks-v3_cr.yaml @@ -5,6 +5,7 @@ metadata: name: buildpack-nodejs-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-nodejs contextDir: source-build diff --git a/samples/v1beta1/build/build_buildpacks-v3_namespaced_cr.yaml b/samples/v1beta1/build/build_buildpacks-v3_namespaced_cr.yaml index 79ad64e343..b68710fa25 100644 --- a/samples/v1beta1/build/build_buildpacks-v3_namespaced_cr.yaml +++ b/samples/v1beta1/build/build_buildpacks-v3_namespaced_cr.yaml @@ -5,6 +5,7 @@ metadata: name: buildpack-nodejs-build-namespaced spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-nodejs contextDir: source-build diff --git a/samples/v1beta1/build/build_kaniko-trivy-bad_cr.yaml b/samples/v1beta1/build/build_kaniko-trivy-bad_cr.yaml index 816a0ad522..d567542050 100644 --- a/samples/v1beta1/build/build_kaniko-trivy-bad_cr.yaml +++ b/samples/v1beta1/build/build_kaniko-trivy-bad_cr.yaml @@ -5,6 +5,7 @@ metadata: name: kaniko-trivy-bad-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-scanning strategy: diff --git a/samples/v1beta1/build/build_kaniko-trivy-good_cr.yaml b/samples/v1beta1/build/build_kaniko-trivy-good_cr.yaml index a27f5111e9..b280e364e8 100644 --- a/samples/v1beta1/build/build_kaniko-trivy-good_cr.yaml +++ b/samples/v1beta1/build/build_kaniko-trivy-good_cr.yaml @@ -5,6 +5,7 @@ metadata: name: kaniko-trivy-good-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-scanning strategy: diff --git a/samples/v1beta1/build/build_kaniko_cr.yaml b/samples/v1beta1/build/build_kaniko_cr.yaml index 2d56c5f3d8..6746b2a384 100644 --- a/samples/v1beta1/build/build_kaniko_cr.yaml +++ b/samples/v1beta1/build/build_kaniko_cr.yaml @@ -5,6 +5,7 @@ metadata: name: kaniko-golang-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-go contextDir: docker-build diff --git a/samples/v1beta1/build/build_ko_cr.yaml b/samples/v1beta1/build/build_ko_cr.yaml index 737f219cf9..af3ebc9803 100644 --- a/samples/v1beta1/build/build_ko_cr.yaml +++ b/samples/v1beta1/build/build_ko_cr.yaml @@ -12,6 +12,7 @@ spec: - name: package-directory value: ./cmd/shipwright-build-controller source: + type: Git git: url: https://github.com/shipwright-io/build strategy: diff --git a/samples/v1beta1/build/build_source-to-image_cr.yaml b/samples/v1beta1/build/build_source-to-image_cr.yaml index ae9db48efc..de05c3d5ff 100644 --- a/samples/v1beta1/build/build_source-to-image_cr.yaml +++ b/samples/v1beta1/build/build_source-to-image_cr.yaml @@ -5,6 +5,7 @@ metadata: name: s2i-nodejs-build spec: source: + type: Git git: url: https://github.com/shipwright-io/sample-nodejs contextDir: source-build/ diff --git a/test/v1beta1_samples/build_samples.go b/test/v1beta1_samples/build_samples.go index 20427ec0ce..8ff92dd4ba 100644 --- a/test/v1beta1_samples/build_samples.go +++ b/test/v1beta1_samples/build_samples.go @@ -13,6 +13,7 @@ metadata: name: buildah spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -39,6 +40,7 @@ metadata: name: buildah spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -59,6 +61,7 @@ metadata: namespace: build-test spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -77,6 +80,7 @@ metadata: name: buildah spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -103,6 +107,7 @@ metadata: name: buildah spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -132,6 +137,7 @@ metadata: namespace: build-test spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" contextDir: docker-build @@ -159,6 +165,7 @@ metadata: namespace: build-test spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -174,6 +181,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -201,6 +209,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" contextDir: docker-build @@ -217,6 +226,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -233,6 +243,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -250,6 +261,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" cloneSecret: source-secret @@ -267,6 +279,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" paramValues: @@ -286,6 +299,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" cloneSecret: source-secret @@ -306,6 +320,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -322,6 +337,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -342,6 +358,7 @@ metadata: build.shipwright.io/verify.repository: "true" spec: source: + type: Git git: url: "https://github.foobar.com/sbose78/taxi" strategy: @@ -385,6 +402,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" strategy: @@ -401,6 +419,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" paramValues: @@ -418,6 +437,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" paramValues: @@ -437,6 +457,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" paramValues: @@ -464,6 +485,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" paramValues: @@ -484,6 +506,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" paramValues: @@ -501,6 +524,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" paramValues: @@ -519,6 +543,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" paramValues: @@ -536,6 +561,7 @@ apiVersion: shipwright.io/v1beta1 kind: Build spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" paramValues: @@ -556,6 +582,7 @@ metadata: name: build-retention-ttl spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" contextDir: docker-build @@ -577,6 +604,7 @@ metadata: name: build-retention-limit spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" contextDir: docker-build @@ -598,7 +626,9 @@ metadata: name: build-retention-limit spec: source: - url: "https://github.com/shipwright-io/sample-go" + type: Git + git: + url: "https://github.com/shipwright-io/sample-go" contextDir: docker-build strategy: kind: ClusterBuildStrategy @@ -618,6 +648,7 @@ metadata: name: build-retention-ttl spec: source: + type: Git git: url: "https://github.com/shipwright-io/sample-go" contextDir: docker-build