Skip to content

Commit

Permalink
Merge pull request #579 from mythi/PR-2021-012
Browse files Browse the repository at this point in the history
ci: fix builds with buildah
  • Loading branch information
rojkov authored Feb 18, 2021
2 parents 18b887b + 6c02ff5 commit 1a522bb
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
- 'release-*'
env:
RUNC_VERSION: v1.0.0-rc93
CRIO_VERSION: v1.20.0
GO_VERSION: 1.15.7
jobs:

Expand Down Expand Up @@ -103,14 +102,14 @@ jobs:
- name: Install Buildah and RunC
if: matrix.builder == 'buildah'
run: |
sudo apt-get -qq -y purge podman containers-image buildah
. /etc/os-release
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${ID^}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${ID^}_${VERSION_ID}/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo apt-get update -qq
sudo apt-get -qq -y install buildah
echo -e '[registries.search]\nregistries = ["docker.io"]\n\n' | sudo tee /etc/containers/registries.conf
sudo curl https://raw.githubusercontent.com/cri-o/cri-o/${CRIO_VERSION}/test/policy.json -o /etc/containers/policy.json
# install runc
sudo curl -L https://github.com/opencontainers/runc/releases/download/${RUNC_VERSION}/runc.amd64 -o /usr/bin/runc
sudo chmod +x /usr/bin/runc
Expand Down
1 change: 0 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ pipeline {
'''
sh "sudo apt-get update -qq"
sh "sudo apt-get -qq -y install libusb-1.0-0-dev buildah make gcc pkg-config"
sh "sudo curl https://raw.githubusercontent.com/cri-o/cri-o/${CRIO_VERSION}/test/policy.json -o /etc/containers/policy.json"
sh "sudo curl https://raw.githubusercontent.com/cri-o/cri-o/${CRIO_VERSION}/test/registries.conf -o /etc/containers/registries.conf"
sh "sudo sed -i -e 's/quay/docker/' /etc/containers/registries.conf"
sh "sudo curl -L https://github.com/opencontainers/runc/releases/download/$RUNC_VERSION/runc.amd64 -o /usr/bin/runc"
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-deviceplugin-operator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ RUN mkdir /install_root \
--no-boot-update \
&& rm -rf /install_root/var/lib/swupd/*

RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd cmd/operator; GO111MODULE=${GO111MODULE} go install; cd -
RUN chmod a+x /go/bin/operator \
&& install -D /go/bin/operator /install_root/usr/local/bin/intel_deviceplugin_operator \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-dsa-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ RUN mkdir /install_root \
--no-boot-update \
&& rm -rf /install_root/var/lib/swupd/*

RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd cmd/dsa_plugin; GO111MODULE=${GO111MODULE} go install; cd -
RUN chmod a+x /go/bin/dsa_plugin \
&& install -D /go/bin/dsa_plugin /install_root/usr/local/bin/intel_dsa_device_plugin \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-fpga-admissionwebhook.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ RUN mkdir /install_root \
--no-boot-update \
&& rm -rf /install_root/var/lib/swupd/*

RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd cmd/fpga_admissionwebhook; GO111MODULE=${GO111MODULE} go install; cd -
RUN chmod a+x /go/bin/fpga_admissionwebhook \
&& install -D /go/bin/fpga_admissionwebhook /install_root/usr/local/bin/intel_fpga_admissionwebhook \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-fpga-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ RUN mkdir /install_root \
&& rm -rf /install_root/var/lib/swupd/*

# Build CRI Hook
RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd $DIR/cmd/fpga_crihook && \
GO111MODULE=${GO111MODULE} go install && \
chmod a+x /go/bin/fpga_crihook && \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-fpga-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ RUN mkdir /install_root \
--no-boot-update \
&& rm -rf /install_root/var/lib/swupd/*

RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd cmd/fpga_plugin; GO111MODULE=${GO111MODULE} go install; cd -
RUN chmod a+x /go/bin/fpga_plugin \
&& install -D /go/bin/fpga_plugin /install_root/usr/local/bin/intel_fpga_device_plugin \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-gpu-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ RUN mkdir /install_root \
&& rm -rf /install_root/var/lib/swupd/*

# Build NFD Feature Detector Hook
RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd $DIR/cmd/gpu_nfdhook && \
GO111MODULE=${GO111MODULE} go install -ldflags="-s -w" && \
chmod a+x /go/bin/gpu_nfdhook && \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-gpu-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ RUN mkdir /install_root \
--no-boot-update \
&& rm -rf /install_root/var/lib/swupd/*

RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd cmd/gpu_plugin; GO111MODULE=${GO111MODULE} go install; cd -
RUN chmod a+x /go/bin/gpu_plugin \
&& install -D /go/bin/gpu_plugin /install_root/usr/local/bin/intel_gpu_device_plugin \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-qat-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ RUN test -z "${TAGS_KERNELDRV}" \
&& cd /usr/src/qat/quickassist/utilities/adf_ctl \
&& make KERNEL_SOURCE_DIR=/usr/src/qat/quickassist/qat \
&& install -D adf_ctl /install_root/usr/local/bin/adf_ctl )
RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd cmd/qat_plugin; echo "build tags: ${TAGS_KERNELDRV}"; GO111MODULE=${GO111MODULE} go install -tags "${TAGS_KERNELDRV}"; cd -
RUN chmod a+x /go/bin/qat_plugin \
&& install -D /go/bin/qat_plugin /install_root/usr/local/bin/intel_qat_device_plugin \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-sgx-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ RUN mkdir /install_root \
&& rm -rf /install_root/var/lib/swupd/*

# Build NFD Feature Detector Hook
RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd $DIR/cmd/sgx_epchook && \
GO111MODULE=${GO111MODULE} go install && \
chmod a+x /go/bin/sgx_epchook && \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-sgx-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ RUN mkdir /install_root \
--no-boot-update \
&& rm -rf /install_root/var/lib/swupd/*

RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd cmd/sgx_plugin; GO111MODULE=${GO111MODULE} go install; cd -
RUN chmod a+x /go/bin/sgx_plugin \
&& install -D /go/bin/sgx_plugin /install_root/usr/local/bin/intel_sgx_device_plugin \
Expand Down
2 changes: 2 additions & 0 deletions build/docker/intel-vpu-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ ARG DIR=/intel-device-plugins-for-kubernetes
ARG GO111MODULE=on
WORKDIR $DIR
COPY . .
RUN mkdir -p /go/cache
ENV GOCACHE=/go/cache
RUN cd cmd/vpu_plugin; GO111MODULE=${GO111MODULE} go install; cd -
RUN chmod a+x /go/bin/vpu_plugin \
&& install -D /go/bin/vpu_plugin /install_root/usr/local/bin/intel_vpu_device_plugin \
Expand Down

0 comments on commit 1a522bb

Please sign in to comment.