Skip to content

Commit

Permalink
fix: ci issues
Browse files Browse the repository at this point in the history
1. dpdk update
2. remove docker cache
  • Loading branch information
oilbeater committed Jun 7, 2021
1 parent 5d487d6 commit 2e59e81
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 41 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/build-arm64-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ jobs:
restore-keys: |
${{ runner.os }}-arm64-go-
- name: Cache Docker layers
uses: actions/cache@v2
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-arm64-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-arm64-buildx-
- name: Build
run: |
make release-arm
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/build-dpdk-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ jobs:
- name: Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-dpdk-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-dpdk-buildx-
- name: Build
run: |
make build-dpdk
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Cache Docker layers
uses: actions/cache@v2
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Unit test
run: |
go get -u github.com/onsi/ginkgo/ginkgo
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@ build-dev-images: build-bin

.PHONY: build-dpdk
build-dpdk:
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" --platform linux/amd64 -t $(REGISTRY)/kube-ovn-dpdk:19.11-$(RELEASE_TAG) -o type=docker -f dist/images/Dockerfile.dpdk1911 dist/images/
docker buildx build --platform linux/amd64 -t $(REGISTRY)/kube-ovn-dpdk:19.11-$(RELEASE_TAG) -o type=docker -f dist/images/Dockerfile.dpdk1911 dist/images/

.PHONY: base-amd64
base-amd64:
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" --platform linux/amd64 --build-arg ARCH=amd64 -t $(REGISTRY)/kube-ovn-base:$(RELEASE_TAG)-amd64 -o type=docker -f dist/images/Dockerfile.base dist/images/
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 -t $(REGISTRY)/kube-ovn-base:$(RELEASE_TAG)-amd64 -o type=docker -f dist/images/Dockerfile.base dist/images/

.PHONY: base-arm64
base-arm64:
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" --platform linux/arm64 --build-arg ARCH=arm64 -t $(REGISTRY)/kube-ovn-base:$(RELEASE_TAG)-arm64 -o type=docker -f dist/images/Dockerfile.base dist/images/
docker buildx build --platform linux/arm64 --build-arg ARCH=arm64 -t $(REGISTRY)/kube-ovn-base:$(RELEASE_TAG)-arm64 -o type=docker -f dist/images/Dockerfile.base dist/images/

.PHONY: release
release: lint build-go
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" --platform linux/amd64 --build-arg ARCH=amd64 -t $(REGISTRY)/kube-ovn:$(RELEASE_TAG) -o type=docker -f dist/images/Dockerfile dist/images/
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" --platform linux/amd64 --build-arg ARCH=amd64 -t $(REGISTRY)/vpc-nat-gateway:$(RELEASE_TAG) -o type=docker -f dist/images/vpcnatgateway/Dockerfile dist/images/vpcnatgateway
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 -t $(REGISTRY)/kube-ovn:$(RELEASE_TAG) -o type=docker -f dist/images/Dockerfile dist/images/
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 -t $(REGISTRY)/vpc-nat-gateway:$(RELEASE_TAG) -o type=docker -f dist/images/vpcnatgateway/Dockerfile dist/images/vpcnatgateway

.PHONY: release-arm
release-arm: build-go-arm
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" --platform linux/arm64 --build-arg ARCH=arm64 -t $(REGISTRY)/kube-ovn:$(RELEASE_TAG) -o type=docker -f dist/images/Dockerfile dist/images/
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" --platform linux/arm64 --build-arg ARCH=arm64 -t $(REGISTRY)/vpc-nat-gateway:$(RELEASE_TAG) -o type=docker -f dist/images/vpcnatgateway/Dockerfile dist/images/vpcnatgateway
docker buildx build --platform linux/arm64 --build-arg ARCH=arm64 -t $(REGISTRY)/kube-ovn:$(RELEASE_TAG) -o type=docker -f dist/images/Dockerfile dist/images/
docker buildx build --platform linux/arm64 --build-arg ARCH=arm64 -t $(REGISTRY)/vpc-nat-gateway:$(RELEASE_TAG) -o type=docker -f dist/images/vpcnatgateway/Dockerfile dist/images/vpcnatgateway

.PHONY: push-dev
push-dev:
Expand Down
17 changes: 10 additions & 7 deletions dist/images/Dockerfile.dpdk1911
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
FROM centos:8 as dpdk
ENV BUILD_DATE 20201021
ENV RPM_ARCH=x86_64
ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

ENV DPDK_VERSION=19.11.3
ENV DPDK_VERSION=20.11
ENV DPDK_SUBVERSION=1
ENV OVS_VERSION=2.14
ENV OVN_VERSION=20.06
ENV OVS_VERSION=2.15
ENV OVN_VERSION=20.12

ENV DPDK_DIR=/usr/src/dpdk-stable-${DPDK_VERSION}
ENV DPDK_DIR=/usr/src/dpdk-${DPDK_VERSION}
ENV OVS_DIR=/usr/src/openvswitch-${OVS_VERSION}
ENV OVN_DIR=/usr/src/ovn

ENV PATH=${PATH}:/usr/share/openvswitch/scripts
ENV PATH=${PATH}:/usr/share/ovn/scripts/

RUN yum -y install dpdk-devel-${DPDK_VERSION}-${DPDK_SUBVERSION}.el8 && \
RUN yum -y install dpdk-devel && \
dnf install -y --enablerepo=powertools \
gcc make numactl-devel meson \
unbound nc iptables ipset hostname && \
# Install DPDK
cd /usr/src/ && \
curl http://fast.dpdk.org/rel/dpdk-${DPDK_VERSION}.tar.gz | tar xz && \
cd dpdk-stable-${DPDK_VERSION} && \
cd dpdk-${DPDK_VERSION} && \
meson builddir && cd builddir && \
meson configure -Dapps='pdump proc-info' -Dexamples='' -Dtests=false -Denable_kmods=false -Denable_docs=false && \
ninja && ninja install && \
# Clean Up
dnf remove -y make meson gcc cpp && \
dnf clean all
RUN pkg-config --modversion libdpdk



FROM dpdk as rpm-builder

ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
RUN dnf install -y --enablerepo=powertools 'dnf-command(builddep)' python3-sphinx groff rpm-build libpcap-devel libibverbs-devel

# Build OVS-DPDK
Expand All @@ -43,7 +46,7 @@ RUN cd /usr/src/ && \
sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in > /tmp/ovs.spec && \
dnf builddep -y /tmp/ovs.spec && \
./boot.sh && \
./configure --prefix=/usr/ --with-dpdk=${DPDK_DIR}/builddir && \
./configure --with-dpdk=static && \
make rpm-fedora RPMBUILD_OPT="--with dpdk --without check"

# Build OVN
Expand Down

0 comments on commit 2e59e81

Please sign in to comment.