Skip to content

Commit cc02785

Browse files
authored
Merge pull request #512 from mythi/ci-20201123
CI updates
2 parents 234c938 + 621ecf9 commit cc02785

File tree

3 files changed

+20
-28
lines changed

3 files changed

+20
-28
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- 'release-*'
1111
env:
1212
RUNC_VERSION: v1.0.0-rc92
13-
CRIO_VERSION: v1.18.2
13+
CRIO_VERSION: v1.19.0
1414
GO_VERSION: 1.15.3
1515
jobs:
1616

@@ -31,7 +31,7 @@ jobs:
3131

3232
build:
3333
name: Build and check device plugins
34-
runs-on: ubuntu-18.04
34+
runs-on: ubuntu-20.04
3535
steps:
3636
- uses: actions/checkout@v2
3737
- uses: actions/setup-go@v2
@@ -108,7 +108,7 @@ jobs:
108108
sudo apt-get update -qq
109109
sudo apt-get -qq -y install buildah
110110
echo -e '[registries.search]\nregistries = ["docker.io"]\n\n' | sudo tee /etc/containers/registries.conf
111-
sudo curl https://raw.githubusercontent.com/kubernetes-sigs/cri-o/${CRIO_VERSION}/test/policy.json -o /etc/containers/policy.json
111+
sudo curl https://raw.githubusercontent.com/cri-o/cri-o/${CRIO_VERSION}/test/policy.json -o /etc/containers/policy.json
112112
# install runc
113113
sudo curl -L https://github.com/opencontainers/runc/releases/download/${RUNC_VERSION}/runc.amd64 -o /usr/bin/runc
114114
sudo chmod +x /usr/bin/runc

Jenkinsfile

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ pipeline {
33
label "master"
44
}
55
options {
6-
timeout(time: 3, unit: "HOURS")
6+
timeout(time: 4, unit: "HOURS")
77
}
88
environment {
99
GO111MODULE="on"
1010
REG="cloud-native-image-registry.westus.cloudapp.azure.com/"
1111
RUNC_VERSION="v1.0.0-rc92"
12-
CRIO_VERSION="v1.18.2"
12+
CRIO_VERSION="v1.19.0"
1313
GOLANGCI_LINT_VERSION="v1.30.0"
14-
BUILDAH_VERSION="v1.15.0"
1514
GO_VERSION="1.15.3"
1615
GO_TAR="go${GO_VERSION}.linux-amd64.tar.gz"
1716
GOROOT="/usr/local/go"
@@ -31,7 +30,7 @@ pipeline {
3130
}
3231
stage("Build && Publish") {
3332
agent {
34-
label "xenial-intel-device-plugins"
33+
label "bionic-intel-device-plugins"
3534
}
3635
stages {
3736
stage("Get requirements") {
@@ -42,27 +41,19 @@ pipeline {
4241
sh "mkdir -p $GOPATH/src/github.com/intel $GOPATH/bin"
4342
sh "cp -rf ${env.WORKSPACE} $REPO_DIR"
4443
sh "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin ${GOLANGCI_LINT_VERSION}"
45-
sh "sudo apt-get update"
46-
sh "sudo apt-get -y install e2fslibs-dev libfuse-dev libgpgme11-dev libdevmapper-dev libglib2.0-dev libprotobuf-dev libusb-1.0-0-dev"
47-
sh "mkdir -p ${GOPATH}/src/github.com/containers"
48-
dir(path: "${GOPATH}/src/github.com/containers") {
49-
sh "git clone --single-branch --depth 1 -b $BUILDAH_VERSION https://github.com/containers/buildah"
50-
}
51-
dir(path: "${GOPATH}/src/github.com/containers/buildah") {
52-
sh 'make buildah TAGS=""'
53-
sh "sudo cp buildah /usr/local/bin"
54-
sh "sudo mkdir -p /etc/containers"
55-
sh "sudo mkdir -p /etc/cni/net.d"
56-
sh "sudo mkdir -p /opt/cni/bin"
57-
sh "sed -i -e 's/build.sh/build_linux.sh/' Makefile"
58-
sh "make install.cni.sudo"
59-
sh '''echo '[registries.search]' > registries.conf'''
60-
sh '''echo 'registries = ["docker.io"]' >> registries.conf'''
61-
sh "sudo mv registries.conf /etc/containers/registries.conf"
62-
sh "sudo curl https://raw.githubusercontent.com/kubernetes-sigs/cri-o/$CRIO_VERSION/test/policy.json -o /etc/containers/policy.json"
63-
sh "sudo curl -L https://github.com/opencontainers/runc/releases/download/$RUNC_VERSION/runc.amd64 -o /usr/bin/runc"
64-
sh "sudo chmod +x /usr/bin/runc"
65-
}
44+
sh '''#!/usr/bin/env bash
45+
. /etc/os-release
46+
REPOURL=http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${ID^}_${VERSION_ID}
47+
echo "deb ${REPOURL} /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
48+
wget -nv ${REPOURL}/Release.key -O - | sudo apt-key add -
49+
'''
50+
sh "sudo apt-get update -qq"
51+
sh "sudo apt-get -qq -y install libusb-1.0-0-dev buildah make gcc pkg-config"
52+
sh "sudo curl https://raw.githubusercontent.com/cri-o/cri-o/${CRIO_VERSION}/test/policy.json -o /etc/containers/policy.json"
53+
sh "sudo curl https://raw.githubusercontent.com/cri-o/cri-o/${CRIO_VERSION}/test/registries.conf -o /etc/containers/registries.conf"
54+
sh "sudo sed -i -e 's/quay/docker/' /etc/containers/registries.conf"
55+
sh "sudo curl -L https://github.com/opencontainers/runc/releases/download/$RUNC_VERSION/runc.amd64 -o /usr/bin/runc"
56+
sh "sudo chmod +x /usr/bin/runc"
6657
}
6758
}
6859
stage("make go-mod-tidy") {

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ matching Kubernetes versions are listed below:
263263

264264
| Branch | Kubernetes branch/version |
265265
|:------------------|:-------------------------------|
266+
| release-0.19 | Kubernetes 1.19 branch v1.19.x |
266267
| release-0.18 | Kubernetes 1.18 branch v1.18.x |
267268
| release-0.17 | Kubernetes 1.17 branch v1.17.x |
268269
| release-0.15 | Kubernetes 1.15 branch v1.15.x |

0 commit comments

Comments
 (0)