From 11742df7ace8c2625c44afca8c09381b3052931d Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 1 Mar 2024 12:19:40 +0100 Subject: [PATCH] K8SPS-331 - Add chainsaw binary into Jenkinsfile --- Jenkinsfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ee2f8c8d4..9b82b2dfa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -203,7 +203,11 @@ void runTest(Integer TEST_ID) { export KUBECONFIG=/tmp/$CLUSTER_NAME-$clusterSuffix export PATH="\${KREW_ROOT:-\$HOME/.krew}/bin:\$PATH" set -o pipefail - kubectl kuttl test --config ./e2e-tests/kuttl.yaml --test "^${testName}\$" |& tee e2e-tests/logs/${testName}.log + if [ -f ./e2e-tests/kuttl.yaml ]; then + kubectl kuttl test --config ./e2e-tests/kuttl.yaml --test "^${testName}\$" |& tee e2e-tests/logs/${testName}.log + else + chainsaw test "./e2e-tests/tests/${testName}" |& tee e2e-tests/logs/${testName}.log + fi """ } pushArtifactFile("${env.GIT_BRANCH}-${env.GIT_SHORT_COMMIT}-$testName") @@ -252,6 +256,9 @@ void prepareNode() { kubectl krew install --manifest-url https://raw.githubusercontent.com/kubernetes-sigs/krew-index/a67f31ecb2e62f15149ca66d096357050f07b77d/plugins/kuttl.yaml echo \$(kubectl kuttl --version) is installed + curl -fsSL https://github.com/kyverno/chainsaw/releases/download/v0.1.7/chainsaw_linux_amd64.tar.gz | sudo tar -C /usr/local/bin -xzf - chainsaw + echo \$(chainsaw version) is installed + sudo tee /etc/yum.repos.d/google-cloud-sdk.repo << EOF [google-cloud-cli] name=Google Cloud CLI