#190 Fix run seed job agent on top of OpenShift

This commit is contained in:
Tomasz Sęk 2020-01-01 22:22:44 +01:00
parent 044c0890c2
commit 80a6d33b0b
No known key found for this signature in database
GPG Key ID: DC356D23F6A644D0
1 changed files with 18 additions and 1 deletions

View File

@ -43,6 +43,9 @@ const (
AgentName = "seed-job-agent"
creatingGroovyScriptName = "seed-job-groovy-script.groovy"
homeVolumeName = "home"
homeVolumePath = "/home/jenkins/agent"
)
var seedJobGroovyScriptTemplate = template.Must(template.New(creatingGroovyScriptName).Parse(`
@ -409,9 +412,23 @@ func agentDeployment(jenkins *v1alpha2.Jenkins, namespace string, agentName stri
},
{
Name: "JENKINS_AGENT_WORKDIR",
Value: "/home/jenkins/agent",
Value: homeVolumePath,
},
},
VolumeMounts: []corev1.VolumeMount{
{
Name: homeVolumeName,
MountPath: homeVolumePath,
},
},
},
},
Volumes: []corev1.Volume{
{
Name: homeVolumeName,
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
},
},
},