Skip to content

Commit

Permalink
podvm: update centos and rhel build steps
Browse files Browse the repository at this point in the history
Missed the updates for these two when moving from remote reference to local files

Signed-off-by: James Tumber <[email protected]>
  • Loading branch information
tumberino committed Nov 3, 2023
1 parent 3ca7171 commit 941fac1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
18 changes: 5 additions & 13 deletions podvm/Dockerfile.podvm.centos
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ ENV PODVM_DISTRO ${PODVM_DISTRO}
ENV ARCH ${ARCH}
ENV UEFI ${UEFI}

RUN if [ -n "${CAA_SRC}" ]; then \
rm -rf cloud-api-adaptor && \
git clone ${CAA_SRC} cloud-api-adaptor;\
fi && \
if [ -n "${CAA_SRC_REF}" ]; then \
cd cloud-api-adaptor && \
git fetch origin ${CAA_SRC_REF} && \
git checkout FETCH_HEAD -b ${CAA_SRC_REF} ;\
fi

# Defaults to CentOS 8-stream x86_64 image. These variables can be overriden as needed
ARG IMAGE_URL=
ARG IMAGE_CHECKSUM=
Expand All @@ -48,15 +38,17 @@ ENV IMAGE_CHECKSUM ${IMAGE_CHECKSUM}
ENV PATH="/usr/bin:${PATH}"

# Copy the binaries to podvm/files folder
COPY --from=podvm_binaries /podvm-binaries.tar.gz /src/cloud-api-adaptor/podvm/files
COPY --from=podvm_binaries /podvm-binaries.tar.gz /src/cloud-api-adaptor/podvm/files/podvm-binaries.tar.gz
RUN tar xvf /src/cloud-api-adaptor/podvm/files/podvm-binaries.tar.gz -C /src/cloud-api-adaptor/podvm/files

# Copy the pause_bundle to podvm/files folder
COPY --from=podvm_binaries /pause-bundle.tar.gz /src/cloud-api-adaptor/podvm/files
COPY --from=podvm_binaries /pause-bundle.tar.gz /src/cloud-api-adaptor/podvm/files/pause-bundle.tar.gz
RUN tar xvf /src/cloud-api-adaptor/podvm/files/pause-bundle.tar.gz -C /src/cloud-api-adaptor/podvm/files

COPY . /src/cloud-api-adaptor

RUN cd cloud-api-adaptor/podvm && \
make BINARIES= PAUSE_BUNDLE= image
make image

# The below instructions can be used if you prefer to rebuild all the binaries
#RUN cd cloud-api-adaptor/podvm && \
Expand Down
18 changes: 5 additions & 13 deletions podvm/Dockerfile.podvm.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ ENV PODVM_DISTRO ${PODVM_DISTRO}
ENV ARCH ${ARCH}
ENV UEFI ${UEFI}

RUN if [ -n "${CAA_SRC}" ]; then \
rm -rf cloud-api-adaptor && \
git clone ${CAA_SRC} cloud-api-adaptor;\
fi && \
if [ -n "${CAA_SRC_REF}" ]; then \
cd cloud-api-adaptor && \
git fetch origin ${CAA_SRC_REF} && \
git checkout FETCH_HEAD -b ${CAA_SRC_REF} ;\
fi

ARG IMAGE_URL="/tmp/rhel.qcow2"
ARG IMAGE_CHECKSUM

Expand All @@ -45,15 +35,17 @@ ENV IMAGE_CHECKSUM ${IMAGE_CHECKSUM}
ENV PATH="/usr/bin:${PATH}"

# Copy the binaries to podvm/files folder
COPY --from=podvm_binaries /podvm-binaries.tar.gz /src/cloud-api-adaptor/podvm/files
COPY --from=podvm_binaries /podvm-binaries.tar.gz /src/cloud-api-adaptor/podvm/files/podvm-binaries.tar.gz
RUN tar xvf /src/cloud-api-adaptor/podvm/files/podvm-binaries.tar.gz -C /src/cloud-api-adaptor/podvm/files

# Copy the pause_bundle to podvm/files folder
COPY --from=podvm_binaries /pause-bundle.tar.gz /src/cloud-api-adaptor/podvm/files
COPY --from=podvm_binaries /pause-bundle.tar.gz /src/cloud-api-adaptor/podvm/files/pause-bundle.tar.gz
RUN tar xvf /src/cloud-api-adaptor/podvm/files/pause-bundle.tar.gz -C /src/cloud-api-adaptor/podvm/files

COPY . /src/cloud-api-adaptor

RUN cd cloud-api-adaptor/podvm && \
make BINARIES= PAUSE_BUNDLE= image
make image

# The below instructions can be used if you prefer to rebuild all the binaries
#RUN cd cloud-api-adaptor/podvm && \
Expand Down

0 comments on commit 941fac1

Please sign in to comment.