Skip to content

Commit 0809b2c

Browse files
Add lint/integration presumnit job for hyperfleet-broker (#71938)
1 parent 7c125b2 commit 0809b2c

File tree

4 files changed

+316
-0
lines changed

4 files changed

+316
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
base_images:
2+
base:
3+
name: ubi
4+
namespace: ocp
5+
tag: "9"
6+
jasee_openshift-build_rhel-9-golang-1.25:
7+
name: openshift-build
8+
namespace: jasee
9+
tag: rhel-9-golang-1.25
10+
build_root:
11+
image_stream_tag:
12+
name: openshift-build
13+
namespace: jasee
14+
tag: rhel-9-golang-1.25
15+
resources:
16+
'*':
17+
requests:
18+
cpu: 100m
19+
memory: 200Mi
20+
tests:
21+
- as: lint
22+
commands: |
23+
export HOME=/tmp
24+
export GOCACHE=/tmp/go-build
25+
export GOMODCACHE=/tmp/go-mod
26+
export GOLANGCI_LINT_CACHE=/tmp/.cache
27+
export PATH="$(go env GOPATH)/bin:$PATH"
28+
unset GOFLAGS
29+
go install -mod=mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
30+
make lint
31+
container:
32+
from: src
33+
zz_generated_metadata:
34+
branch: main
35+
org: openshift-hyperfleet
36+
repo: hyperfleet-broker
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
base_images:
2+
jasee_openshift-build_rhel-9-golang-1.25:
3+
name: openshift-build
4+
namespace: jasee
5+
tag: rhel-9-golang-1.25
6+
nested-podman:
7+
name: nested-podman
8+
namespace: ci
9+
tag: latest
10+
build_root:
11+
image_stream_tag:
12+
name: openshift-build
13+
namespace: jasee
14+
tag: rhel-9-golang-1.25
15+
images:
16+
- dockerfile_literal: |
17+
FROM nested-podman
18+
COPY src/ /opt/app-root/src
19+
WORKDIR /opt/app-root/src/hyperfleet-broker
20+
USER root
21+
RUN dnf install -y go make
22+
RUN dnf clean all
23+
from: nested-podman
24+
inputs:
25+
src:
26+
paths:
27+
- destination_dir: src
28+
source_path: /go/src/github.com/openshift-hyperfleet/hyperfleet-broker
29+
to: golang-test
30+
resources:
31+
'*':
32+
requests:
33+
cpu: "1"
34+
memory: 2Gi
35+
tests:
36+
- as: integration
37+
capabilities:
38+
- nested-podman
39+
commands: |
40+
go get github.com/testcontainers/testcontainers-go
41+
export DOCKER_HOST=$(podman info --format 'unix://{{.Host.RemoteSocket.Path}}')
42+
podman system service --time=120 $(DOCKER_HOST) &
43+
systemctl --user start podman.socket || true
44+
export TESTCONTAINERS_RYUK_DISABLED=true
45+
go mod tidy
46+
make test-integration
47+
container:
48+
from: golang-test
49+
nested_podman: true
50+
zz_generated_metadata:
51+
branch: main
52+
org: openshift-hyperfleet
53+
repo: hyperfleet-broker
54+
variant: presubmits
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# DO NOT EDIT; this file is auto-generated using https://github.com/openshift/ci-tools.
2+
# Fetched from https://github.com/openshift-hyperfleet/hyperfleet-broker root OWNERS
3+
# If the repo had OWNERS_ALIASES then the aliases were expanded
4+
# Logins who are not members of 'openshift' organization were filtered out
5+
# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md
6+
7+
approvers:
8+
- "86254860"
9+
- alexvulaj
10+
- aredenba-rh
11+
- ciaranroche
12+
- mischulee
13+
- rafabene
14+
- rh-amarin
15+
- tirthct
16+
- vkareh
17+
- xueli181114
18+
- yasun1
19+
- yingzhanredhat
20+
options: {}
21+
reviewers:
22+
- "86254860"
23+
- alexvulaj
24+
- aredenba-rh
25+
- ciaranroche
26+
- mischulee
27+
- rafabene
28+
- rh-amarin
29+
- tirthct
30+
- vkareh
31+
- xueli181114
32+
- yasun1
33+
- yingzhanredhat
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
presubmits:
2+
openshift-hyperfleet/hyperfleet-broker:
3+
- agent: kubernetes
4+
always_run: true
5+
branches:
6+
- ^main$
7+
- ^main-
8+
cluster: build01
9+
context: ci/prow/lint
10+
decorate: true
11+
decoration_config:
12+
skip_cloning: true
13+
labels:
14+
ci.openshift.io/generator: prowgen
15+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
16+
name: pull-ci-openshift-hyperfleet-hyperfleet-broker-main-lint
17+
rerun_command: /test lint
18+
spec:
19+
containers:
20+
- args:
21+
- --gcs-upload-secret=/secrets/gcs/service-account.json
22+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
23+
- --oauth-token-path=/usr/local/github-credentials/oauth
24+
- --report-credentials-file=/etc/report/credentials
25+
- --target=lint
26+
command:
27+
- ci-operator
28+
image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest
29+
imagePullPolicy: Always
30+
name: ""
31+
resources:
32+
requests:
33+
cpu: 10m
34+
volumeMounts:
35+
- mountPath: /secrets/gcs
36+
name: gcs-credentials
37+
readOnly: true
38+
- mountPath: /usr/local/github-credentials
39+
name: github-credentials-openshift-ci-robot-private-git-cloner
40+
readOnly: true
41+
- mountPath: /secrets/manifest-tool
42+
name: manifest-tool-local-pusher
43+
readOnly: true
44+
- mountPath: /etc/pull-secret
45+
name: pull-secret
46+
readOnly: true
47+
- mountPath: /etc/report
48+
name: result-aggregator
49+
readOnly: true
50+
serviceAccountName: ci-operator
51+
volumes:
52+
- name: github-credentials-openshift-ci-robot-private-git-cloner
53+
secret:
54+
secretName: github-credentials-openshift-ci-robot-private-git-cloner
55+
- name: manifest-tool-local-pusher
56+
secret:
57+
secretName: manifest-tool-local-pusher
58+
- name: pull-secret
59+
secret:
60+
secretName: registry-pull-credentials
61+
- name: result-aggregator
62+
secret:
63+
secretName: result-aggregator
64+
trigger: (?m)^/test( | .* )lint,?($|\s.*)
65+
- agent: kubernetes
66+
always_run: true
67+
branches:
68+
- ^main$
69+
- ^main-
70+
cluster: build01
71+
context: ci/prow/presubmits-images
72+
decorate: true
73+
decoration_config:
74+
skip_cloning: true
75+
labels:
76+
ci-operator.openshift.io/variant: presubmits
77+
ci.openshift.io/generator: prowgen
78+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
79+
name: pull-ci-openshift-hyperfleet-hyperfleet-broker-main-presubmits-images
80+
rerun_command: /test presubmits-images
81+
spec:
82+
containers:
83+
- args:
84+
- --gcs-upload-secret=/secrets/gcs/service-account.json
85+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
86+
- --oauth-token-path=/usr/local/github-credentials/oauth
87+
- --report-credentials-file=/etc/report/credentials
88+
- --target=[images]
89+
- --variant=presubmits
90+
command:
91+
- ci-operator
92+
image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest
93+
imagePullPolicy: Always
94+
name: ""
95+
resources:
96+
requests:
97+
cpu: 10m
98+
volumeMounts:
99+
- mountPath: /secrets/gcs
100+
name: gcs-credentials
101+
readOnly: true
102+
- mountPath: /usr/local/github-credentials
103+
name: github-credentials-openshift-ci-robot-private-git-cloner
104+
readOnly: true
105+
- mountPath: /secrets/manifest-tool
106+
name: manifest-tool-local-pusher
107+
readOnly: true
108+
- mountPath: /etc/pull-secret
109+
name: pull-secret
110+
readOnly: true
111+
- mountPath: /etc/report
112+
name: result-aggregator
113+
readOnly: true
114+
serviceAccountName: ci-operator
115+
volumes:
116+
- name: github-credentials-openshift-ci-robot-private-git-cloner
117+
secret:
118+
secretName: github-credentials-openshift-ci-robot-private-git-cloner
119+
- name: manifest-tool-local-pusher
120+
secret:
121+
secretName: manifest-tool-local-pusher
122+
- name: pull-secret
123+
secret:
124+
secretName: registry-pull-credentials
125+
- name: result-aggregator
126+
secret:
127+
secretName: result-aggregator
128+
trigger: (?m)^/test( | .* )presubmits-images,?($|\s.*)
129+
- agent: kubernetes
130+
always_run: true
131+
branches:
132+
- ^main$
133+
- ^main-
134+
cluster: build10
135+
context: ci/prow/presubmits-integration
136+
decorate: true
137+
decoration_config:
138+
skip_cloning: true
139+
labels:
140+
capability/nested-podman: nested-podman
141+
ci-operator.openshift.io/variant: presubmits
142+
ci.openshift.io/generator: prowgen
143+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
144+
name: pull-ci-openshift-hyperfleet-hyperfleet-broker-main-presubmits-integration
145+
rerun_command: /test presubmits-integration
146+
spec:
147+
containers:
148+
- args:
149+
- --gcs-upload-secret=/secrets/gcs/service-account.json
150+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
151+
- --oauth-token-path=/usr/local/github-credentials/oauth
152+
- --report-credentials-file=/etc/report/credentials
153+
- --target=integration
154+
- --variant=presubmits
155+
command:
156+
- ci-operator
157+
image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest
158+
imagePullPolicy: Always
159+
name: ""
160+
resources:
161+
requests:
162+
cpu: 10m
163+
volumeMounts:
164+
- mountPath: /secrets/gcs
165+
name: gcs-credentials
166+
readOnly: true
167+
- mountPath: /usr/local/github-credentials
168+
name: github-credentials-openshift-ci-robot-private-git-cloner
169+
readOnly: true
170+
- mountPath: /secrets/manifest-tool
171+
name: manifest-tool-local-pusher
172+
readOnly: true
173+
- mountPath: /etc/pull-secret
174+
name: pull-secret
175+
readOnly: true
176+
- mountPath: /etc/report
177+
name: result-aggregator
178+
readOnly: true
179+
serviceAccountName: ci-operator
180+
volumes:
181+
- name: github-credentials-openshift-ci-robot-private-git-cloner
182+
secret:
183+
secretName: github-credentials-openshift-ci-robot-private-git-cloner
184+
- name: manifest-tool-local-pusher
185+
secret:
186+
secretName: manifest-tool-local-pusher
187+
- name: pull-secret
188+
secret:
189+
secretName: registry-pull-credentials
190+
- name: result-aggregator
191+
secret:
192+
secretName: result-aggregator
193+
trigger: (?m)^/test( | .* )presubmits-integration,?($|\s.*)

0 commit comments

Comments
 (0)