I have a Jenkins freestyle project that runs on k8s slave pod. Now the main project has another subproject, which essentially clone/pull files from github, meaning the files pulled by the subproject are required for the main project.
The problem I’m facing is that, when I run the build, both the project and subproject are running in different pods,so the files downloaded by the subproject is not accessible to the main project.
<code>job('main-project') {
steps {
downstreamParameterized {
trigger('upstrea_job1') { ----> pull/clone a git repo into the workspace of the main project
parameters {
predefinedProp('customWorkspace', '${WORKSPACE}/${BUILD_NUMBER}/survey_vm_conf')
}
}
}
</code>
<code>job('main-project') {
steps {
downstreamParameterized {
trigger('upstrea_job1') { ----> pull/clone a git repo into the workspace of the main project
parameters {
predefinedProp('customWorkspace', '${WORKSPACE}/${BUILD_NUMBER}/survey_vm_conf')
}
}
}
</code>
job('main-project') {
steps {
downstreamParameterized {
trigger('upstrea_job1') { ----> pull/clone a git repo into the workspace of the main project
parameters {
predefinedProp('customWorkspace', '${WORKSPACE}/${BUILD_NUMBER}/survey_vm_conf')
}
}
}
Is there any workaround I could do ?