Skip to content

Commit 14cf1cf

Browse files
committed
cincinnati-op: add test fips-image-scan
1 parent 313ad90 commit 14cf1cf

File tree

3 files changed

+162
-0
lines changed

3 files changed

+162
-0
lines changed

ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-master.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ base_images:
33
name: cincinnati-build-root
44
namespace: cincinnati-ci
55
tag: deploy
6+
fips-check-payload:
7+
name: check-payload
8+
namespace: ci
9+
tag: latest
610
operator-sdk:
711
name: "4.15"
812
namespace: origin
@@ -131,6 +135,40 @@ tests:
131135
cpu: 100m
132136
memory: 200Mi
133137
workflow: generic-claim
138+
- as: fips-image-scan-operator
139+
optional: true
140+
steps:
141+
dependencies:
142+
SCAN_IMAGE: cincinnati-operator
143+
test:
144+
- ref: fips-check-image-scan
145+
- as: fips-image-scan-operator-production
146+
cron: '@weekly'
147+
steps:
148+
test:
149+
- as: check-payload
150+
commands: |
151+
set -o nounset
152+
set -o errexit
153+
set -o pipefail
154+
155+
set -x
156+
SCAN_IMAGE="registry.redhat.io/openshift-update-service/openshift-update-service-rhel8-operator:latest"
157+
158+
export REGISTRY_AUTH_FILE=/var/secrets/ci-pull-credentials/.dockerconfigjson
159+
mkdir -p /tmp/oci-images
160+
skopeo copy --remove-signatures docker://"$SCAN_IMAGE" oci:/tmp/oci-images:image:latest
161+
umoci raw unpack --rootless --image /tmp/oci-images:image:latest /tmp/unpacked-image
162+
/check-payload scan local --path=/tmp/unpacked-image --output-file="$ARTIFACT_DIR"/check-payload-report.txt
163+
credentials:
164+
- mount_path: /var/secrets/ci-pull-credentials
165+
name: ci-pull-credentials
166+
namespace: test-credentials
167+
from: fips-check-payload
168+
resources:
169+
requests:
170+
cpu: 50m
171+
memory: 64Mi
134172
- as: operator-e2e-new-ocp-published-graph-data
135173
cluster_claim:
136174
architecture: amd64
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
periodics:
2+
- agent: kubernetes
3+
cluster: build03
4+
cron: '@weekly'
5+
decorate: true
6+
decoration_config:
7+
skip_cloning: true
8+
extra_refs:
9+
- base_ref: master
10+
org: openshift
11+
repo: cincinnati-operator
12+
labels:
13+
ci.openshift.io/generator: prowgen
14+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
15+
name: periodic-ci-openshift-cincinnati-operator-master-fips-image-scan-operator-production
16+
spec:
17+
containers:
18+
- args:
19+
- --gcs-upload-secret=/secrets/gcs/service-account.json
20+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
21+
- --report-credentials-file=/etc/report/credentials
22+
- --secret-dir=/secrets/ci-pull-credentials
23+
- --target=fips-image-scan-operator-production
24+
command:
25+
- ci-operator
26+
image: ci-operator:latest
27+
imagePullPolicy: Always
28+
name: ""
29+
resources:
30+
requests:
31+
cpu: 10m
32+
volumeMounts:
33+
- mountPath: /secrets/ci-pull-credentials
34+
name: ci-pull-credentials
35+
readOnly: true
36+
- mountPath: /secrets/gcs
37+
name: gcs-credentials
38+
readOnly: true
39+
- mountPath: /secrets/manifest-tool
40+
name: manifest-tool-local-pusher
41+
readOnly: true
42+
- mountPath: /etc/pull-secret
43+
name: pull-secret
44+
readOnly: true
45+
- mountPath: /etc/report
46+
name: result-aggregator
47+
readOnly: true
48+
serviceAccountName: ci-operator
49+
volumes:
50+
- name: ci-pull-credentials
51+
secret:
52+
secretName: ci-pull-credentials
53+
- name: manifest-tool-local-pusher
54+
secret:
55+
secretName: manifest-tool-local-pusher
56+
- name: pull-secret
57+
secret:
58+
secretName: registry-pull-credentials
59+
- name: result-aggregator
60+
secret:
61+
secretName: result-aggregator

ci-operator/jobs/openshift/cincinnati-operator/openshift-cincinnati-operator-master-presubmits.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,69 @@ presubmits:
5555
secret:
5656
secretName: result-aggregator
5757
trigger: (?m)^/test( | .* )ci-bundle-cincinnati-bundle,?($|\s.*)
58+
- agent: kubernetes
59+
always_run: true
60+
branches:
61+
- ^master$
62+
- ^master-
63+
cluster: build09
64+
context: ci/prow/fips-image-scan-operator
65+
decorate: true
66+
decoration_config:
67+
skip_cloning: true
68+
labels:
69+
ci.openshift.io/generator: prowgen
70+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
71+
name: pull-ci-openshift-cincinnati-operator-master-fips-image-scan-operator
72+
optional: true
73+
rerun_command: /test fips-image-scan-operator
74+
spec:
75+
containers:
76+
- args:
77+
- --gcs-upload-secret=/secrets/gcs/service-account.json
78+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
79+
- --report-credentials-file=/etc/report/credentials
80+
- --secret-dir=/secrets/ci-pull-credentials
81+
- --target=fips-image-scan-operator
82+
command:
83+
- ci-operator
84+
image: ci-operator:latest
85+
imagePullPolicy: Always
86+
name: ""
87+
resources:
88+
requests:
89+
cpu: 10m
90+
volumeMounts:
91+
- mountPath: /secrets/ci-pull-credentials
92+
name: ci-pull-credentials
93+
readOnly: true
94+
- mountPath: /secrets/gcs
95+
name: gcs-credentials
96+
readOnly: true
97+
- mountPath: /secrets/manifest-tool
98+
name: manifest-tool-local-pusher
99+
readOnly: true
100+
- mountPath: /etc/pull-secret
101+
name: pull-secret
102+
readOnly: true
103+
- mountPath: /etc/report
104+
name: result-aggregator
105+
readOnly: true
106+
serviceAccountName: ci-operator
107+
volumes:
108+
- name: ci-pull-credentials
109+
secret:
110+
secretName: ci-pull-credentials
111+
- name: manifest-tool-local-pusher
112+
secret:
113+
secretName: manifest-tool-local-pusher
114+
- name: pull-secret
115+
secret:
116+
secretName: registry-pull-credentials
117+
- name: result-aggregator
118+
secret:
119+
secretName: result-aggregator
120+
trigger: (?m)^/test( | .* )fips-image-scan-operator,?($|\s.*)
58121
- agent: kubernetes
59122
always_run: false
60123
branches:

0 commit comments

Comments
 (0)