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

Dockerfile: merges manifests builder stages to one #1381

Merged

Conversation

ykaliuta
Copy link
Contributor

We can combine two build stages into one, as there is no need to always build both images (not done by podman) to only then decide from which one we want to copy manifests to the target image. Instead manifests stage will either copy local manifests or fetches using the script based on USE_LOCAL argument.

Move USE_LOCAL and OVERWIRTE_MANIFESTS args under FROM since args have scope of the FROM they are declared in.

It requires opt/manifests directory to exist, but since it's a part of git repo, it's fine.

Original patch from: Bartosz Majsak bartosz.majsak@gmail.com [1]

[1] #773

Description

How Has This Been Tested?

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@ykaliuta
Copy link
Contributor Author

/cc @bartoszmajsak @zdtsw

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (incubation@cea41dc). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             incubation    #1381   +/-   ##
=============================================
  Coverage              ?   18.91%           
=============================================
  Files                 ?       30           
  Lines                 ?     3399           
  Branches              ?        0           
=============================================
  Hits                  ?      643           
  Misses                ?     2687           
  Partials              ?       69           

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


🚨 Try these New Features:

We can combine two build stages into one, as there is no need to
always build both images (not done by podman) to only then decide
from which one we want to copy manifests to the target
image. Instead manifests stage will either copy local manifests or
fetches using the script based on USE_LOCAL argument.

Move USE_LOCAL and OVERWIRTE_MANIFESTS args under FROM since args
have scope of the FROM they are declared in.

It requires opt/manifests directory to exist, but since it's a part
of git repo, it's fine.

Original patch from: Bartosz Majsak <bartosz.majsak@gmail.com> [1]

[1] opendatahub-io#773

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
@ykaliuta
Copy link
Contributor Author

rebased

@ykaliuta
Copy link
Contributor Author

/retest-required

@ykaliuta
Copy link
Contributor Author

@zdtsw sorry for disturbing, but could you recheck it after rebase?

@openshift-ci openshift-ci bot added the lgtm label Nov 20, 2024
Copy link

openshift-ci bot commented Nov 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zdtsw

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:

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

@openshift-merge-bot openshift-merge-bot bot merged commit c1671ab into opendatahub-io:incubation Nov 20, 2024
10 checks passed
zdtsw pushed a commit to zdtsw-forking/opendatahub-operator that referenced this pull request Nov 28, 2024
We can combine two build stages into one, as there is no need to
always build both images (not done by podman) to only then decide
from which one we want to copy manifests to the target
image. Instead manifests stage will either copy local manifests or
fetches using the script based on USE_LOCAL argument.

Move USE_LOCAL and OVERWIRTE_MANIFESTS args under FROM since args
have scope of the FROM they are declared in.

It requires opt/manifests directory to exist, but since it's a part
of git repo, it's fine.

Original patch from: Bartosz Majsak <bartosz.majsak@gmail.com> [1]

[1] opendatahub-io#773

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
(cherry picked from commit c1671ab)
@zdtsw zdtsw mentioned this pull request Nov 28, 2024
5 tasks
zdtsw pushed a commit to zdtsw-forking/opendatahub-operator that referenced this pull request Nov 29, 2024
We can combine two build stages into one, as there is no need to
always build both images (not done by podman) to only then decide
from which one we want to copy manifests to the target
image. Instead manifests stage will either copy local manifests or
fetches using the script based on USE_LOCAL argument.

Move USE_LOCAL and OVERWIRTE_MANIFESTS args under FROM since args
have scope of the FROM they are declared in.

It requires opt/manifests directory to exist, but since it's a part
of git repo, it's fine.

Original patch from: Bartosz Majsak <bartosz.majsak@gmail.com> [1]

[1] opendatahub-io#773

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
(cherry picked from commit c1671ab)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants