[DO-1196] change workspace volume type (!54)
Co-authored-by: Yaroslav Bondarenko <yaroslav.bondarenko@avroid.tech> Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/54 Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team>
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user