Skip to content

Commit 1d43dcd

Browse files
authored
fix(KONFLUX-3663): format PipelineRun files and upload SAST results (#371)
* fix(KONFLUX-3663): format Tekton PipelineRun files Format PipelineRun files with yq for consistent indentation and format Signed-off-by: ccronca <[email protected]> * 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 <[email protected]> --------- Signed-off-by: ccronca <[email protected]>
1 parent 30fe323 commit 1d43dcd

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

.tekton/exhort-pull-request.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ metadata:
77
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
88
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
99
pipelinesascode.tekton.dev/max-keep-runs: "3"
10-
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
11-
== "main" && ( ".tekton/exhort-pull-request.yaml".pathChanged()
12-
|| "ui/*".pathChanged() || "src/*".pathChanged() || "api-spec/*".pathChanged()
13-
|| "pom.xml".pathChanged() )
14-
&& !( event_title.contains("[skip ci]") || event_title.contains("[ci skip]") )
10+
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" && ( ".tekton/exhort-pull-request.yaml".pathChanged() || "ui/*".pathChanged() || "src/*".pathChanged() || "api-spec/*".pathChanged() || "pom.xml".pathChanged() ) && !( event_title.contains("[skip ci]") || event_title.contains("[ci skip]") )
1511
creationTimestamp: null
1612
labels:
1713
appstudio.openshift.io/application: exhort
@@ -68,8 +64,8 @@ spec:
6864
value: task
6965
resolver: bundles
7066
workspaces:
71-
- name: workspace
72-
workspace: workspace
67+
- name: workspace
68+
workspace: workspace
7369
params:
7470
- description: Source Repository URL
7571
name: git-url
@@ -82,13 +78,11 @@ spec:
8278
name: output-image
8379
type: string
8480
- default: .
85-
description: Path to the source code of an application's component from where
86-
to build image.
81+
description: Path to the source code of an application's component from where to build image.
8782
name: path-context
8883
type: string
8984
- default: Dockerfile
90-
description: Path to the Dockerfile inside the context specified by parameter
91-
path-context
85+
description: Path to the Dockerfile inside the context specified by parameter path-context
9286
name: dockerfile
9387
type: string
9488
- default: "false"
@@ -112,8 +106,7 @@ spec:
112106
name: java
113107
type: string
114108
- default: ""
115-
description: Image tag expiration time, time values could be something like
116-
1h, 2d, 3w for hours, days, and weeks, respectively.
109+
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
117110
name: image-expires-after
118111
results:
119112
- description: ""
@@ -269,7 +262,6 @@ spec:
269262
value: $(tasks.build-container.results.IMAGE_URL)
270263
- name: IMAGE_DIGEST
271264
value: $(tasks.build-container.results.IMAGE_DIGEST)
272-
273265
taskRef:
274266
params:
275267
- name: name
@@ -308,7 +300,7 @@ spec:
308300
- "false"
309301
- name: sast-snyk-check
310302
runAfter:
311-
- clone-repository
303+
- build-container
312304
taskRef:
313305
params:
314306
- name: name
@@ -326,6 +318,11 @@ spec:
326318
workspaces:
327319
- name: workspace
328320
workspace: workspace
321+
params:
322+
- name: image-digest
323+
value: $(tasks.build-container.results.IMAGE_DIGEST)
324+
- name: image-url
325+
value: $(tasks.build-container.results.IMAGE_URL)
329326
- name: clamav-scan
330327
params:
331328
- name: image-digest

.tekton/exhort-push.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ spec:
6262
value: task
6363
resolver: bundles
6464
workspaces:
65-
- name: workspace
66-
workspace: workspace
65+
- name: workspace
66+
workspace: workspace
6767
params:
6868
- description: Source Repository URL
6969
name: git-url
@@ -76,13 +76,11 @@ spec:
7676
name: output-image
7777
type: string
7878
- default: .
79-
description: Path to the source code of an application's component from where
80-
to build image.
79+
description: Path to the source code of an application's component from where to build image.
8180
name: path-context
8281
type: string
8382
- default: Dockerfile
84-
description: Path to the Dockerfile inside the context specified by parameter
85-
path-context
83+
description: Path to the Dockerfile inside the context specified by parameter path-context
8684
name: dockerfile
8785
type: string
8886
- default: "false"
@@ -106,8 +104,7 @@ spec:
106104
name: java
107105
type: string
108106
- default: ""
109-
description: Image tag expiration time, time values could be something like
110-
1h, 2d, 3w for hours, days, and weeks, respectively.
107+
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
111108
name: image-expires-after
112109
results:
113110
- description: ""
@@ -301,7 +298,7 @@ spec:
301298
- "false"
302299
- name: sast-snyk-check
303300
runAfter:
304-
- clone-repository
301+
- build-container
305302
taskRef:
306303
params:
307304
- name: name
@@ -319,6 +316,11 @@ spec:
319316
workspaces:
320317
- name: workspace
321318
workspace: workspace
319+
params:
320+
- name: image-digest
321+
value: $(tasks.build-container.results.IMAGE_DIGEST)
322+
- name: image-url
323+
value: $(tasks.build-container.results.IMAGE_URL)
322324
- name: clamav-scan
323325
params:
324326
- name: image-digest

0 commit comments

Comments
 (0)