From c5119bf58e6fe450fee8a67ad8dd4a700bfed610 Mon Sep 17 00:00:00 2001 From: ccronca Date: Fri, 16 Aug 2024 12:33:51 +0200 Subject: [PATCH 1/2] fix(KONFLUX-3663): format Tekton PipelineRun files Format PipelineRun files with yq for consistent indentation and format Signed-off-by: ccronca --- ...metheus-config-reloader-acm-210-pull-request.yaml | 12 ++++-------- .tekton/prometheus-config-reloader-acm-210-push.yaml | 12 ++++-------- .../prometheus-operator-acm-210-pull-request.yaml | 12 ++++-------- .tekton/prometheus-operator-acm-210-push.yaml | 12 ++++-------- 4 files changed, 16 insertions(+), 32 deletions(-) diff --git a/.tekton/prometheus-config-reloader-acm-210-pull-request.yaml b/.tekton/prometheus-config-reloader-acm-210-pull-request.yaml index 1dc525fa40d..ae56ebccec6 100644 --- a/.tekton/prometheus-config-reloader-acm-210-pull-request.yaml +++ b/.tekton/prometheus-config-reloader-acm-210-pull-request.yaml @@ -7,8 +7,7 @@ metadata: build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch - == "release-2.10" + pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "release-2.10" creationTimestamp: null labels: appstudio.openshift.io/application: release-acm-210 @@ -78,13 +77,11 @@ spec: name: output-image type: string - default: . - description: Path to the source code of an application's component from where - to build image. + description: Path to the source code of an application's component from where to build image. name: path-context type: string - default: Dockerfile - description: Path to the Dockerfile inside the context specified by parameter - path-context + description: Path to the Dockerfile inside the context specified by parameter path-context name: dockerfile type: string - default: "false" @@ -108,8 +105,7 @@ spec: name: java type: string - default: "" - description: Image tag expiration time, time values could be something like - 1h, 2d, 3w for hours, days, and weeks, respectively. + description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively. name: image-expires-after - default: "false" description: Build a source image. diff --git a/.tekton/prometheus-config-reloader-acm-210-push.yaml b/.tekton/prometheus-config-reloader-acm-210-push.yaml index 1d4248fed30..e59ee6e237a 100644 --- a/.tekton/prometheus-config-reloader-acm-210-push.yaml +++ b/.tekton/prometheus-config-reloader-acm-210-push.yaml @@ -6,8 +6,7 @@ metadata: build.appstudio.redhat.com/commit_sha: '{{revision}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch - == "release-2.10" + pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "release-2.10" creationTimestamp: null labels: appstudio.openshift.io/application: release-acm-210 @@ -75,13 +74,11 @@ spec: name: output-image type: string - default: . - description: Path to the source code of an application's component from where - to build image. + description: Path to the source code of an application's component from where to build image. name: path-context type: string - default: Dockerfile - description: Path to the Dockerfile inside the context specified by parameter - path-context + description: Path to the Dockerfile inside the context specified by parameter path-context name: dockerfile type: string - default: "false" @@ -105,8 +102,7 @@ spec: name: java type: string - default: "" - description: Image tag expiration time, time values could be something like - 1h, 2d, 3w for hours, days, and weeks, respectively. + description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively. name: image-expires-after - default: "false" description: Build a source image. diff --git a/.tekton/prometheus-operator-acm-210-pull-request.yaml b/.tekton/prometheus-operator-acm-210-pull-request.yaml index 48ab399de26..ca89b969997 100644 --- a/.tekton/prometheus-operator-acm-210-pull-request.yaml +++ b/.tekton/prometheus-operator-acm-210-pull-request.yaml @@ -7,8 +7,7 @@ metadata: build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch - == "release-2.10" + pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "release-2.10" creationTimestamp: null labels: appstudio.openshift.io/application: release-acm-210 @@ -78,13 +77,11 @@ spec: name: output-image type: string - default: . - description: Path to the source code of an application's component from where - to build image. + description: Path to the source code of an application's component from where to build image. name: path-context type: string - default: Dockerfile - description: Path to the Dockerfile inside the context specified by parameter - path-context + description: Path to the Dockerfile inside the context specified by parameter path-context name: dockerfile type: string - default: "false" @@ -108,8 +105,7 @@ spec: name: java type: string - default: "" - description: Image tag expiration time, time values could be something like - 1h, 2d, 3w for hours, days, and weeks, respectively. + description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively. name: image-expires-after - default: "false" description: Build a source image. diff --git a/.tekton/prometheus-operator-acm-210-push.yaml b/.tekton/prometheus-operator-acm-210-push.yaml index a3963a62c1a..e2d243ffa84 100644 --- a/.tekton/prometheus-operator-acm-210-push.yaml +++ b/.tekton/prometheus-operator-acm-210-push.yaml @@ -6,8 +6,7 @@ metadata: build.appstudio.redhat.com/commit_sha: '{{revision}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch - == "release-2.10" + pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "release-2.10" creationTimestamp: null labels: appstudio.openshift.io/application: release-acm-210 @@ -75,13 +74,11 @@ spec: name: output-image type: string - default: . - description: Path to the source code of an application's component from where - to build image. + description: Path to the source code of an application's component from where to build image. name: path-context type: string - default: Dockerfile - description: Path to the Dockerfile inside the context specified by parameter - path-context + description: Path to the Dockerfile inside the context specified by parameter path-context name: dockerfile type: string - default: "false" @@ -105,8 +102,7 @@ spec: name: java type: string - default: "" - description: Image tag expiration time, time values could be something like - 1h, 2d, 3w for hours, days, and weeks, respectively. + description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively. name: image-expires-after - default: "false" description: Build a source image. From 3ad1d8c60b45b1ae76b00ba05164db9f8ceda0b0 Mon Sep 17 00:00:00 2001 From: ccronca Date: Fri, 16 Aug 2024 12:33:52 +0200 Subject: [PATCH 2/2] fix(KONFLUX-3663): upload SAST results to quay.io Configure the SAST task to upload SARIF results to quay.io for long-term storage Signed-off-by: ccronca --- .../prometheus-config-reloader-acm-210-pull-request.yaml | 7 ++++++- .tekton/prometheus-config-reloader-acm-210-push.yaml | 7 ++++++- .tekton/prometheus-operator-acm-210-pull-request.yaml | 7 ++++++- .tekton/prometheus-operator-acm-210-push.yaml | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.tekton/prometheus-config-reloader-acm-210-pull-request.yaml b/.tekton/prometheus-config-reloader-acm-210-pull-request.yaml index ae56ebccec6..40de4ace7c6 100644 --- a/.tekton/prometheus-config-reloader-acm-210-pull-request.yaml +++ b/.tekton/prometheus-config-reloader-acm-210-pull-request.yaml @@ -303,7 +303,7 @@ spec: - "false" - name: sast-snyk-check runAfter: - - clone-repository + - build-container taskRef: params: - name: name @@ -321,6 +321,11 @@ spec: workspaces: - name: workspace workspace: workspace + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) - name: clamav-scan params: - name: image-digest diff --git a/.tekton/prometheus-config-reloader-acm-210-push.yaml b/.tekton/prometheus-config-reloader-acm-210-push.yaml index e59ee6e237a..cb245c683d3 100644 --- a/.tekton/prometheus-config-reloader-acm-210-push.yaml +++ b/.tekton/prometheus-config-reloader-acm-210-push.yaml @@ -300,7 +300,7 @@ spec: - "false" - name: sast-snyk-check runAfter: - - clone-repository + - build-container taskRef: params: - name: name @@ -318,6 +318,11 @@ spec: workspaces: - name: workspace workspace: workspace + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) - name: clamav-scan params: - name: image-digest diff --git a/.tekton/prometheus-operator-acm-210-pull-request.yaml b/.tekton/prometheus-operator-acm-210-pull-request.yaml index ca89b969997..4b399720f64 100644 --- a/.tekton/prometheus-operator-acm-210-pull-request.yaml +++ b/.tekton/prometheus-operator-acm-210-pull-request.yaml @@ -303,7 +303,7 @@ spec: - "false" - name: sast-snyk-check runAfter: - - clone-repository + - build-container taskRef: params: - name: name @@ -321,6 +321,11 @@ spec: workspaces: - name: workspace workspace: workspace + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) - name: clamav-scan params: - name: image-digest diff --git a/.tekton/prometheus-operator-acm-210-push.yaml b/.tekton/prometheus-operator-acm-210-push.yaml index e2d243ffa84..e6dffbf0656 100644 --- a/.tekton/prometheus-operator-acm-210-push.yaml +++ b/.tekton/prometheus-operator-acm-210-push.yaml @@ -300,7 +300,7 @@ spec: - "false" - name: sast-snyk-check runAfter: - - clone-repository + - build-container taskRef: params: - name: name @@ -318,6 +318,11 @@ spec: workspaces: - name: workspace workspace: workspace + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) - name: clamav-scan params: - name: image-digest