ci: use buildah from the distro

After the following announcement on podman.io/blogs:

"Ubuntu 22.04 LTS Beta is available for testing as of March 31st. This
is the first LTS release with Podman, Buildah and Skopeo in the default
repos...

[snip]

There won’t be any further updates to the Kubic repos as far as Podman,
Buildah and Skopeo are concerned, so users are recommended to use the
default repos on 22.04 LTS."

buildah disappeared from the apt archive we were using making CI to
fail. Fortunately, we now get to use buildah from the worker directly.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
Mikko Ylinen 2022-05-20 10:49:09 +03:00
parent 046150b0d7
commit e2286eb816
2 changed files with 4 additions and 28 deletions

View File

@ -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
View File

@ -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"
}