Skip to content

Commit

Permalink
internal-hermetic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwindasr committed Jan 16, 2025
1 parent 387bb1f commit 8d5b6ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doozer/doozerlib/backend/rebaser.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,9 @@ def _update_dockerfile(self, metadata: ImageMetadata, source: Optional[SourceRes
def _add_build_repos(self, dfp: DockerfileParser, metadata: ImageMetadata):
# Populating the repo file needs to happen after every FROM before the original Dockerfile can invoke yum/dnf.
konflux_lines = ["\n# Start Konflux-specific steps",
"RUN mkdir -p /tmp/yum_temp; mv /etc/yum.repos.d/*.repo /tmp/yum_temp/ || true",
f"COPY .oit/{self.repo_type}.repo /etc/yum.repos.d/",
f"ADD {constants.KONFLUX_REPO_CA_BUNDLE_HOST}/{constants.KONFLUX_REPO_CA_BUNDLE_FILENAME} {constants.KONFLUX_REPO_CA_BUNDLE_TMP_PATH}",
"RUN mkdir -p /tmp/yum_temp; mv /etc/yum.repos.d/*.repo /tmp/yum_temp/ || true",
f"COPY .oit/{self.repo_type}.repo /etc/yum.repos.d/",
f"ADD {constants.KONFLUX_REPO_CA_BUNDLE_HOST}/{constants.KONFLUX_REPO_CA_BUNDLE_FILENAME} {constants.KONFLUX_REPO_CA_BUNDLE_TMP_PATH}",
]

network_mode = metadata.config.get("konflux", {}).get("network_mode")
Expand All @@ -783,7 +783,7 @@ def _add_build_repos(self, dfp: DockerfileParser, metadata: ImageMetadata):
konflux_lines += ["# End Konflux-specific steps\n\n"]

dfp.add_lines(
konflux_lines,
*konflux_lines,
at_start=True,
all_stages=True,
)
Expand Down

0 comments on commit 8d5b6ef

Please sign in to comment.