diff --git a/pipelines/Automation/DevOps/artifactory_repository_clean.groovy b/pipelines/Automation/DevOps/artifactory_repository_clean.groovy index 8521625..0a66004 100644 --- a/pipelines/Automation/DevOps/artifactory_repository_clean.groovy +++ b/pipelines/Automation/DevOps/artifactory_repository_clean.groovy @@ -30,7 +30,7 @@ properties([ ]) ]) -podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: '/data'), yaml: getPodTemplate('alpine')) { +podTemplate(workspaceVolume: emptyDirWorkspaceVolume(memory: false), yaml: getPodTemplate('alpine')) { node(POD_LABEL) { try { stage('Search') { @@ -73,8 +73,6 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: '/data'), yaml: g catch(err) { echo 'ERROR: ' + err.getMessage() currentBuild.result = 'FAILURE' - } finally { - cleanWs() } } } diff --git a/pipelines/Automation/DevOps/vault-policies-and-roles-update.groovy b/pipelines/Automation/DevOps/vault-policies-and-roles-update.groovy index aea7488..5d76ae7 100644 --- a/pipelines/Automation/DevOps/vault-policies-and-roles-update.groovy +++ b/pipelines/Automation/DevOps/vault-policies-and-roles-update.groovy @@ -17,7 +17,7 @@ List vaultHosts = [ [env: 'avroid_prod', host: 'vault.avroid.tech'], ] -podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: '/data'), +podTemplate(workspaceVolume: emptyDirWorkspaceVolume(memory: false), yaml: getPodTemplate('pythonBuild')){ node(POD_LABEL) { container(name: 'python-build') { @@ -69,8 +69,6 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: '/data'), recipientProviders: [], to: recipient ) - } finally { - cleanWs() } } } diff --git a/pipelines/Docs/Eisen/doxygen.groovy b/pipelines/Docs/Eisen/doxygen.groovy index caa1746..c0cff23 100644 --- a/pipelines/Docs/Eisen/doxygen.groovy +++ b/pipelines/Docs/Eisen/doxygen.groovy @@ -29,7 +29,7 @@ String gitRepoName = "${owner}/${projectName}" String nexusRepoName = 'eisen-os_doc-feature' Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH) -podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: '/data'), +podTemplate(workspaceVolume: emptyDirWorkspaceVolume(memory: false), yaml: """ apiVersion: v1 kind: Pod @@ -210,8 +210,6 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: '/data'), echo 'ERROR: ' + err.getMessage() errorMessage = err.getMessage() currentBuild.result = 'FAILURE' - } finally { - cleanWs() } } } diff --git a/pipelines/OMP/nextcloud_sync.groovy b/pipelines/OMP/nextcloud_sync.groovy index 4eed4fb..e12c574 100644 --- a/pipelines/OMP/nextcloud_sync.groovy +++ b/pipelines/OMP/nextcloud_sync.groovy @@ -16,7 +16,7 @@ properties([ nexusRepository = 'OMP-cloud' -podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), +podTemplate(workspaceVolume: emptyDirWorkspaceVolume(memory: false), yaml: ''' apiVersion: v1 kind: Pod @@ -106,8 +106,6 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), catch(err) { echo 'ERROR: ' + err.getMessage() currentBuild.result = 'FAILURE' - } finally { - cleanWs() } } } diff --git a/pipelines/Release-activity/platformng.groovy b/pipelines/Release-activity/platformng.groovy index cedb342..30062d5 100644 --- a/pipelines/Release-activity/platformng.groovy +++ b/pipelines/Release-activity/platformng.groovy @@ -55,7 +55,7 @@ if (isContainsParentJob) { return } -podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), yaml: getPodTemplate('alpine')) { +podTemplate(workspaceVolume: emptyDirWorkspaceVolume(memory: false), yaml: getPodTemplate('alpine')) { node(POD_LABEL) { try { stage('Create branch') { @@ -96,8 +96,6 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), yaml: g catch(err) { echo 'ERROR: ' + err.getMessage() currentBuild.result = 'FAILURE' - } finally { - cleanWs() } } } diff --git a/pipelines/Release-activity/tavro.groovy b/pipelines/Release-activity/tavro.groovy index 65ba240..9522af7 100644 --- a/pipelines/Release-activity/tavro.groovy +++ b/pipelines/Release-activity/tavro.groovy @@ -55,7 +55,7 @@ if (isContainsParentJob) { return } -podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), yaml: getPodTemplate('alpine')) { +podTemplate(workspaceVolume: emptyDirWorkspaceVolume(memory: false), yaml: getPodTemplate('alpine')) { node(POD_LABEL) { try { stage('Create branch') { @@ -97,8 +97,6 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), yaml: g catch(err) { echo 'ERROR: ' + err.getMessage() currentBuild.result = 'FAILURE' - } finally { - cleanWs() } } } diff --git a/pipelines/gitea-events/eva-pr-link-webhook.groovy b/pipelines/gitea-events/eva-pr-link-webhook.groovy index 700fcde..c58c1a4 100644 --- a/pipelines/gitea-events/eva-pr-link-webhook.groovy +++ b/pipelines/gitea-events/eva-pr-link-webhook.groovy @@ -10,7 +10,7 @@ properties([ ]) ]) -podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), +podTemplate(workspaceVolume: emptyDirWorkspaceVolume(memory: false), yaml: """ apiVersion: v1 kind: Pod @@ -61,8 +61,6 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), catch(err) { echo 'ERROR: ' + err.getMessage() currentBuild.result = 'FAILURE' - } finally { - cleanWs() } } } diff --git a/pipelines/gitea-events/jobs-runner.groovy b/pipelines/gitea-events/jobs-runner.groovy index ba7f635..5d66028 100644 --- a/pipelines/gitea-events/jobs-runner.groovy +++ b/pipelines/gitea-events/jobs-runner.groovy @@ -48,7 +48,7 @@ String getBranch(Map fullJSON) { return branch } -podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), yaml: getPodTemplate('alpine')) { +podTemplate(workspaceVolume: emptyDirWorkspaceVolume(memory: false), yaml: getPodTemplate('alpine')) { node(POD_LABEL) { stage('Run job') { try { @@ -90,8 +90,6 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), yaml: g } } catch (groovy.lang.MissingPropertyException e) { println 'This job should run through gitea webhook:\n' + e - } finally { - cleanWs() } } } diff --git a/pipelines/jobs-dsl/jobs-dsl.groovy b/pipelines/jobs-dsl/jobs-dsl.groovy index 4347056..57c4ab7 100644 --- a/pipelines/jobs-dsl/jobs-dsl.groovy +++ b/pipelines/jobs-dsl/jobs-dsl.groovy @@ -1,3 +1,5 @@ + + @Library('shared-lib') _ import tech.avroid.scm.Git @@ -10,7 +12,7 @@ properties([ ]), ]) -podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), +podTemplate(workspaceVolume: emptyDirWorkspaceVolume(memory: false), yaml: ''' apiVersion: v1 kind: Pod @@ -63,8 +65,6 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), catch(err) { echo 'ERROR: ' + err.getMessage() currentBuild.result = 'FAILURE' - } finally { - cleanWs() } } }