From f02c862999f1fc2536592a89b58632e4f5d37f81 Mon Sep 17 00:00:00 2001 From: jstastny-cz Date: Tue, 12 Dec 2023 12:10:15 +0100 Subject: [PATCH 01/15] kie-issues#755: initial adjustment for ASF jenkins --- .ci/jenkins/Jenkinsfile.deploy | 11 ++++------- .ci/jenkins/Jenkinsfile.promote | 19 ++++++++----------- .ci/jenkins/Jenkinsfile.setup-branch | 2 +- .ci/jenkins/dsl/jobs.groovy | 14 ++++++++------ .ci/jenkins/scripts/helper.groovy | 12 ++++++++---- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index a75e6a6c9..ae7be292b 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -59,7 +59,6 @@ pipeline { // TODO docker buildx could be preinstalled onto the docker image cloud.prepareForDockerMultiplatformBuild([localRegistryUrl],[cloud.getDockerIOMirrorRegistryConfig()], false) - cloud.installSkopeo() } } post { @@ -81,7 +80,7 @@ pipeline { steps { script { if (githubscm.isBranchExist('origin', helper.getPRBranch())) { - githubscm.removeRemoteBranch('origin', helper.getPRBranch()) + githubscm.removeRemoteBranch('origin', helper.getPRBranch(), helper.getGitAuthorPushCredsId()) } githubscm.createBranch(helper.getPRBranch()) } @@ -206,14 +205,14 @@ pipeline { } steps { script { - githubscm.pushObject('origin', helper.getPRBranch(), helper.getGitAuthorCredsID()) + githubscm.pushObject('origin', helper.getPRBranch(), helper.getGitAuthorPushCredsId()) def prMsg = getCommitMessage() def prBody = "Generated by build ${BUILD_TAG}: ${BUILD_URL}.\nPlease do not merge, it shoud be merged automatically." - String prLink = githubscm.createPR(prMsg, prBody, helper.getBuildBranch(), helper.getGitAuthorCredsID()) + String prLink = githubscm.createPR(prMsg, prBody, helper.getBuildBranch(), helper.getGitAuthorPushCredsId()) properties.add("${helper.getRepoName()}.pr.link", prLink) - properties.add("${helper.getRepoName()}.pr.source.uri", "https://github.com/${helper.getGitAuthorCredsID()}/${helper.getRepoName()}") + properties.add("${helper.getRepoName()}.pr.source.uri", "https://github.com/${helper.getGitAuthor()}/${helper.getRepoName()}") properties.add("${helper.getRepoName()}.pr.source.ref", helper.getPRBranch()) properties.add("${helper.getRepoName()}.pr.target.uri", "https://github.com/${helper.getGitAuthor()}/${helper.getRepoName()}") properties.add("${helper.getRepoName()}.pr.target.ref", helper.getBuildBranch()) @@ -236,8 +235,6 @@ pipeline { helper.cleanGoPath() util.cleanNode(env.CONTAINER_ENGINE) cloud.cleanDockerMultiplatformBuild() - cloud.cleanLocalRegistry() - cloud.cleanSkopeo() } } } diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote index 5e240a458..2577cff21 100644 --- a/.ci/jenkins/Jenkinsfile.promote +++ b/.ci/jenkins/Jenkinsfile.promote @@ -48,8 +48,6 @@ pipeline { // Login old and new registries helper.loginRegistry(baseImageParamsPrefix) helper.loginRegistry(promoteImageParamsPrefix) - - cloud.installSkopeo() } } } @@ -86,8 +84,8 @@ pipeline { // Merge PR String prLink = properties.retrieve("${helper.getRepoName()}.pr.link") if (prLink) { - githubscm.mergePR(prLink, helper.getGitAuthorCredsID()) - githubscm.pushObject('origin', helper.getBuildBranch(), helper.getGitAuthorCredsID()) + githubscm.mergePR(prLink, helper.getGitAuthorPushCredsId()) + githubscm.pushObject('origin', helper.getBuildBranch(), helper.getGitAuthorPushCredsId()) } // Tag api / container-builder @@ -117,13 +115,13 @@ pipeline { steps { script { dir(helper.getRepoName()) { - if(githubscm.isReleaseExist(helper.getGitTag(), helper.getGitAuthorCredsID())) { - githubscm.deleteReleaseAndTag(helper.getGitTag(), helper.getGitAuthorCredsID()) + if(githubscm.isReleaseExist(helper.getGitTag(), helper.getGitAuthorCredsId())) { + githubscm.deleteReleaseAndTag(helper.getGitTag(), helper.getGitAuthorPushCredsId()) } - githubscm.createReleaseWithGeneratedReleaseNotes(helper.getGitTag(), helper.getBuildBranch(), githubscm.getPreviousTagFromVersion(helper.getProjectVersion(), 'v', '', ['/']), helper.getGitAuthorCredsID()) - githubscm.updateReleaseBody(helper.getGitTag(), helper.getGitAuthorCredsID()) + githubscm.createReleaseWithGeneratedReleaseNotes(helper.getGitTag(), helper.getBuildBranch(), githubscm.getPreviousTagFromVersion(helper.getProjectVersion(), 'v', '', ['/']), helper.getGitAuthorPushCredsId()) + githubscm.updateReleaseBody(helper.getGitTag(), helper.getGitAuthorPushCredsId()) - withCredentials([usernamePassword(credentialsId: helper.getGitAuthorCredsID(), usernameVariable: 'GH_USER', passwordVariable: 'GH_TOKEN')]) { + withCredentials([usernamePassword(credentialsId: helper.getGitAuthorPushCredsId(), usernameVariable: 'GH_USER', passwordVariable: 'GH_TOKEN')]) { sh """ gh release upload ${helper.getGitTag()} "operator.yaml" """ @@ -141,7 +139,6 @@ pipeline { script { helper.cleanGoPath() util.cleanNode(containerEngine) - cloud.cleanSkopeo() } } } @@ -169,7 +166,7 @@ void updateInternalGoModuleWithTag(String moduleName, String tagName) { void commitAndPush(String remote, String commitMsg, Closure preCommit) { if (githubscm.isThereAnyChanges()) { githubscm.commitChanges(commitMsg, preCommit) - githubscm.pushObject(remote, helper.getBuildBranch(), helper.getGitAuthorCredsID()) + githubscm.pushObject(remote, helper.getBuildBranch(), helper.getGitAuthorPushCredsId()) } else { echo "No change... Skipping commit and push" } diff --git a/.ci/jenkins/Jenkinsfile.setup-branch b/.ci/jenkins/Jenkinsfile.setup-branch index 63f2cf938..8e4527f67 100644 --- a/.ci/jenkins/Jenkinsfile.setup-branch +++ b/.ci/jenkins/Jenkinsfile.setup-branch @@ -74,7 +74,7 @@ pipeline { git add . ''' }) - githubscm.pushObject('origin', helper.getBuildBranch(), helper.getGitAuthorCredsID()) + githubscm.pushObject('origin', helper.getBuildBranch(), helper.getGitAuthorPushCredsId()) } else { println '[WARN] no changes to commit' } diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index a38d710a5..c323f3ad5 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -61,8 +61,8 @@ void createSetupBranchJob() { JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", GIT_AUTHOR: "${GIT_AUTHOR_NAME}", - AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", - GITHUB_TOKEN_CREDS_ID: "${GIT_AUTHOR_TOKEN_CREDENTIALS_ID}", + GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", + GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}", IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}" ]) @@ -86,8 +86,8 @@ void setupDeployJob(JobType jobType) { JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", GIT_AUTHOR: "${GIT_AUTHOR_NAME}", - AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", - GITHUB_TOKEN_CREDS_ID: "${GIT_AUTHOR_TOKEN_CREDENTIALS_ID}", + GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", + GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}", OPERATOR_IMAGE_NAME: 'kogito-serverless-operator', MAX_REGISTRY_RETRIES: 3, @@ -137,8 +137,8 @@ void setupPromoteJob(JobType jobType) { GIT_AUTHOR: "${GIT_AUTHOR_NAME}", - AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", - GITHUB_TOKEN_CREDS_ID: "${GIT_AUTHOR_TOKEN_CREDENTIALS_ID}", + GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", + GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}", ]) KogitoJobTemplate.createPipelineJob(this, jobParams)?.with { parameters { @@ -182,6 +182,8 @@ void setupE2EJob(JobType jobType, String clusterName, Map extraEnv = [:]) { GIT_AUTHOR: "${GIT_AUTHOR_NAME}", + GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", + OPERATOR_IMAGE_NAME: 'kogito-serverless-operator', MAX_REGISTRY_RETRIES: 3, PROPERTIES_FILE_NAME: 'deployment.properties', diff --git a/.ci/jenkins/scripts/helper.groovy b/.ci/jenkins/scripts/helper.groovy index 616e8703b..0dae5f03d 100644 --- a/.ci/jenkins/scripts/helper.groovy +++ b/.ci/jenkins/scripts/helper.groovy @@ -49,7 +49,7 @@ void checkoutRepo(String repoName = '', String directory = '') { repoName = repoName ?: getRepoName() closure = { deleteDir() - checkout(githubscm.resolveRepository(repoName, getGitAuthor(), getBuildBranch(), false)) + checkout(githubscm.resolveRepository(repoName, getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsId())) // need to manually checkout branch since on a detached branch after checkout command //sh "git checkout ${getBuildBranch()}" } @@ -70,7 +70,7 @@ void loginRegistry(String paramsPrefix = defaultImageParamsPrefix) { } void createTag(String tagName = getGitTag()) { - githubscm.tagLocalAndRemoteRepository('origin', tagName, getGitAuthorCredsID(), '', true) + githubscm.tagLocalAndRemoteRepository('origin', tagName, getGitAuthorPushCredsId(), '', true) } // Set images public on quay. Useful when new images are introduced. @@ -237,8 +237,12 @@ String getGitAuthor() { return "${GIT_AUTHOR}" } -String getGitAuthorCredsID() { - return env.AUTHOR_CREDS_ID +String getGitAuthorCredsId() { + return env.GIT_AUTHOR_CREDS_ID +} + +String getGitAuthorPushCredsId() { + return env.GIT_AUTHOR_PUSH_CREDS_ID } String getPRBranch() { From 9172cd3d0a89db12e2ecb1127c3ef33698a23204 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 12 Dec 2023 14:47:27 -0300 Subject: [PATCH 02/15] Remove directory deletion before git checkout --- .ci/jenkins/scripts/helper.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/scripts/helper.groovy b/.ci/jenkins/scripts/helper.groovy index 0dae5f03d..d4699da0f 100644 --- a/.ci/jenkins/scripts/helper.groovy +++ b/.ci/jenkins/scripts/helper.groovy @@ -48,7 +48,7 @@ String getTempTag() { void checkoutRepo(String repoName = '', String directory = '') { repoName = repoName ?: getRepoName() closure = { - deleteDir() + //deleteDir() checkout(githubscm.resolveRepository(repoName, getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsId())) // need to manually checkout branch since on a detached branch after checkout command //sh "git checkout ${getBuildBranch()}" From fbd82be39f49633b0094c2f22fe0dca78e0db028 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 12 Dec 2023 15:14:33 -0300 Subject: [PATCH 03/15] Add default container engine --- .ci/jenkins/scripts/helper.groovy | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.ci/jenkins/scripts/helper.groovy b/.ci/jenkins/scripts/helper.groovy index d4699da0f..38542b708 100644 --- a/.ci/jenkins/scripts/helper.groovy +++ b/.ci/jenkins/scripts/helper.groovy @@ -15,7 +15,7 @@ void initPipeline() { openshift.openshiftApiCredsKey = env.OPENSHIFT_CREDS_KEY container = load '.ci/jenkins/scripts/container.groovy' - container.containerEngine = env.CONTAINER_ENGINE + container.containerEngine = env.CONTAINER_ENGINE ?: 'docker' container.containerEngineTlsOptions = env.CONTAINER_ENGINE_TLS_OPTIONS ?: '' container.containerOpenshift = openshift @@ -48,14 +48,16 @@ String getTempTag() { void checkoutRepo(String repoName = '', String directory = '') { repoName = repoName ?: getRepoName() closure = { - //deleteDir() checkout(githubscm.resolveRepository(repoName, getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsId())) // need to manually checkout branch since on a detached branch after checkout command //sh "git checkout ${getBuildBranch()}" } if (directory) { - dir(directory, closure) + dir(directory) { + deleteDir() + closure() + } } else { closure() } From bffe471377b4fe07345438a662580cb5f197595e Mon Sep 17 00:00:00 2001 From: jstastny-cz Date: Wed, 13 Dec 2023 10:53:33 +0100 Subject: [PATCH 04/15] replace local var with env --- .ci/jenkins/Jenkinsfile.deploy | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index ae7be292b..9a579a709 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -4,8 +4,6 @@ helper = null commitDone = false -def localRegistryUrl = ''; - pipeline { agent { docker { @@ -55,10 +53,10 @@ pipeline { // Prepare for multiplatform build int freePort = cloud.findFreePort() - localRegistryUrl = cloud.startLocalRegistry(freePort) + env.localRegistryUrl = cloud.startLocalRegistry(freePort) // TODO docker buildx could be preinstalled onto the docker image - cloud.prepareForDockerMultiplatformBuild([localRegistryUrl],[cloud.getDockerIOMirrorRegistryConfig()], false) + cloud.prepareForDockerMultiplatformBuild([env.localRegistryUrl],[cloud.getDockerIOMirrorRegistryConfig()], false) } } post { @@ -261,7 +259,7 @@ String getBuiltImage() { } String getTempBuiltImageTag() { - return "${localRegistryUrl}/kogito-serverless-operator:${getOperatorVersion()}" + return "${env.localRegistryUrl}/kogito-serverless-operator:${getOperatorVersion()}" } void runPythonCommand(String cmd, boolean stdout = false) { From 389587a5f9e45c27b5b3b1f2424734f0425b2540 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Wed, 13 Dec 2023 08:34:47 -0300 Subject: [PATCH 05/15] Add CONTAINER_ENGINE env var --- .ci/jenkins/Jenkinsfile.deploy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index 9a579a709..8ebfc3c9f 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -23,6 +23,8 @@ pipeline { PR_BRANCH_HASH = "${util.generateHash(10)}" IMAGE_BUILD_PLATFORMS = 'linux/amd64,linux/arm64' + + CONTAINER_ENGINE = 'docker' } stages { From 88e0881556647e5d5d49da083e2166a2d2ff012a Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Wed, 13 Dec 2023 09:35:16 -0300 Subject: [PATCH 06/15] Fix minikube installation --- .ci/jenkins/scripts/minikube.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.ci/jenkins/scripts/minikube.groovy b/.ci/jenkins/scripts/minikube.groovy index 31e254c08..883636fd0 100644 --- a/.ci/jenkins/scripts/minikube.groovy +++ b/.ci/jenkins/scripts/minikube.groovy @@ -100,8 +100,9 @@ void preChecks() { ${minikubeContainerEngine} info if [[ ! \$(command -v minikube) ]]; then - curl -LO https://github.com/kubernetes/minikube/releases/download/v${minikubeVersion}/minikube-${minikubeVersion}-0.x86_64.rpm - sudo yum localinstall -y minikube-${minikubeVersion}-0.x86_64.rpm + curl -LO https://github.com/kubernetes/minikube/releases/download/v${minikubeVersion}/minikube-linux-amd64 + sudo cp minikube-linux-amd64 /usr/local/bin/minikube + sudo chmod 755 /usr/local/bin/minikube fi """ } From 1677dd64107b84ef4ed996228b9042e1210383ef Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Wed, 13 Dec 2023 16:17:21 -0300 Subject: [PATCH 07/15] Force bash shell usage on sh step --- .ci/jenkins/Jenkinsfile.e2e.cluster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/Jenkinsfile.e2e.cluster b/.ci/jenkins/Jenkinsfile.e2e.cluster index 3b90cab28..c4afe13cb 100644 --- a/.ci/jenkins/Jenkinsfile.e2e.cluster +++ b/.ci/jenkins/Jenkinsfile.e2e.cluster @@ -77,7 +77,7 @@ pipeline { script { executeInCluster { try { - sh """ + sh """#!/bin/bash -l export CLUSTER_PLATFORM=${getClusterName()} export OPERATOR_IMAGE_NAME=${getTestImage()} make test-e2e From 3a14644f014257130d489e256c30e01430ff07ee Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Wed, 13 Dec 2023 16:53:40 -0300 Subject: [PATCH 08/15] Force bash shell usage on sh step --- .ci/jenkins/Jenkinsfile.e2e.cluster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/Jenkinsfile.e2e.cluster b/.ci/jenkins/Jenkinsfile.e2e.cluster index c4afe13cb..3b90cab28 100644 --- a/.ci/jenkins/Jenkinsfile.e2e.cluster +++ b/.ci/jenkins/Jenkinsfile.e2e.cluster @@ -77,7 +77,7 @@ pipeline { script { executeInCluster { try { - sh """#!/bin/bash -l + sh """ export CLUSTER_PLATFORM=${getClusterName()} export OPERATOR_IMAGE_NAME=${getTestImage()} make test-e2e From efe760cdfa4d6d059984c68f7efd95ad8d696fd1 Mon Sep 17 00:00:00 2001 From: jstastny-cz Date: Thu, 14 Dec 2023 11:37:18 +0100 Subject: [PATCH 09/15] set user config for git --- .ci/jenkins/Jenkinsfile.deploy | 1 + .ci/jenkins/Jenkinsfile.promote | 1 + .ci/jenkins/Jenkinsfile.setup-branch | 1 + 3 files changed, 3 insertions(+) diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index 8ebfc3c9f..97378f1fa 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -95,6 +95,7 @@ pipeline { script { runPythonCommand("make bump-version new_version=${helper.getProjectVersion()}") + githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId()) // Commit changes githubscm.commitChanges(getCommitMessage(), { sh ''' diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote index 2577cff21..02eb68db0 100644 --- a/.ci/jenkins/Jenkinsfile.promote +++ b/.ci/jenkins/Jenkinsfile.promote @@ -165,6 +165,7 @@ void updateInternalGoModuleWithTag(String moduleName, String tagName) { void commitAndPush(String remote, String commitMsg, Closure preCommit) { if (githubscm.isThereAnyChanges()) { + githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId()) githubscm.commitChanges(commitMsg, preCommit) githubscm.pushObject(remote, helper.getBuildBranch(), helper.getGitAuthorPushCredsId()) } else { diff --git a/.ci/jenkins/Jenkinsfile.setup-branch b/.ci/jenkins/Jenkinsfile.setup-branch index 8e4527f67..68cb5822c 100644 --- a/.ci/jenkins/Jenkinsfile.setup-branch +++ b/.ci/jenkins/Jenkinsfile.setup-branch @@ -69,6 +69,7 @@ pipeline { git checkout -- go.sum ''' if (githubscm.isThereAnyChanges()) { + githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId()) githubscm.commitChanges("[${helper.getBuildBranch()}] Update version to ${helper.getProjectVersion()}", { sh ''' git add . From dfb54c39e146dd6daa74a77be3c7fb15d12f0789 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 2 Jan 2024 10:50:00 -0300 Subject: [PATCH 10/15] Reuse existing script to install minikube --- .ci/jenkins/scripts/minikube.groovy | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.ci/jenkins/scripts/minikube.groovy b/.ci/jenkins/scripts/minikube.groovy index 883636fd0..27be2d73d 100644 --- a/.ci/jenkins/scripts/minikube.groovy +++ b/.ci/jenkins/scripts/minikube.groovy @@ -100,9 +100,7 @@ void preChecks() { ${minikubeContainerEngine} info if [[ ! \$(command -v minikube) ]]; then - curl -LO https://github.com/kubernetes/minikube/releases/download/v${minikubeVersion}/minikube-linux-amd64 - sudo cp minikube-linux-amd64 /usr/local/bin/minikube - sudo chmod 755 /usr/local/bin/minikube + ./hack/ci/install-minikube.sh fi """ } From 2c65c3b98d7c15d723bf415da724abebc8503915 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 2 Jan 2024 11:56:11 -0300 Subject: [PATCH 11/15] Reuse existing script to install minikube --- .ci/jenkins/scripts/minikube.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/scripts/minikube.groovy b/.ci/jenkins/scripts/minikube.groovy index 27be2d73d..e14230786 100644 --- a/.ci/jenkins/scripts/minikube.groovy +++ b/.ci/jenkins/scripts/minikube.groovy @@ -100,7 +100,7 @@ void preChecks() { ${minikubeContainerEngine} info if [[ ! \$(command -v minikube) ]]; then - ./hack/ci/install-minikube.sh + sudo ./hack/ci/install-minikube.sh fi """ } From d94b17f574552935656a1ca464452a9a6603920b Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 2 Jan 2024 13:16:59 -0300 Subject: [PATCH 12/15] fix minikube installation --- .ci/jenkins/scripts/minikube.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/scripts/minikube.groovy b/.ci/jenkins/scripts/minikube.groovy index e14230786..a3f5d3438 100644 --- a/.ci/jenkins/scripts/minikube.groovy +++ b/.ci/jenkins/scripts/minikube.groovy @@ -100,7 +100,7 @@ void preChecks() { ${minikubeContainerEngine} info if [[ ! \$(command -v minikube) ]]; then - sudo ./hack/ci/install-minikube.sh + ./hack/ci/install-minikube.sh /usr/local/bin fi """ } From 17627a56e050e19a3c066c41b1e99aafce2cb302 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 2 Jan 2024 13:17:23 -0300 Subject: [PATCH 13/15] fix minikube installation --- .ci/jenkins/scripts/minikube.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/scripts/minikube.groovy b/.ci/jenkins/scripts/minikube.groovy index a3f5d3438..006414c37 100644 --- a/.ci/jenkins/scripts/minikube.groovy +++ b/.ci/jenkins/scripts/minikube.groovy @@ -100,7 +100,7 @@ void preChecks() { ${minikubeContainerEngine} info if [[ ! \$(command -v minikube) ]]; then - ./hack/ci/install-minikube.sh /usr/local/bin + sudo ./hack/ci/install-minikube.sh /usr/local/bin fi """ } From 2135e2eb1a87f97386c2845fccb601816162de6e Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 2 Jan 2024 14:03:15 -0300 Subject: [PATCH 14/15] fix minikube installation --- .ci/jenkins/scripts/minikube.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/scripts/minikube.groovy b/.ci/jenkins/scripts/minikube.groovy index 006414c37..a3f5d3438 100644 --- a/.ci/jenkins/scripts/minikube.groovy +++ b/.ci/jenkins/scripts/minikube.groovy @@ -100,7 +100,7 @@ void preChecks() { ${minikubeContainerEngine} info if [[ ! \$(command -v minikube) ]]; then - sudo ./hack/ci/install-minikube.sh /usr/local/bin + ./hack/ci/install-minikube.sh /usr/local/bin fi """ } From 65391d5c08a567d2297fcc4da1e7589ef17324d5 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 2 Jan 2024 15:18:34 -0300 Subject: [PATCH 15/15] fix minikube permission --- .ci/jenkins/scripts/minikube.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/jenkins/scripts/minikube.groovy b/.ci/jenkins/scripts/minikube.groovy index a3f5d3438..1b921db4e 100644 --- a/.ci/jenkins/scripts/minikube.groovy +++ b/.ci/jenkins/scripts/minikube.groovy @@ -100,7 +100,8 @@ void preChecks() { ${minikubeContainerEngine} info if [[ ! \$(command -v minikube) ]]; then - ./hack/ci/install-minikube.sh /usr/local/bin + sudo ./hack/ci/install-minikube.sh /usr/local/bin + sudo chmod +x /usr/local/bin/minikube fi """ }