Skip to content
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

[OSPCIX-638] Add call to 'make bindata' in operator-build for meta operator #2671

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions roles/operator_build/tasks/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@
output_dir: "{{ cifmw_operator_build_basedir }}/artifacts"
script: make manifests

- name: "{{ operator.name }} - Call bindata" # noqa: name[template]
when:
- cifmw_operator_build_meta_build
- operator.name == cifmw_operator_build_meta_name
ci_script:
dry_run: "{{ cifmw_operator_build_dryrun|bool }}"
chdir: "{{ operator.src }}"
output_dir: "{{ cifmw_operator_build_basedir }}/artifacts"
script: make bindata

Comment on lines +127 to +136
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we use pin-bundle-images.sh in make bindata. So in order to update the proper operator env variable, we need to pass other params, we pass in the make bundle.
We can modify this code like this:

Suggested change
- name: "{{ operator.name }} - Call bindata" # noqa: name[template]
when:
- cifmw_operator_build_meta_build
- operator.name == cifmw_operator_build_meta_name
ci_script:
dry_run: "{{ cifmw_operator_build_dryrun|bool }}"
chdir: "{{ operator.src }}"
output_dir: "{{ cifmw_operator_build_basedir }}/artifacts"
script: make bindata
- name: "{{ operator.name }} - Call bindata" # noqa: name[template]
when:
- cifmw_operator_build_meta_build
- operator.name == cifmw_operator_build_meta_name
ci_script:
dry_run: "{{ cifmw_operator_build_dryrun|bool }}"
chdir: "{{ operator.src }}"
output_dir: "{{ cifmw_operator_build_basedir }}/artifacts"
script: make bindata
extra_args:
IMG: "{{ operator_img }}"
IMAGENAMESPACE: "{{ cifmw_operator_build_push_org }}"
IMAGEREGISTRY: "{{ cifmw_operator_build_push_registry }}"
IMAGEBASE: "{{ operator.image_base | default('') }}"
LOCAL_REGISTRY: "{{ cifmw_operator_build_local_registry | default (0) }}"

I have already tested the same code here: #2672 with depends on on this pr openstack-k8s-operators/ironic-operator#510 and results

Controlled By:  ReplicaSet/ironic-operator-controller-manager-5c7847b8f4
Containers:
  manager:
    Container ID:  cri-o://397e36d59c9d180cd92358d0574a4911ce33cdf514d841b80934fe44e501d2ba
    Image:         38.102.83.177:5001/openstack-k8s-operators/ironic-operator:484955dc3ef2fdc2dcff640b3ff6182b38d8d772
    Image ID:      38.102.83.177:5001/openstack-k8s-operators/ironic-operator@sha256:c1bad99902b624fb749b5fe91fec1d7734a7c364fc835e430cbf317cb57c1374
    Port:          <none>

- name: "{{ operator.name }} - Call docker-build" # noqa: name[template]
ci_script:
dry_run: "{{ cifmw_operator_build_dryrun|bool }}"
Expand Down