#190 Fix run seed job agent on top of OpenShift

This commit is contained in:
Tomasz Sęk 2020-01-11 15:59:39 +01:00
parent 807d2e970b
commit 7ca7e58cc5
No known key found for this signature in database
GPG Key ID: DC356D23F6A644D0
1 changed files with 13 additions and 0 deletions

View File

@ -46,6 +46,9 @@ const (
homeVolumeName = "home"
homeVolumePath = "/home/jenkins/agent"
workspaceVolumeName = "workspace"
workspaceVolumePath = "/home/jenkins/workspace"
)
var seedJobGroovyScriptTemplate = template.Must(template.New(creatingGroovyScriptName).Parse(`
@ -420,6 +423,10 @@ func agentDeployment(jenkins *v1alpha2.Jenkins, namespace string, agentName stri
Name: homeVolumeName,
MountPath: homeVolumePath,
},
{
Name: workspaceVolumeName,
MountPath: workspaceVolumePath,
},
},
},
},
@ -430,6 +437,12 @@ func agentDeployment(jenkins *v1alpha2.Jenkins, namespace string, agentName stri
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
},
{
Name: workspaceVolumeName,
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
},
},
},
ObjectMeta: metav1.ObjectMeta{