Hi,
I'm starting to migrate some projects to the declarative pipeline model. In particular, we want to build on an agent designated by the "docker" label (which runs a Docker daemon) and then, I want to build inside a Docker container described by my Dockerfile.
Doing this:
pipeline {
agent {
label "docker"
dockerfile true
}
}
This generates an error:
Only one agent type is allowed per agent section
Now, what should be the best approach to solve this, I think, common pattern?
I will try using agent+label, and then using docker+build+inside in steps, but would not it more elegant to allow to use both a label and a Dockerfile in the agent declaration?
Thanks you for any feedback,
Damien.