[JENKINS-48050] introduce "container" agent type#255
[JENKINS-48050] introduce "container" agent type#255ndeloof wants to merge 8 commits intojenkinsci:masterfrom ndeloof:master
Conversation
introduce ContainerAgentProvisioner extension point default implementation based on docker-plugin Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
|
Needs a time stamped SNAPSHOT of docker-plugin deployed and used as the dependency. |
abayer
left a comment
There was a problem hiding this comment.
I know this is work in progress, but it really, really needs tests.
| } | ||
| } | ||
|
|
||
| public static ContainerAgentProvider getProvider() { |
There was a problem hiding this comment.
Could we get some javadoc here and elsewhere to explain what these are doing?
| /** | ||
| * @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a> | ||
| */ | ||
| public class ContainerAgentProvider { |
There was a problem hiding this comment.
Definitely needs javadoc since there’s nothing actually in here to help figure it out.
There was a problem hiding this comment.
Ah, I see this is incomplete - this looks, from other code, to actually be an extension point?
There was a problem hiding this comment.
would "Provides ContainerAgent" javadoc be really helpful here ?
isn't class name obvious ?
| <dependency> | ||
| <groupId>io.jenkins.docker</groupId> | ||
| <artifactId>docker-plugin</artifactId> | ||
| <version>1.2-SNAPSHOT</version> |
There was a problem hiding this comment.
Use the time stamped snapshot version here.
There was a problem hiding this comment.
correct me if I'm wrong, but we don't publish timestamped snapshots for plugins' pull-request builds
https://ci.jenkins.io/job/Plugins/job/docker-plugin/job/JENKINS-48050/8/console
There was a problem hiding this comment.
Correct. You need to do a mvn deploy by hand. Also, make sure these new dependencies are in dependencyManagement in the parent pom.
| --> | ||
|
|
||
| <p> | ||
| The job or stage will run within a Docker container. |
There was a problem hiding this comment.
Please add a config.jelly for supporting the changes coming in #250
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
see 6bd5444 |
|
@ndeloof Thanks - still needs more tests for making sure things like |
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
|
@ndeloof I’d still like to see tests in Declarative itself. |
|
JENKINS-48319, JENKINS-46831: those are irrelevant with container agents are those are just plain agents, without anything shared between a "top level" and "stage" agent. |
|
I’d still like tests demonstrating that the issues are not relevant for the container implementation. It’s always better to overdo it with tests than to miss something. |
|
And again, please do a |
| private String registryCredentials; | ||
|
|
||
| @DataBoundConstructor | ||
| public ContainerAgent(@Nonnull String image) { |
There was a problem hiding this comment.
We need some more setters/fields - String type for overriding the default container implementation, for certain, and probably some way to specify sidecar containers and a way to specify implementation-specific configuration.
There was a problem hiding this comment.
sidecar containers is out of scope for JENKINS-48050 phase 1
(but easy to add later)
I don't understand the need for "type". All implementation should create the exact same container deployment, just using distinct API (i.e docker or kubectl)
| } | ||
|
|
||
| @Extension | ||
| public static class DescriptorImpl extends Descriptor<ContainerAgentProvider> { |
There was a problem hiding this comment.
Needs a @Symbol for use in specifying an overriding implementation.
| this.registry = registry; | ||
| } | ||
|
|
||
| public ContainerAgentProvider getProvider() { |
There was a problem hiding this comment.
We need this same logic in FolderConfig too.
|
Please fix the findbugs error and the failing unit tests. Thanks. |
pipeline-model to define abstract "container" agent and docker-plugin or kubernetes-plugin for implementation
|
@bitwiseman FWIW my counterproposal is jenkinsci/docker-plugin#681. Anything to put a nail in the coffin of |
|
inactive, feel free to take over |
JENKINS issue(s):
https://issues.jenkins-ci.org/browse/JENKINS-48050
Description:
introduce "container" agent type with plugable implementation, + default docker-plugin based implementation
Users/aliases to notify:
@abayer