Skip to content

Commit

Permalink
ci: ovn-kubernetes: Move the fedora image version to 41.
Browse files Browse the repository at this point in the history
fedora 37 is already end of life cycle.

The fedora version number can be passed to the Dockerfile of
ovn-kubernetes.

Signed-off-by: Numan Siddique <[email protected]>
Acked-by: Mark Michelson <[email protected]>
  • Loading branch information
numansiddique committed Feb 6, 2025
1 parent 15ab046 commit 8a12e0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .ci/ovn-kubernetes/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ARG OVNKUBE_COMMIT
ARG GO_VERSION
ARG FEDORA_VERSION

FROM fedora:37 AS ovnbuilder
FROM fedora:$FEDORA_VERSION AS ovnbuilder

USER root

Expand Down Expand Up @@ -37,6 +38,7 @@ RUN rm rpm/rpmbuild/RPMS/x86_64/*docker*
ARG GO_VERSION
FROM golang:$GO_VERSION as ovnkubebuilder
ARG OVNKUBE_COMMIT
ARG FEDORA_VERSION

# Clone OVN Kubernetes and build the binary based on the commit passed as argument
WORKDIR /root
Expand All @@ -63,7 +65,7 @@ COPY --from=ovnbuilder /tmp/ovn/ovn-sb.ovsschema pkg/sbdb/ovn-sb.ovsschema
RUN go generate ./pkg/nbdb && go generate ./pkg/sbdb && make

# Build the final image
FROM fedora:37
FROM fedora:$FEDORA_VERSION

# install needed dependencies
RUN INSTALL_PKGS=" \
Expand All @@ -76,6 +78,10 @@ RUN mkdir -p /var/run/openvswitch
COPY --from=ovnbuilder /tmp/ovn/rpm/rpmbuild/RPMS/x86_64/*rpm ./
COPY --from=ovnbuilder /tmp/ovn/ovs/rpm/rpmbuild/RPMS/x86_64/*rpm ./
COPY --from=ovnbuilder /tmp/ovn/ovs/rpm/rpmbuild/RPMS/noarch/*rpm ./

# Delete network-scripts-openvswitch rpm generated earlier as it requires
# network-scripts package and it is no longer available from Fedora 41.
RUN rm -f network-scripts*
RUN dnf install -y *.rpm && rm -f *.rpm

# install ovn-kubernetes binaries built in previous stage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ovn-kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
run: |
docker build --build-arg OVNKUBE_COMMIT=${{ env.OVNKUBE_COMMIT }} \
--build-arg GO_VERSION=${{ env.GO_VERSION }} \
--build-arg FEDORA_VERSION=41 \
--squash -t ovn-daemonset-f:dev -f .ci/ovn-kubernetes/Dockerfile .
mkdir /tmp/_output
docker save ovn-daemonset-f:dev > /tmp/_output/image.tar
Expand Down

0 comments on commit 8a12e0b

Please sign in to comment.