Skip to content

Commit

Permalink
fix(RELEASE-1074): linting issues in prepare-exodus-params (#741)
Browse files Browse the repository at this point in the history
Signed-off-by: Johnny Bieren <[email protected]>
  • Loading branch information
johnbieren authored Dec 16, 2024
1 parent 7f9f26d commit 8c472a7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 41 deletions.
3 changes: 3 additions & 0 deletions tasks/prepare-exodus-params/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ exodus-gw is a microservice dedicated to writing data onto the CDN.
|----------|-----------------------------------------------------------------------------------------------------------------------------|----------|---------------|
| dataPath | Path to the merged data JSON file generated by collect-data task and containing the exodus configuration options to use | No | - |

## Changes in 0.2.3
* Fix shellcheck/checkton linting issues in the task and tests

## Changes in 0.2.2
* Use `cdn.env` instead of `exodus.env` to align RPA data with other pipelines

Expand Down
10 changes: 5 additions & 5 deletions tasks/prepare-exodus-params/prepare-exodus-params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Task
metadata:
name: prepare-exodus-params
labels:
app.kubernetes.io/version: "0.2.2"
app.kubernetes.io/version: "0.2.3"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: release
Expand Down Expand Up @@ -35,7 +35,7 @@ spec:
- name: collect-exodus-params
image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f
script: |
#!/usr/bin/env sh
#!/usr/bin/env bash
set -x
DATA_FILE="$(workspaces.data.path)/$(params.dataPath)"
Expand Down Expand Up @@ -67,6 +67,6 @@ spec:
;;
esac
echo -n $EXODUS_GW_SECRET > $(results.exodusGwSecret.path)
echo -n $EXODUS_GW_URL > $(results.exodusGwUrl.path)
echo -n $EXODUS_GW_ENV > $(results.exodusGwEnv.path)
echo -n $EXODUS_GW_SECRET > "$(results.exodusGwSecret.path)"
echo -n $EXODUS_GW_URL > "$(results.exodusGwUrl.path)"
echo -n $EXODUS_GW_ENV > "$(results.exodusGwEnv.path)"
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
#!/usr/bin/env sh
set -eux
cat > $(workspaces.data.path)/data.json << EOF
cat > "$(workspaces.data.path)/data.json" << EOF
{
"cdn": {
"env": "production"
Expand Down Expand Up @@ -57,17 +57,10 @@ spec:
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f
env:
- name: "exodusGwSecret"
value: '$(params.exodusGwSecret)'
- name: "exodusGwUrl"
value: '$(params.exodusGwUrl)'
- name: "exodusGwEnv"
value: '$(params.exodusGwEnv)'
script: |
#!/usr/bin/env sh
#!/usr/bin/env bash
set -eux
test $exodusGwSecret == "exodus-prod-secret"
test $exodusGwUrl == "https://exodus-gw.corp.redhat.com"
test $exodusGwEnv == "live"
test "$(params.exodusGwSecret)" == "exodus-prod-secret"
test "$(params.exodusGwUrl)" == "https://exodus-gw.corp.redhat.com"
test "$(params.exodusGwEnv)" == "live"
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
#!/usr/bin/env sh
set -eux
cat > $(workspaces.data.path)/data.json << EOF
cat > "$(workspaces.data.path)/data.json" << EOF
{
"cdn": {
"env": "qa"
Expand Down Expand Up @@ -57,17 +57,10 @@ spec:
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f
env:
- name: "exodusGwSecret"
value: '$(params.exodusGwSecret)'
- name: "exodusGwUrl"
value: '$(params.exodusGwUrl)'
- name: "exodusGwEnv"
value: '$(params.exodusGwEnv)'
script: |
#!/usr/bin/env sh
#!/usr/bin/env bash
set -eux
test $exodusGwSecret == "exodus-stage-secret"
test $exodusGwUrl == "https://exodus-gw.corp.stage.redhat.com"
test $exodusGwEnv == "live"
test "$(params.exodusGwSecret)" == "exodus-stage-secret"
test "$(params.exodusGwUrl)" == "https://exodus-gw.corp.stage.redhat.com"
test "$(params.exodusGwEnv)" == "live"
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
#!/usr/bin/env sh
set -eux
cat > $(workspaces.data.path)/data.json << EOF
cat > "$(workspaces.data.path)/data.json" << EOF
{
"cdn": {
"env": "stage"
Expand Down Expand Up @@ -57,17 +57,10 @@ spec:
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f
env:
- name: "exodusGwSecret"
value: '$(params.exodusGwSecret)'
- name: "exodusGwUrl"
value: '$(params.exodusGwUrl)'
- name: "exodusGwEnv"
value: '$(params.exodusGwEnv)'
script: |
#!/usr/bin/env sh
#!/usr/bin/env bash
set -eux
test $exodusGwSecret == "exodus-prod-secret"
test $exodusGwUrl == "https://exodus-gw.corp.redhat.com"
test $exodusGwEnv == "pre"
test "$(params.exodusGwSecret)" == "exodus-prod-secret"
test "$(params.exodusGwUrl)" == "https://exodus-gw.corp.redhat.com"
test "$(params.exodusGwEnv)" == "pre"

0 comments on commit 8c472a7

Please sign in to comment.