Skip to content

Commit 100a452

Browse files
Merge pull request #2972 from chancez/metering_run_verify_tests
Add `verify` target to run metering verification tests
2 parents 8e9e1e2 + 1e6840b commit 100a452

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

ci-operator/config/operator-framework/operator-metering/operator-framework-operator-metering-master.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,22 @@ tests:
3737
commands: make unit
3838
container:
3939
from: src
40+
- as: verify
41+
commands: |
42+
set -x
43+
set -e
44+
# (chance): Hacks to allow us write access to our source files since
45+
# they're 664 in the image and owned by root:root, and we get a random UID
46+
# in Openshift pods which means we don't have write permissions.
47+
48+
# create a copy of the source so we can modify the files.
49+
export GOPATH=/tmp/go
50+
mkdir -p $GOPATH/src/github.com/operator-framework/
51+
cp -r /go/src/github.com/operator-framework/operator-metering/ $GOPATH/src/github.com/operator-framework/operator-metering
52+
cd $GOPATH/src/github.com/operator-framework/operator-metering
53+
54+
# Run the actual tests that nothing in the changes after re-generating
55+
# files. This ensures generated files aren't modified directly.
56+
make verify
57+
container:
58+
from: src

ci-operator/jobs/operator-framework/operator-metering/operator-framework-operator-metering-master-presubmits.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,35 @@ presubmits:
6565
cpu: 10m
6666
serviceAccountName: ci-operator
6767
trigger: '(?m)^/test (?:.*? )?unit(?: .*?)?$'
68+
- agent: kubernetes
69+
always_run: true
70+
branches:
71+
- master
72+
context: ci/prow/verify
73+
decorate: true
74+
decoration_config:
75+
skip_cloning: true
76+
name: pull-ci-operator-framework-operator-metering-master-verify
77+
rerun_command: /test verify
78+
spec:
79+
containers:
80+
- args:
81+
- --artifact-dir=$(ARTIFACTS)
82+
- --give-pr-author-access-to-namespace=true
83+
- --target=verify
84+
command:
85+
- ci-operator
86+
env:
87+
- name: CONFIG_SPEC
88+
valueFrom:
89+
configMapKeyRef:
90+
key: operator-framework-operator-metering-master.yaml
91+
name: ci-operator-configs
92+
image: ci-operator:latest
93+
imagePullPolicy: Always
94+
name: ""
95+
resources:
96+
requests:
97+
cpu: 10m
98+
serviceAccountName: ci-operator
99+
trigger: '(?m)^/test (?:.*? )?verify(?: .*?)?$'

0 commit comments

Comments
 (0)