Skip to content

Commit 0057a2d

Browse files
aguidirhyakovbeder
authored andcommitted
CLID-577: Onboard openshift/mirror-gui to Prow CI (openshift#77766)
* CLID-577: Onboard openshift/mirror-gui to Prow CI Add CI configuration for the mirror-gui repository with container image builds and test jobs for linting and unit tests. Signed-off-by: Alex Guidi <aguidi@redhat.com> * Fix ci-operator config: add OWNERS, catalog tests, fix test_binary - Add OWNERS files to config and jobs directories (fixes ci/prow/owners) - Replace test_binary_build_commands (container-run.sh fails in CI pods) with npm ci && npm run build to create pipeline:test-bin image - Switch all tests to from: test-bin (npm ci runs once, not per-test) - Add audit-catalog and catalog-integrity test jobs - Regenerate presubmit job definitions Made-with: Cursor * fix: add lgtm to mirror-gui Prow plugin list The lgtm plugin is configured at the top level but was missing from the repo plugins list, which would prevent the /lgtm command from working on openshift/mirror-gui PRs. Tide requires the lgtm label for merge. Made-with: Cursor * revert: remove duplicate lgtm plugin from repo config The lgtm plugin is already enabled at the openshift org level. Adding it to the repo-specific plugins list causes a "duplicated plugin" error in Prow config validation. Made-with: Cursor * fix(ci-operator): use project_image build root for mirror-gui The previous from_repository configuration expected a repo-local .ci-operator.yaml with an imagestream reference, which does not match our Dockerfile-based build root setup. Switch to the documented project_image mode so ci-operator builds the root image from .ci-operator/build-root/Dockerfile. Made-with: Cursor * fix: regenerate Prow jobs after project_image switch Adds decoration_config.skip_cloning: true to all mirror-gui jobs, required when build_root uses project_image mode. Made-with: Cursor --------- Signed-off-by: Alex Guidi <aguidi@redhat.com> Co-authored-by: ybeder <ybeder@redhat.com>
1 parent 76ab135 commit 0057a2d

7 files changed

Lines changed: 469 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
approvers:
2+
- yakovbeder
3+
- aguidirh
4+
reviewers:
5+
- yakovbeder
6+
- aguidirh
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
build_root:
2+
project_image:
3+
dockerfile_path: .ci-operator/build-root/Dockerfile
4+
images:
5+
items:
6+
- dockerfile_path: Dockerfile
7+
to: mirror-gui
8+
promotion:
9+
to:
10+
- name: "5.0"
11+
namespace: ocp
12+
releases:
13+
initial:
14+
integration:
15+
name: "5.0"
16+
namespace: ocp
17+
latest:
18+
integration:
19+
include_built_images: true
20+
name: "5.0"
21+
namespace: ocp
22+
resources:
23+
'*':
24+
limits:
25+
memory: 4Gi
26+
requests:
27+
cpu: 100m
28+
memory: 200Mi
29+
test_binary_build_commands: npm ci && npm run build
30+
tests:
31+
- as: lint
32+
commands: npm run lint
33+
container:
34+
from: test-bin
35+
skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|LICENSE)$
36+
- as: unit
37+
commands: npm run test
38+
container:
39+
from: test-bin
40+
skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|LICENSE)$
41+
- as: audit-catalog
42+
commands: npx vitest run tests/scripts/auditFetchCatalogs.test.ts
43+
container:
44+
from: test-bin
45+
skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|LICENSE)$
46+
- as: catalog-integrity
47+
commands: npx vitest run tests/scripts/catalogDataIntegrity.test.ts
48+
container:
49+
from: test-bin
50+
skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|LICENSE)$
51+
zz_generated_metadata:
52+
branch: main
53+
org: openshift
54+
repo: mirror-gui
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
approvers:
2+
- yakovbeder
3+
- aguidirh
4+
reviewers:
5+
- yakovbeder
6+
- aguidirh
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
postsubmits:
2+
openshift/mirror-gui:
3+
- agent: kubernetes
4+
always_run: true
5+
branches:
6+
- ^main$
7+
cluster: build01
8+
decorate: true
9+
decoration_config:
10+
skip_cloning: true
11+
labels:
12+
ci-operator.openshift.io/is-promotion: "true"
13+
ci.openshift.io/generator: prowgen
14+
max_concurrency: 1
15+
name: branch-ci-openshift-mirror-gui-main-images
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+
- --image-mirror-push-secret=/etc/push-secret/.dockerconfigjson
22+
- --promote
23+
- --report-credentials-file=/etc/report/credentials
24+
- --target=[images]
25+
command:
26+
- ci-operator
27+
image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest
28+
imagePullPolicy: Always
29+
name: ""
30+
resources:
31+
requests:
32+
cpu: 10m
33+
volumeMounts:
34+
- mountPath: /secrets/gcs
35+
name: gcs-credentials
36+
readOnly: true
37+
- mountPath: /secrets/manifest-tool
38+
name: manifest-tool-local-pusher
39+
readOnly: true
40+
- mountPath: /etc/pull-secret
41+
name: pull-secret
42+
readOnly: true
43+
- mountPath: /etc/push-secret
44+
name: push-secret
45+
readOnly: true
46+
- mountPath: /etc/report
47+
name: result-aggregator
48+
readOnly: true
49+
serviceAccountName: ci-operator
50+
volumes:
51+
- name: manifest-tool-local-pusher
52+
secret:
53+
secretName: manifest-tool-local-pusher
54+
- name: pull-secret
55+
secret:
56+
secretName: registry-pull-credentials
57+
- name: push-secret
58+
secret:
59+
secretName: registry-push-credentials-ci-central
60+
- name: result-aggregator
61+
secret:
62+
secretName: result-aggregator

0 commit comments

Comments
 (0)