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

[Devtools Week] Multi-platform support for build binary and container images #68

Merged

Conversation

michael-valdron
Copy link
Member

@michael-valdron michael-valdron commented Dec 15, 2023

Please specify the area for this PR

What does does this PR do / why we need it:

Adds support for building the registry operator binaries and container images to target other platforms and fixes missing pieces to properly run make docker-buildx.

Additional changes

  • Updated environment variable table under README.md
  • Includes build arg in podman-build make rule for enabling http/2 for webhook server
  • Corrects make docker-build to make <engine>-build under instructions on enabling http/2 for webhook server

Which issue(s) this PR fixes:

Fixes #?

fixes devfile/api#1383

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?
  • Gosec scans

Documentation

  • Does the registry operator documentation need to be updated with your changes?

How to test changes / Special notes to the reviewer:

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
@michael-valdron
Copy link
Member Author

michael-valdron commented Dec 15, 2023

Previous build under OpenShift CI prow job failed due to TARGETARCH not set in build args: https://github.com/openshift/release/blob/daa4ffab129dccb196b936d9e5bc8a41ac4a491f/ci-operator/config/devfile/registry-operator/devfile-registry-operator-main__v4.12.yaml#L12

69ef206 should fix this.

@michael-valdron
Copy link
Member Author

It appears that OpenShift CI is overriding TARGETARCH with empty string, will need to open a PR under openshift/release to fix this.

@Jdubrick
Copy link
Contributor

/lgtm

Can confirm that TARGET_ARCH=arm64 make podman-build and export TARGET_OS=darwin export TARGET_ARCH=arm64 make manager both worked without issue on my arm64 system.

@thepetk
Copy link
Contributor

thepetk commented Dec 18, 2023

/retest

Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

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

/lgtm I've only ran retest as one of the checks is failing.

Copy link

openshift-ci bot commented Dec 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: michael-valdron, thepetk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [michael-valdron,thepetk]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@michael-valdron
Copy link
Member Author

michael-valdron commented Dec 18, 2023

It appears that OpenShift CI is overriding TARGETARCH with empty string, will need to open a PR under openshift/release to fix this.

Unblocked when openshift/release#46896 openshift/release#46895 is merged.

@michael-valdron
Copy link
Member Author

/retest

Copy link

codecov bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (deec778) 25.86% compared to head (69ef206) 26.43%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   25.86%   26.43%   +0.56%     
==========================================
  Files          25       25              
  Lines        1415     1415              
==========================================
+ Hits          366      374       +8     
+ Misses       1026     1020       -6     
+ Partials       23       21       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michael-valdron michael-valdron merged commit 9342542 into devfile:main Dec 18, 2023
9 checks passed
michael-valdron added a commit to michael-valdron/devfile-registry-operator that referenced this pull request Jan 24, 2024
… images (devfile#68)

* add target arch support to build container make rules

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* update manager rule to build for other platforms

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* update env variables table in README

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* add 'Using other platforms' section to contributing guide

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* fix OpenShift CI: set default target arch build arg to 'amd64'

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

---------

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
thepetk pushed a commit to thepetk/devfile-registry-operator that referenced this pull request Aug 20, 2024
… images (devfile#68)

* add target arch support to build container make rules

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* update manager rule to build for other platforms

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* update env variables table in README

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* add 'Using other platforms' section to contributing guide

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* fix OpenShift CI: set default target arch build arg to 'amd64'

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

---------

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update devfile registry operator to support arm64 architecture
3 participants