From 0e13da7bf6d8362fcb49d519b8335bf301719b93 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 1 Feb 2022 16:18:00 +0000 Subject: [PATCH] ci: enable k8s specific validations (#19) * ci: enable k8s specific validations * add scripts * ci: use the rigth when * ci: enable k8s specific validations * ci: use the rigth when * script: enable execution permissions * script: enable execution permissions * ci: enable k8s specific validations * ci: use the rigth when * Update .ci/Jenkinsfile Co-authored-by: narph --- .ci/Jenkinsfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index b65f70edf66..1eacf171c2e 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -90,6 +90,28 @@ pipeline { } } } + stage('K8s') { + when { + // TODO: Run only if changes in + // - "^deploy/kubernetes/.*" + // - "^version/docs/version.asciidoc" + expression { return env.PLATFORM == 'ubuntu-20.04 && immutable' } + } + steps { + withGithubNotify(context: "K8s-${PLATFORM}") { + withMageEnv(){ + withEnv(["K8S_VERSION=v1.23.0", "KIND_VERSION=v0.11.1", "KUBECONFIG=${env.WORKSPACE}/kubecfg"]){ + dir("${BASE_DIR}"){ + retryWithSleep(retries: 2, seconds: 5, backoff: true){ sh(label: "Install kind", script: ".ci/scripts/install-kind.sh") } + retryWithSleep(retries: 2, seconds: 5, backoff: true){ sh(label: "Install kubectl", script: ".ci/scripts/install-kubectl.sh") } + sh(label: "Setup kind", script: ".ci/scripts/kind-setup.sh") + sh(label: "Deploy to kubernetes",script: "make -C deploy/kubernetes test") + } + } + } + } + } + } } } }