Skip to content

Commit 37b547c

Browse files
committed
ci: addition of scorecard in CI
1 parent 4b516ab commit 37b547c

File tree

2 files changed

+28
-15
lines changed

2 files changed

+28
-15
lines changed

.github/workflows/olm_scorecard.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Operator Scorecard Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
scorecard-check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check out code
10+
uses: actions/checkout@v2
11+
12+
- name: Install Operator SDK
13+
run: |
14+
curl -LO https://github.com/operator-framework/operator-sdk/releases/download/v1.24.1/operator-sdk_linux_amd64
15+
chmod +x operator-sdk_linux_amd64
16+
sudo mv operator-sdk_linux_amd64 /usr/local/bin/operator-sdk
17+
18+
- name: Install yq
19+
run: |
20+
sudo wget -O /usr/bin/yq https://github.com/mikefarah/yq/releases/download/v4.6.1/yq_linux_amd64
21+
sudo chmod +x /usr/bin/yq
22+
23+
- name: Modify scorecard config
24+
run: |
25+
yq e 'del(.stages[].tests[] | select(.labels.test == "olm-crds-have-resources-test"))' -i bundle/tests/scorecard/config.yaml
26+
27+
- name: Run Operator SDK Scorecard
28+
run: operator-sdk scorecard bundle/tests/scorecard/

.github/workflows/olm_tests.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,6 @@ jobs:
134134
BUNDLE_PUSH_OPT: "--tls-verify=false"
135135
CATALOG_PUSH_OPT: "--tls-verify=false"
136136

137-
- name: Install yq
138-
run: |
139-
sudo wget -O /usr/bin/yq https://github.com/mikefarah/yq/releases/download/v4.6.1/yq_linux_amd64
140-
sudo chmod +x /usr/bin/yq
141-
142-
- name: Modify scorecard config
143-
run: |
144-
yq e 'del(.stages[].tests[] | select(.labels.test == "olm-crds-have-resources-test"))' -i bundle/tests/scorecard/config.yaml
145-
146-
- name: Scorecard check
147-
run: |
148-
make scorecard-bundle
149-
env:
150-
IMG: "${{ env.REGISTRY_ADDRESS }}/codeflare-operator:v0.0.1"
151-
152137
- name: Update Operator to the built version
153138
run: |
154139
ORIGINAL_POD_NAME=$(kubectl get pod -l app.kubernetes.io/name=codeflare-operator -n openshift-operators -o json | jq -r .items[].metadata.name)

0 commit comments

Comments
 (0)