Christian Gagneraud
unread,Apr 7, 2018, 8:41:15 AM4/7/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkins...@googlegroups.com
Hi there,
From within a pipeline i would like to generate parallel jobs, and i
want all these jobs to run as ECS tasks using different specialised
docker images.
Can I use this syntax to achieve that?
----
stages {
stage ('Parallel builds') {
parallel {
stage ('Build#1') {
agent { docker 'image1' }
...
}
stage ('Build#2') {
agent { docker 'image2' }
...
}
}
}
---
From my experiments, I have the feeling that Jenkins will spawn
dockerised slaves in parallel for each parallel stage (good), but the
docker container will run within the EC2 instance ($DOCKER_HOST), and
thus it won't take advantage of CPU scaling (bad).
Right now, my ECS slave template is configured to use an image which
is just jenkins-jnlp + docker client.
Do I have to create one template per docker image and use "agent {
label '...' }" in place of "agent { docker '...' }"?
This looks weird to me.
Sorry if the question sounds stupid, i'm not that familiar with
Jenkins and Amazon ECS.
Thanks,
Chris