Merge pull request #758 from hj-johannes-lee/ci-envtest

ci:Add envtest
This commit is contained in:
Dmitry Rozhkov 2021-11-22 09:58:03 +02:00 committed by GitHub
commit 120dbdc171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -11,6 +11,7 @@ on:
env:
RUNC_VERSION: v1.0.2
GO_VERSION: 1.17.2
K8S_VERSION: 1.20.2
jobs:
golangci:
@ -55,6 +56,12 @@ jobs:
- run: make go-mod-tidy
- run: make BUILDTAGS=kerneldrv
- run: make test BUILDTAGS=kerneldrv
- name: Install envtest tool and run envtest
run: |
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
setup-envtest use ${K8S_VERSION}
- run: |
KUBEBUILDER_ASSETS=$(setup-envtest use -i -p path ${K8S_VERSION}) make envtest
- run: make check-github-actions
- name: Codecov report
run: bash <(curl -s https://codecov.io/bash)

13
Jenkinsfile vendored
View File

@ -10,6 +10,7 @@ pipeline {
REG="cloud-native-image-registry.westus.cloudapp.azure.com/"
RUNC_VERSION="v1.0.2"
CRIO_VERSION="v1.20.0"
K8S_VERSION="1.20.2"
GOLANGCI_LINT_VERSION="v1.42.0"
GO_VERSION="1.17.2"
GO_TAR="go${GO_VERSION}.linux-amd64.tar.gz"
@ -78,6 +79,18 @@ pipeline {
}
}
}
stage('make envtest') {
steps {
dir(path: "$REPO_DIR") {
sh "go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest"
sh "setup-envtest use ${K8S_VERSION}"
sh '''#!/usr/bin/env bash
source <(setup-envtest use -p env ${K8S_VERSION})
make envtest
'''
}
}
}
}
}
stage('make pre-pull') {