This would be an example:
pipeline {
agent { label 'default' }
stages{
stage('Parallel: Job A & Job B){
parallel {
stage('A') {
steps {
build job: 'Job A',
} //steps
}//stage
stage('B') {
steps {
build job: 'Job B',
} //steps
}//stage
}//parallel
}//stage
} // stages
} // pipeline
Job A and Job B clone the same repo/branch, I was wondering if I can reuse
them somehow...
They dont need can be ran sequentially either, I just want a way of making
the cloning of the same repos quicker
On Wednesday, January 8, 2025 at 2:27:33 PM UTC Kirk Fitzsimons wrote:
>
> It is not a multibranch pipeline, It is a declarative pipeline
> On Wednesday, January 8, 2025 at 2:15:41 PM UTC [email protected] wrote:
>
>> What type of pipeline project are you using? did you use multi brach
>> pipeline?
>>
>> On Wed, Jan 8, 2025 at 7:26 AM Kirk Fitzsimons <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> Apologies if this has been asked/answered already, but it there an
>>> ability to reuse docker nodes between stages using the docker-plugin
>>> <https://github.com/jenkinsci/docker-plugin>, I know you can do it
>>> using the docker-pipeline <https://plugins.jenkins.io/docker-workflow/>
>>>
>>> My use case is I have a parent pipeline job, which triggers child
>>> pipeline jobs, each child job ends up cloning the same git repo in a stage,
>>> this takes too much time, and I would like to somehow persist the
>>> workspace/reuse the node.
>>>
>>> If this is not possible with the plugin, is there a workaround, perhaps
>>> using a volume for the workspace which can be shared across the jobs?
>>>
>>> Kirk
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/5505e1c6-7e11-4744-94bf-77bb28ddbe56n%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/jenkinsci-users/5505e1c6-7e11-4744-94bf-77bb28ddbe56n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/jenkinsci-users/f45de53b-9a7b-49bb-934c-3c62b70fa9b8n%40googlegroups.com.