@@ -313,13 +313,15 @@ class MROPipelineUtil extends PipelineUtil {
313313 if (preExecute) {
314314 preExecute(this . steps, repo)
315315 }
316- // force this to happen on master - if an agent is needed, the closure has to
317- // take care about it.
316+ // force this to happen on master - if an agent is needed, the closure has to
317+ // take care about it. The reason for this is the closure to have access to files
318+ // from the component, e.g. jenkinsfile, shell scripts,...
318319 this . steps. node {
319- // when a node switch happens, jenkins creates a new dir @xxx - so we need to copy.
320+ // when a node switch happens, jenkins creates a new dir workspace@xxx
321+ // so we need to copy.
320322 def currentNodeBaseDir = " ${ this.steps.env.WORKSPACE} /${ REPOS_BASE_DIR} /${ repo.id} "
321323 this . steps. sh " cp -r ${ currentBaseDir} ${ currentNodeBaseDir} "
322-
324+
323325 if (repo. type?. toLowerCase() == PipelineConfig . REPO_TYPE_ODS_CODE ) {
324326 if (this . project. isAssembleMode && name == PipelinePhases . BUILD ) {
325327 executeODSComponent(repo, currentNodeBaseDir)
@@ -350,7 +352,7 @@ class MROPipelineUtil extends PipelineUtil {
350352 def phaseConfig = repo. pipelineConfig. phases ? repo. pipelineConfig. phases[name] : null
351353 if (phaseConfig) {
352354 def label = " ${ repo.id} (${ repo.url} )"
353-
355+
354356 if (phaseConfig. type == PipelineConfig . PHASE_EXECUTOR_TYPE_MAKEFILE ) {
355357 this . steps. dir(currentNodeBaseDir) {
356358 def steps = " make ${ phaseConfig.target} "
@@ -368,6 +370,7 @@ class MROPipelineUtil extends PipelineUtil {
368370 }
369371 }
370372 // we keep this outside the node, as there are various code pieces in the different stages
373+ // that organize their (own) agent / master concept
371374 if (postExecute) {
372375 postExecute(this . steps, repo)
373376 }
0 commit comments