Skip to content

Commit 4aea4da

Browse files
Merge pull request #318 from Roming22/fix/sonarcloud
chore: fix some SonarQube issues
2 parents 160c28a + 384ca85 commit 4aea4da

File tree

5 files changed

+39
-16
lines changed

5 files changed

+39
-16
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Build
33
#
44

5-
FROM registry.redhat.io/openshift4/ose-tools-rhel9@sha256:683fe19d6624335d60fcfdd9b53aedac6d299205c4c573e4f334008d92591eb5 as ose-tools
5+
FROM registry.redhat.io/openshift4/ose-tools-rhel9@sha256:683fe19d6624335d60fcfdd9b53aedac6d299205c4c573e4f334008d92591eb5 AS ose-tools
66
FROM registry.access.redhat.com/ubi9/go-toolset:1.22.5-1730550521 AS builder
77

88
USER root

ci/Dockerfile

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,26 @@ ENV OC_VERSION=4.14.8
88
USER root
99

1010
# hadolint ignore=DL3041
11-
RUN dnf install -y -q --allowerasing --nobest nodejs-devel nodejs-libs python3-pip jq diffutils \
12-
openssl openssl-devel ca-certificates make cmake cpp gcc gcc-c++ zlib zlib-devel brotli brotli-devel python3 nodejs-packaging && \
11+
RUN dnf install -y -q --allowerasing --nobest \
12+
brotli \
13+
brotli-devel \
14+
ca-certificates \
15+
cmake \
16+
cpp \
17+
diffutils \
18+
gcc \
19+
gcc-c++ \
20+
jq \
21+
make \
22+
nodejs-devel \
23+
nodejs-libs \
24+
nodejs-packaging \
25+
openssl \
26+
openssl-devel \
27+
python3 \
28+
python3-pip \
29+
zlib \
30+
zlib-devel && \
1331
pip3 install --upgrade pip && \
1432
pip3 install --upgrade setuptools && \
1533
pip3 install yq yamllint && \
@@ -18,18 +36,23 @@ RUN dnf install -y -q --allowerasing --nobest nodejs-devel nodejs-libs python3-p
1836
echo -n "node version: "; node -v; \
1937
echo -n "npm version: "; npm -v; \
2038
echo -n "yarn version: "; yarn -v && \
21-
curl --fail -sSL https://github.com/koalaman/shellcheck/releases/download/v$SHELLCHECK_VERSION/shellcheck-v$SHELLCHECK_VERSION.linux.x86_64.tar.xz | tar -xJvf - shellcheck-v$SHELLCHECK_VERSION/shellcheck && \
22-
mv shellcheck-v$SHELLCHECK_VERSION/shellcheck /usr/local/bin/shellcheck && chmod 755 /usr/local/bin/shellcheck && rm -rf "shellcheck-v$SHELLCHECK_VERSION" && \
23-
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && chmod 700 get_helm.sh && ./get_helm.sh && rm -rf get_helm.sh && \
24-
curl -Lso /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 && chmod +x /usr/local/bin/yq && \
25-
curl -fsSL -o tkn.tgz "https://github.com/tektoncd/cli/releases/download/${TEKTONCD_CLI_VERSION}/tkn_${TEKTONCD_CLI_VERSION:1}_Linux_x86_64.tar.gz" && tar -C "/usr/local/bin" --no-same-owner -xzf "tkn.tgz" tkn && rm -rf "tkn.tgz" && \
26-
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 &&\
39+
curl -fsSL --proto "=https" "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJvf - "shellcheck-v${SHELLCHECK_VERSION}/shellcheck" && \
40+
mv "shellcheck-v${SHELLCHECK_VERSION}/shellcheck" /usr/local/bin/shellcheck && \
41+
chmod 755 /usr/local/bin/shellcheck && \
42+
rm -rf "shellcheck-v${SHELLCHECK_VERSION}" && \
43+
curl -fsSL --proto "=https" -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
44+
chmod 700 get_helm.sh && ./get_helm.sh && rm -rf get_helm.sh && \
45+
curl -fsSL --proto "=https" -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" && chmod +x /usr/local/bin/yq && \
46+
curl -fsSL --proto "=https" -o tkn.tgz "https://github.com/tektoncd/cli/releases/download/${TEKTONCD_CLI_VERSION}/tkn_${TEKTONCD_CLI_VERSION:1}_Linux_x86_64.tar.gz" && tar -C "/usr/local/bin" --no-same-owner -xzf "tkn.tgz" tkn && rm -rf "tkn.tgz" && \
47+
curl -fsSL --proto "=https" -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 &&\
2748
install -m 555 argocd-linux-amd64 /usr/local/bin/argocd && \
2849
rm argocd-linux-amd64 && \
29-
curl -Lso /usr/local/bin/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x /usr/local/bin/kubectl && \
30-
curl -Lso /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64 && chmod +x /usr/local/bin/cosign && \
31-
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin && \
32-
curl -L "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OC_VERSION}/openshift-client-linux.tar.gz" -o /tmp/openshift-client-linux.tar.gz && \
50+
curl -fsSL -o /usr/local/bin/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
51+
chmod +x /usr/local/bin/kubectl && \
52+
curl -fsSL --proto "=https" -o /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64 && \
53+
chmod +x /usr/local/bin/cosign && \
54+
curl -fsSL --proto "=https" https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin && \
55+
curl -fsSL --proto "=https" "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OC_VERSION}/openshift-client-linux.tar.gz" -o /tmp/openshift-client-linux.tar.gz && \
3356
tar --no-same-owner -xzf /tmp/openshift-client-linux.tar.gz && \
3457
mv oc kubectl /usr/local/bin && \
3558
oc version --client && \

installer/charts/rhtap-integrations/templates/developer-hub/serviceaccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ kind: ServiceAccount
1717
metadata:
1818
name: {{ $saName }}
1919
namespace: {{ .Release.Namespace }}
20-
{{- $secrets := (get $sa "secrets" | default list)}}
20+
{{- $secrets := (get $sa "secrets" | default list) }}
2121
secrets:
2222
{{/* Patch ServiceAccount secrets */}}
2323
{{- $secretExists := false }}

installer/charts/rhtap-integrations/templates/integrations/gitlab-integration.secret.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
stringData:
1010
host: {{ get $data "host" | default "gitlab.com" }}
1111
token: {{ $data.token }}
12-
{{- if and ( $data.clientId $data.clientSecret)}}
12+
{{- if and ( $data.clientId $data.clientSecret) }}
1313
clientId: {{ $data.clientId }}
1414
clientSecret: {{ $data.clientSecret }}
1515
{{- end }}

test/charts/testing/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: ConfigMap
44
metadata:
5-
name: {{ .Chart.Name}}
5+
name: {{ .Chart.Name }}
66
data:
77
{{- range $key, $value := .Values }}
88
{{ $key }}: {{ $value | quote }}

0 commit comments

Comments
 (0)