Open nelsonq opened 5 months ago
Macos 14.3.1
Jenkinsfile
pipeline { agent any stages { stage('Build') { steps { script{ echo 'Hello world! This is parent job' jobDsl(targets: "childjob.groovy") build(job: "childjob") } } } } }
childjob.groovy
pipelineJob("childjob") { displayName("childjob") definition { cps { script(readFileFromWorkspace('Jenkinsfile.childjob')) sandbox() } } }
Jenkinsfile.childjob
pipeline { agent any stages { stage('Build childjob') { steps { echo 'Hello world! this is child job' } } } }
<path-to-jenkinsfile-runner>/app/target/appassembler/bin/jenkinsfile-runner \ -w <path-to-jenkins-workhome> \ --runWorkspace <path-to-jenkins-workspace> \ -p <path-to-jenkins-plugins> \ -f ~/Work/apphome/jenkins-test/Jenkinsfile
Hello world! this is child job message shows up in jenkinsfile runner log
Hello world! this is child job
no output message of Hello world! this is child job only output message from parent job Hello world! This is parent job
Hello world! This is parent job
No response
Jenkins and plugins versions report
Environment
```text Paste the output here ```What Operating System are you using (both controller, and any agents involved in the problem)?
Macos 14.3.1
Reproduction steps
Jenkinsfile
childjob.groovy
Jenkinsfile.childjob
Expected Results
Hello world! this is child job
message shows up in jenkinsfile runner logActual Results
no output message of
Hello world! this is child job
only output message from parent jobHello world! This is parent job
Anything else?
Are you interested in contributing a fix?
No response