Skip to content

Commit

Permalink
fix(KONFLUX-3663): format PipelineRun files and upload SAST results (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
ccronca authored Aug 27, 2024
1 parent 30fe323 commit 1d43dcd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
27 changes: 12 additions & 15 deletions .tekton/exhort-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +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
== "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]") )
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]") )
creationTimestamp: null
labels:
appstudio.openshift.io/application: exhort
Expand Down Expand Up @@ -68,8 +64,8 @@ spec:
value: task
resolver: bundles
workspaces:
- name: workspace
workspace: workspace
- name: workspace
workspace: workspace
params:
- description: Source Repository URL
name: git-url
Expand All @@ -82,13 +78,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"
Expand All @@ -112,8 +106,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
results:
- description: ""
Expand Down Expand Up @@ -269,7 +262,6 @@ spec:
value: $(tasks.build-container.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-container.results.IMAGE_DIGEST)

taskRef:
params:
- name: name
Expand Down Expand Up @@ -308,7 +300,7 @@ spec:
- "false"
- name: sast-snyk-check
runAfter:
- clone-repository
- build-container
taskRef:
params:
- name: name
Expand All @@ -326,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
Expand Down
20 changes: 11 additions & 9 deletions .tekton/exhort-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ spec:
value: task
resolver: bundles
workspaces:
- name: workspace
workspace: workspace
- name: workspace
workspace: workspace
params:
- description: Source Repository URL
name: git-url
Expand All @@ -76,13 +76,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"
Expand All @@ -106,8 +104,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
results:
- description: ""
Expand Down Expand Up @@ -301,7 +298,7 @@ spec:
- "false"
- name: sast-snyk-check
runAfter:
- clone-repository
- build-container
taskRef:
params:
- name: name
Expand All @@ -319,6 +316,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
Expand Down

0 comments on commit 1d43dcd

Please sign in to comment.