Skip to content

Commit 26f8cef

Browse files
authored
style: Adjust YAML IDE formatting and reformat .tekton/*.yaml (#1515)
1 parent f9a1c5a commit 26f8cef

12 files changed

+845
-841
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ indent_style = tab
44
[**.proto]
55
indent_style = space
66
indent_size = 4
7+
8+
[{*.yaml,*.yml}]
9+
# ij_ settings meaning can be mapped from https://www.jetbrains.com/help/idea/code-style-yaml.html
10+
ij_yaml_indent_sequence_value = false

.tekton/determine-image-tag-task.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ spec:
88
description: Determines the tag for the output image using the StackRox convention from 'make tag' output.
99
params:
1010
results:
11-
- name: image-tag
12-
description: Image Tag determined by custom logic.
11+
- name: image-tag
12+
description: Image Tag determined by custom logic.
1313
steps:
14-
- name: determine-image-tag
15-
image: registry.access.redhat.com/ubi8:latest
16-
script: |
17-
#!/usr/bin/env bash
18-
set -euo pipefail
19-
dnf -y upgrade --nobest
20-
dnf -y install git make
21-
cd "$(workspaces.source.path)/source"
22-
scripts/konflux/fail-build-if-git-is-dirty.sh
23-
echo -n "$(make --quiet --no-print-directory tag)-fast" | tee "$(results.image-tag.path)"
14+
- name: determine-image-tag
15+
image: registry.access.redhat.com/ubi8:latest
16+
script: |
17+
#!/usr/bin/env bash
18+
set -euo pipefail
19+
dnf -y upgrade --nobest
20+
dnf -y install git make
21+
cd "$(workspaces.source.path)/source"
22+
scripts/konflux/fail-build-if-git-is-dirty.sh
23+
echo -n "$(make --quiet --no-print-directory tag)-fast" | tee "$(results.image-tag.path)"
2424
workspaces:
25-
- name: source
26-
description: The workspace where source code is included.
25+
- name: source
26+
description: The workspace where source code is included.

.tekton/fetch-scanner-data-task.yaml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ metadata:
77
spec:
88
description: Downloads blobs from definitions.stackrox.io GCloud bucket to be included in Scanner container builds.
99
params:
10-
- name: blobs-to-fetch
11-
description: |
12-
List of scanner-data file names to fetch to include in the container build.
13-
An empty list is allowed which results in no-op.
14-
type: array
15-
- name: target-dir
16-
description: Target directory relative to workspace where to save downloaded blobs.
17-
type: string
18-
default: "source"
10+
- name: blobs-to-fetch
11+
description: |
12+
List of scanner-data file names to fetch to include in the container build.
13+
An empty list is allowed which results in no-op.
14+
type: array
15+
- name: target-dir
16+
description: Target directory relative to workspace where to save downloaded blobs.
17+
type: string
18+
default: "source"
1919
results:
2020
steps:
21-
- name: fetch-scanner-data
22-
image: registry.access.redhat.com/ubi8/ubi-minimal:latest
23-
# The only functioning way to pass array parameter that I found is through args array.
24-
# Array params have weird limitations, see https://github.com/tektoncd/pipeline/blob/main/docs/tasks.md#substituting-array-parameters
25-
# Attempts to pass this in other places result in webhook errors and pipeline not starting.
26-
args: [ "$(params.blobs-to-fetch[*])" ]
27-
script: |
28-
#!/usr/bin/env bash
29-
set -euo pipefail
30-
exec "$(workspaces.source.path)/source/scripts/konflux/fetch-scanner-data.sh" \
31-
"$(workspaces.source.path)/$(params.target-dir)" \
32-
"$@"
33-
# It should not take long to download blobs otherwise there's something odd going on.
34-
timeout: 10m
21+
- name: fetch-scanner-data
22+
image: registry.access.redhat.com/ubi8/ubi-minimal:latest
23+
# The only functioning way to pass array parameter that I found is through args array.
24+
# Array params have weird limitations, see https://github.com/tektoncd/pipeline/blob/main/docs/tasks.md#substituting-array-parameters
25+
# Attempts to pass this in other places result in webhook errors and pipeline not starting.
26+
args: [ "$(params.blobs-to-fetch[*])" ]
27+
script: |
28+
#!/usr/bin/env bash
29+
set -euo pipefail
30+
exec "$(workspaces.source.path)/source/scripts/konflux/fetch-scanner-data.sh" \
31+
"$(workspaces.source.path)/$(params.target-dir)" \
32+
"$@"
33+
# It should not take long to download blobs otherwise there's something odd going on.
34+
timeout: 10m
3535
workspaces:
36-
- name: source
37-
description: Workspace with the source code.
36+
- name: source
37+
description: Workspace with the source code.

0 commit comments

Comments
 (0)