Skip to content

Commit

Permalink
Merge pull request #334 from xinredhat/fix_static-code-analysis
Browse files Browse the repository at this point in the history
fixed the issues that static-code-analysis CI reported
  • Loading branch information
xinredhat authored Dec 4, 2024
2 parents 4629caf + a6650bd commit 42162b5
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: appstudio.redhat.com/v1beta2
kind: IntegrationTestScenario
metadata:
Expand All @@ -22,4 +23,4 @@ spec:
value: main
- name: pathInRepo
value: integration-tests/pipelines/e2e-main-pipeline.yaml
resolver: git
resolver: git
55 changes: 28 additions & 27 deletions integration-tests/custom-resources/plrManager-Role.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: plr-manager
rules:
- apiGroups:
- tekton.dev
resources:
- pipelineruns
verbs:
- get
- watch
- list
- update
- patch
- delete
- create
- apiGroups:
- tekton.dev
resources:
- taskruns
verbs:
- watch
- apiGroups:
- ""
resources:
- pods
- pods/log
verbs:
- get
- watch
- list
- apiGroups:
- tekton.dev
resources:
- pipelineruns
verbs:
- get
- watch
- list
- update
- patch
- delete
- create
- apiGroups:
- tekton.dev
resources:
- taskruns
verbs:
- watch
- apiGroups:
- ""
resources:
- pods
- pods/log
verbs:
- get
- watch
- list
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: manage-plr
subjects:
- kind: ServiceAccount
name: appstudio-pipeline
apiGroup: ""
- kind: ServiceAccount
name: appstudio-pipeline
apiGroup: ""
roleRef:
kind: Role
name: plr-manager
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/pipelines/e2e-main-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
Expand Down Expand Up @@ -33,7 +34,7 @@ spec:
value: $(context.pipelineRun.name)
- name: get-pict-file
runAfter:
- test-metadata
- test-metadata
taskSpec:
results:
- name: pict-file
Expand All @@ -58,7 +59,7 @@ spec:
curl -o $(results.pict-file.path) https://raw.githubusercontent.com/$REPO_ORG/rhtap-cli/refs/heads/$BRANCH/integration-tests/pict-models/default.pict
- name: generate-configs
runAfter:
- get-pict-file
- get-pict-file
taskSpec:
results:
- name: configs-json
Expand All @@ -82,7 +83,7 @@ spec:
steps:
- name: start-pipeline
image: quay.io/openshift-pipeline/ci
env:
env:
- name: SNAPSHOT
value: $(params.SNAPSHOT)
- name: JOB_SPEC
Expand Down Expand Up @@ -129,7 +130,7 @@ spec:
--labels "test.appstudio.openshift.io/scenario=pr-e2e-tests" \
--prefix-name "e2e-$version"\
-o name)
tkn pipelinerun logs "$pipeline_run_name" -f | sed "s/^/$pipeline_run_name: /"
pipelinerun_status=$(tkn pipelinerun describe "$pipeline_run_name" -o jsonpath='{.status.conditions[0].status}')
Expand All @@ -152,4 +153,3 @@ spec:
exit 1
fi
done
6 changes: 3 additions & 3 deletions integration-tests/pipelines/rhtap-cli-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
default: ''
type: string
- name: ocp-version
description: 'The OpenShift version to use for the ephemeral cluster deployment.'
description: 'The OpenShift version to use for the ephemeral cluster deployment.'
type: string
- name: cloud-credential-key
type: string
Expand Down Expand Up @@ -177,7 +177,7 @@ spec:
value: main
- name: pathInRepo
value: common/tasks/sprayproxy/sprayproxy-deprovision/sprayproxy-unregister-server.yaml
params:
params:
- name: ocp-login-command
value: "$(tasks.provision-rosa.results.ocp-login-command)"
- name: pull-request-status-message
Expand All @@ -198,4 +198,4 @@ spec:
- name: pipeline-aggregate-status
value: "$(tasks.status)"
- name: job-spec
value: "$(params.job-spec)"
value: "$(params.job-spec)"
2 changes: 1 addition & 1 deletion integration-tests/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ integrations:
clientSecret: "${GITHUB__APP__CLIENT__SECRET}"
host: "github.com"
publicKey: |-
$(echo "${GITHUB__APP__PRIVATE_KEY}" | sed 's/^/ /')
$(printf "%s\n" "${GITHUB__APP__PRIVATE_KEY}" | sed 's/^/ /')
token: "${GITOPS__GIT_TOKEN}"
webhookSecret: "${GITHUB__APP__WEBHOOK__SECRET}"
EOF
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/scripts/minio.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# ROSA HCP workaround for Docker limits
# for namespaces 'minio-operator'
set -o errexit
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/tasks/rhtap-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
value: "$(params.acs_install_enabled)"
- name: quay_install_enabled
value: "$(params.quay_install_enabled)"
- name: github_enabled
- name: github_enabled
value: "$(params.github_enabled)"
- name: gitlab_enabled
value: "$(params.gitlab_enabled)"
Expand Down

0 comments on commit 42162b5

Please sign in to comment.