mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
Merge pull request #1023 from mythi/PR-2022-039
priority: ci: use buildah from the distro
This commit is contained in:
commit
725b21ccf0
15
.github/workflows/ci.yaml
vendored
15
.github/workflows/ci.yaml
vendored
@ -9,7 +9,6 @@ on:
|
||||
- main
|
||||
- 'release-*'
|
||||
env:
|
||||
RUNC_VERSION: v1.0.3
|
||||
GO_VERSION: 1.18.1
|
||||
K8S_VERSION: 1.22.1
|
||||
jobs:
|
||||
@ -137,20 +136,6 @@ jobs:
|
||||
${{ runner.os }}-go-
|
||||
- uses: actions/setup-go@v3
|
||||
- run: make -e vendor
|
||||
- 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
|
||||
# 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
|
||||
- name: Build image
|
||||
env:
|
||||
IMAGE_NAME: ${{ matrix.image }}
|
||||
|
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
@ -8,8 +8,6 @@ pipeline {
|
||||
environment {
|
||||
GO111MODULE="on"
|
||||
REG="cloud-native-image-registry.westus.cloudapp.azure.com/"
|
||||
RUNC_VERSION="v1.0.3"
|
||||
CRIO_VERSION="v1.21.4"
|
||||
K8S_VERSION="1.22.1"
|
||||
GOLANGCI_LINT_VERSION="v1.45.0"
|
||||
GO_VERSION="1.18.1"
|
||||
@ -31,7 +29,7 @@ pipeline {
|
||||
}
|
||||
stage("Build && Publish") {
|
||||
agent {
|
||||
label "bionic-intel-device-plugins"
|
||||
label "jammy-intel-device-plugins"
|
||||
}
|
||||
stages {
|
||||
stage("Get requirements") {
|
||||
@ -42,18 +40,11 @@ pipeline {
|
||||
sh "mkdir -p $GOPATH/src/github.com/intel $GOPATH/bin"
|
||||
sh "cp -rf ${env.WORKSPACE} $REPO_DIR"
|
||||
sh "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin ${GOLANGCI_LINT_VERSION}"
|
||||
sh '''#!/usr/bin/env bash
|
||||
. /etc/os-release
|
||||
REPOURL=http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${ID^}_${VERSION_ID}
|
||||
echo "deb ${REPOURL} /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
|
||||
wget -nv ${REPOURL}/Release.key -O - | sudo apt-key add -
|
||||
'''
|
||||
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/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"
|
||||
sh "sudo chmod +x /usr/bin/runc"
|
||||
sh '''#!/usr/bin/env bash
|
||||
echo -e 'unqualified-search-registries = ["docker.io"]' | sudo tee -a /etc/containers/registries.conf
|
||||
'''
|
||||
sh "sudo curl -L https://dl.k8s.io/release/v${K8S_VERSION}/bin/linux/amd64/kubectl -o /usr/bin/kubectl"
|
||||
sh "sudo chmod +x /usr/bin/kubectl"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user