-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fleetshift: add CI config for image build and mirror #77996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b2e654d
bb00079
9c3bb3a
acf60fe
c91749a
9b6a035
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| approvers: | ||
| - Hyperkid123 | ||
| - mshort55 | ||
| reviewers: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| build_root: | ||
| from_repository: true | ||
| images: | ||
| items: | ||
| - dockerfile_path: Dockerfile | ||
| to: fleetshift-server | ||
| resources: | ||
| '*': | ||
| requests: | ||
| cpu: 100m | ||
| memory: 200Mi | ||
| tests: | ||
| - as: pr-image-mirror | ||
| steps: | ||
| dependencies: | ||
| SOURCE_IMAGE_REF: fleetshift-server | ||
| env: | ||
| IMAGE_REPO: fleetshift-server | ||
| REGISTRY_ORG: stolostron | ||
| workflow: ocm-ci-image-mirror | ||
| - as: pr-merge-image-mirror | ||
| postsubmit: true | ||
| steps: | ||
| dependencies: | ||
| SOURCE_IMAGE_REF: fleetshift-server | ||
| env: | ||
| IMAGE_REPO: fleetshift-server | ||
| IMAGE_TAG: latest | ||
| REGISTRY_ORG: stolostron | ||
| workflow: ocm-ci-image-mirror | ||
| zz_generated_metadata: | ||
| branch: main | ||
| org: fleetshift | ||
| repo: fleetshift-poc |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| approvers: | ||
| - Hyperkid123 | ||
| - mshort55 | ||
| reviewers: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| build_root: | ||
| from_repository: true | ||
| images: | ||
| items: | ||
| - dockerfile_path: Dockerfile.gui | ||
| to: fleetshift-gui | ||
| - dockerfile_path: Dockerfile.mock-servers | ||
| to: fleetshift-mock-servers | ||
| - dockerfile_path: Dockerfile.mock-ui-plugins | ||
| to: fleetshift-mock-ui-plugins | ||
| resources: | ||
| '*': | ||
| requests: | ||
| cpu: 100m | ||
| memory: 200Mi | ||
| tests: | ||
| - as: pr-image-mirror-gui | ||
| steps: | ||
| dependencies: | ||
| SOURCE_IMAGE_REF: fleetshift-gui | ||
| env: | ||
| IMAGE_REPO: fleetshift-gui | ||
| REGISTRY_ORG: stolostron | ||
| workflow: ocm-ci-image-mirror | ||
| - as: pr-merge-image-mirror-gui | ||
| postsubmit: true | ||
| steps: | ||
| dependencies: | ||
| SOURCE_IMAGE_REF: fleetshift-gui | ||
| env: | ||
| IMAGE_REPO: fleetshift-gui | ||
| IMAGE_TAG: latest | ||
| REGISTRY_ORG: stolostron | ||
| workflow: ocm-ci-image-mirror | ||
| - as: pr-image-mirror-mock-servers | ||
| steps: | ||
| dependencies: | ||
| SOURCE_IMAGE_REF: fleetshift-mock-servers | ||
| env: | ||
| IMAGE_REPO: fleetshift-mock-servers | ||
| REGISTRY_ORG: stolostron | ||
| workflow: ocm-ci-image-mirror | ||
| - as: pr-merge-image-mirror-mock-servers | ||
| postsubmit: true | ||
| steps: | ||
| dependencies: | ||
| SOURCE_IMAGE_REF: fleetshift-mock-servers | ||
| env: | ||
| IMAGE_REPO: fleetshift-mock-servers | ||
| IMAGE_TAG: latest | ||
| REGISTRY_ORG: stolostron | ||
| workflow: ocm-ci-image-mirror | ||
| - as: pr-image-mirror-mock-ui-plugins | ||
| steps: | ||
| dependencies: | ||
| SOURCE_IMAGE_REF: fleetshift-mock-ui-plugins | ||
| env: | ||
| IMAGE_REPO: fleetshift-mock-ui-plugins | ||
| REGISTRY_ORG: stolostron | ||
| workflow: ocm-ci-image-mirror | ||
| - as: pr-merge-image-mirror-mock-ui-plugins | ||
| postsubmit: true | ||
| steps: | ||
| dependencies: | ||
| SOURCE_IMAGE_REF: fleetshift-mock-ui-plugins | ||
| env: | ||
| IMAGE_REPO: fleetshift-mock-ui-plugins | ||
| IMAGE_TAG: latest | ||
| REGISTRY_ORG: stolostron | ||
| workflow: ocm-ci-image-mirror | ||
| zz_generated_metadata: | ||
| branch: main | ||
| org: fleetshift | ||
| repo: fleetshift-user-interface |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| approvers: | ||
| - Hyperkid123 | ||
| - mshort55 | ||
| reviewers: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| postsubmits: | ||
| fleetshift/fleetshift-poc: | ||
| - agent: kubernetes | ||
| always_run: true | ||
| branches: | ||
| - ^main$ | ||
| cluster: build01 | ||
| decorate: true | ||
| labels: | ||
| ci.openshift.io/generator: prowgen | ||
| max_concurrency: 1 | ||
| name: branch-ci-fleetshift-fleetshift-poc-main-pr-merge-image-mirror | ||
| spec: | ||
| containers: | ||
| - args: | ||
| - --gcs-upload-secret=/secrets/gcs/service-account.json | ||
| - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson | ||
| - --lease-server-credentials-file=/etc/boskos/credentials | ||
| - --report-credentials-file=/etc/report/credentials | ||
| - --target=pr-merge-image-mirror | ||
| command: | ||
| - ci-operator | ||
| env: | ||
| - name: HTTP_SERVER_IP | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: status.podIP | ||
| image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest | ||
| imagePullPolicy: Always | ||
| name: "" | ||
| ports: | ||
| - containerPort: 8080 | ||
| name: http | ||
| resources: | ||
| requests: | ||
| cpu: 10m | ||
| volumeMounts: | ||
| - mountPath: /etc/boskos | ||
| name: boskos | ||
| readOnly: true | ||
| - mountPath: /secrets/gcs | ||
| name: gcs-credentials | ||
| readOnly: true | ||
| - mountPath: /secrets/manifest-tool | ||
| name: manifest-tool-local-pusher | ||
| readOnly: true | ||
| - mountPath: /etc/pull-secret | ||
| name: pull-secret | ||
| readOnly: true | ||
| - mountPath: /etc/report | ||
| name: result-aggregator | ||
| readOnly: true | ||
| serviceAccountName: ci-operator | ||
| volumes: | ||
| - name: boskos | ||
| secret: | ||
| items: | ||
| - key: credentials | ||
| path: credentials | ||
| secretName: boskos-credentials | ||
| - name: manifest-tool-local-pusher | ||
| secret: | ||
| secretName: manifest-tool-local-pusher | ||
| - name: pull-secret | ||
| secret: | ||
| secretName: registry-pull-credentials | ||
| - name: result-aggregator | ||
| secret: | ||
| secretName: result-aggregator | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| presubmits: | ||
| fleetshift/fleetshift-poc: | ||
| - agent: kubernetes | ||
| always_run: true | ||
| branches: | ||
| - ^main$ | ||
| - ^main- | ||
| cluster: build01 | ||
| context: ci/prow/images | ||
| decorate: true | ||
| labels: | ||
| ci.openshift.io/generator: prowgen | ||
| pj-rehearse.openshift.io/can-be-rehearsed: "true" | ||
| name: pull-ci-fleetshift-fleetshift-poc-main-images | ||
| rerun_command: /test images | ||
| spec: | ||
| containers: | ||
| - args: | ||
| - --gcs-upload-secret=/secrets/gcs/service-account.json | ||
| - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson | ||
| - --report-credentials-file=/etc/report/credentials | ||
| - --target=[images] | ||
| command: | ||
| - ci-operator | ||
| image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest | ||
| imagePullPolicy: Always | ||
| name: "" | ||
| resources: | ||
| requests: | ||
| cpu: 10m | ||
| volumeMounts: | ||
| - mountPath: /secrets/gcs | ||
| name: gcs-credentials | ||
| readOnly: true | ||
| - mountPath: /secrets/manifest-tool | ||
| name: manifest-tool-local-pusher | ||
| readOnly: true | ||
| - mountPath: /etc/pull-secret | ||
| name: pull-secret | ||
| readOnly: true | ||
| - mountPath: /etc/report | ||
| name: result-aggregator | ||
| readOnly: true | ||
| serviceAccountName: ci-operator | ||
| volumes: | ||
| - name: manifest-tool-local-pusher | ||
| secret: | ||
| secretName: manifest-tool-local-pusher | ||
| - name: pull-secret | ||
| secret: | ||
| secretName: registry-pull-credentials | ||
| - name: result-aggregator | ||
| secret: | ||
| secretName: result-aggregator | ||
| trigger: (?m)^/test( | .* )images,?($|\s.*) | ||
|
Comment on lines
+31
to
+55
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
python -m pip install --quiet pyyaml
python - <<'PY'
import subprocess
import sys
import yaml
paths = subprocess.check_output(
["fd", "-t", "f", r"fleetshift-fleetshift-poc-main-(pre|post)submits\.yaml"],
text=True,
).splitlines()
failed = False
for path in paths:
with open(path, "r", encoding="utf-8") as f:
data = yaml.safe_load(f)
for job_kind in ("presubmits", "postsubmits"):
for repo_jobs in (data.get(job_kind) or {}).values():
for job in repo_jobs:
spec = job.get("spec") or {}
volumes = {v.get("name") for v in spec.get("volumes", [])}
for container in spec.get("containers", []):
for mount in container.get("volumeMounts", []):
name = mount.get("name")
if name not in volumes:
failed = True
print(f"{path}: {job.get('name')}: missing volume for mount {name!r}")
if failed:
sys.exit(1)
PYRepository: openshift/release Length of output: 630 🏁 Script executed: # Search for GCS secret usage patterns and naming conventions
rg "gce-sa-credentials|gcs.*secret" --type yaml -i | head -20Repository: openshift/release Length of output: 2324 🏁 Script executed: # Check for existing gcs-credentials volume declarations in similar jobs
rg "gcs-credentials" --type yaml -B 2 -A 2Repository: openshift/release Length of output: 50523 🏁 Script executed: # Verify the postsubmits file to understand its scope
fd -t f "fleetshift-fleetshift-poc-main-postsubmits.yaml" -x wc -lRepository: openshift/release Length of output: 156 🏁 Script executed: # View the postsubmits file to see if it has similar job structure
cat ci-operator/jobs/fleetshift/fleetshift-poc/fleetshift-fleetshift-poc-main-postsubmits.yamlRepository: openshift/release Length of output: 2103 Declare the Both container specs mount 🐛 Proposed fix serviceAccountName: ci-operator
volumes:
+ - name: gcs-credentials
+ secret:
+ secretName: gce-sa-credentials-gcs-publisher
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
@@
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
+ - name: gcs-credentials
+ secret:
+ secretName: gce-sa-credentials-gcs-publisher
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator🤖 Prompt for AI Agents |
||
| - agent: kubernetes | ||
| always_run: true | ||
| branches: | ||
| - ^main$ | ||
| - ^main- | ||
| cluster: build01 | ||
| context: ci/prow/pr-image-mirror | ||
| decorate: true | ||
| labels: | ||
| ci.openshift.io/generator: prowgen | ||
| pj-rehearse.openshift.io/can-be-rehearsed: "true" | ||
| name: pull-ci-fleetshift-fleetshift-poc-main-pr-image-mirror | ||
| rerun_command: /test pr-image-mirror | ||
| spec: | ||
| containers: | ||
| - args: | ||
| - --gcs-upload-secret=/secrets/gcs/service-account.json | ||
| - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson | ||
| - --lease-server-credentials-file=/etc/boskos/credentials | ||
| - --report-credentials-file=/etc/report/credentials | ||
| - --target=pr-image-mirror | ||
| command: | ||
| - ci-operator | ||
| env: | ||
| - name: HTTP_SERVER_IP | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: status.podIP | ||
| image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest | ||
| imagePullPolicy: Always | ||
| name: "" | ||
| ports: | ||
| - containerPort: 8080 | ||
| name: http | ||
| resources: | ||
| requests: | ||
| cpu: 10m | ||
| volumeMounts: | ||
| - mountPath: /etc/boskos | ||
| name: boskos | ||
| readOnly: true | ||
| - mountPath: /secrets/gcs | ||
| name: gcs-credentials | ||
| readOnly: true | ||
| - mountPath: /secrets/manifest-tool | ||
| name: manifest-tool-local-pusher | ||
| readOnly: true | ||
| - mountPath: /etc/pull-secret | ||
| name: pull-secret | ||
| readOnly: true | ||
| - mountPath: /etc/report | ||
| name: result-aggregator | ||
| readOnly: true | ||
| serviceAccountName: ci-operator | ||
| volumes: | ||
| - name: boskos | ||
| secret: | ||
| items: | ||
| - key: credentials | ||
| path: credentials | ||
| secretName: boskos-credentials | ||
| - name: manifest-tool-local-pusher | ||
| secret: | ||
| secretName: manifest-tool-local-pusher | ||
| - name: pull-secret | ||
| secret: | ||
| secretName: registry-pull-credentials | ||
| - name: result-aggregator | ||
| secret: | ||
| secretName: result-aggregator | ||
| trigger: (?m)^/test( | .* )pr-image-mirror,?($|\s.*) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| approvers: | ||
| - Hyperkid123 | ||
| - mshort55 | ||
| reviewers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cat -n ci-operator/jobs/fleetshift/fleetshift-poc/fleetshift-fleetshift-poc-main-postsubmits.yaml | head -75Repository: openshift/release
Length of output: 2586
🏁 Script executed:
Repository: openshift/release
Length of output: 95
🏁 Script executed:
Repository: openshift/release
Length of output: 297
🏁 Script executed:
Repository: openshift/release
Length of output: 43
🏁 Script executed:
Repository: openshift/release
Length of output: 792
🏁 Script executed:
Repository: openshift/release
Length of output: 2550
🏁 Script executed:
Repository: openshift/release
Length of output: 43
🏁 Script executed:
Repository: openshift/release
Length of output: 43
🏁 Script executed:
Repository: openshift/release
Length of output: 1130
🏁 Script executed:
Repository: openshift/release
Length of output: 43
🏁 Script executed:
Repository: openshift/release
Length of output: 819
🏁 Script executed:
Repository: openshift/release
Length of output: 275
🏁 Script executed:
Repository: openshift/release
Length of output: 274
🏁 Script executed:
Repository: openshift/release
Length of output: 190
🏁 Script executed:
Repository: openshift/release
Length of output: 513
🏁 Script executed:
Repository: openshift/release
Length of output: 549
🏁 Script executed:
Repository: openshift/release
Length of output: 136
Add the missing
gcs-credentialsvolume.Line 41 mounts
gcs-credentials, but thevolumeslist never defines it. The postsubmit pod will be rejected by Kubernetes.🐛 Proposed fix
serviceAccountName: ci-operator volumes: - name: boskos secret: items: - key: credentials path: credentials secretName: boskos-credentials + - name: gcs-credentials + secret: + secretName: gce-sa-credentials-gcs-publisher - name: manifest-tool-local-pusher secret: secretName: manifest-tool-local-pusher - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator🤖 Prompt for AI Agents