[JIRA] (JENKINS-39109) Agent docker should be configurable by admin to run on specific agent label

3 views
Skip to first unread message

rsandell@cloudbees.com (JIRA)

unread,
Oct 19, 2016, 9:38:02 AM10/19/16
to jenkinsc...@googlegroups.com
rsandell assigned an issue to rsandell
 
Jenkins / Improvement JENKINS-39109
Agent docker should be configurable by admin to run on specific agent label
Change By: rsandell
Assignee: Andrew Bayer rsandell
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

rsandell@cloudbees.com (JIRA)

unread,
Oct 19, 2016, 9:38:02 AM10/19/16
to jenkinsc...@googlegroups.com
rsandell started work on Improvement JENKINS-39109
 
Change By: rsandell
Status: Open In Progress

rsandell@cloudbees.com (JIRA)

unread,
Oct 19, 2016, 9:38:07 AM10/19/16
to jenkinsc...@googlegroups.com
rsandell created an issue
Issue Type: Improvement Improvement
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2016/Oct/19 1:37 PM
Priority: Major Major
Reporter: rsandell

In a mixed agent environment, like ci.jenkins.io where not all agents are running the docker deamon, the pipeline should not have to specify what label to use. agent docker: "maven:3.3.9-jdk-8" should be enough.
The admin should have a configuration option to specify what label to use when a pipeline omits the label and only specifies a docker image.

scm_issue_link@java.net (JIRA)

unread,
Oct 19, 2016, 9:46:01 AM10/19/16
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Improvement JENKINS-39109
 
Re: Agent docker should be configurable by admin to run on specific agent label

Code changed in jenkins
User: Robert Sandell
Path:
src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Agent.groovy
src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/config/DockerLabelProvider.java
src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig.java
src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig.java
src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/steps/DockerLabelStep.java
src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties
src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig/config.groovy
src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig/help-dockerLabel.html
src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig/config.groovy
src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig/help-dockerLabel.html
src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/steps/DockerLabelStepTest.java
src/test/resources/agentDockerEnvSpecLabel.groovy
src/test/resources/agentDockerEnvTest.groovy
src/test/resources/dockerLabel.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/5adc8cd8ec379b610e5c3602f8c415ffeb598a27
Log:
JENKINS-39109 Add a configuration option for what label to use for docker agents

This adds a folder property and a global configuration where the administrator,
or someone configuring a folder, can specify what label expression to use with
a pipeline with agent docker: "" and omitting the label.
The folder property can be specified on any folder in the hierarchy and the closest
parent to the run is consulted first and then up the tree, lastly the global configuration
is consulted for a value.
An extension point is also introduced with specified ordinals for the existing extensions
with ample room to spare in between in case something wants to jump in between.
Lastly a step that returns the value of the extension point that first returns a non null value.

rsandell@cloudbees.com (JIRA)

unread,
Oct 19, 2016, 10:43:01 AM10/19/16
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
Oct 20, 2016, 11:02:02 AM10/20/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Andrew Bayer
Path:
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Agent.groovy
pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/config/DockerLabelProvider.java
pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig.java
pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig.java
pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/steps/DockerLabelStep.java
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig/config.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig/help-dockerLabel.html
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig/config.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig/help-dockerLabel.html
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/steps/DockerLabelStepTest.java
pipeline-model-definition/src/test/resources/agentDockerEnvSpecLabel.groovy
pipeline-model-definition/src/test/resources/agentDockerEnvTest.groovy
pipeline-model-definition/src/test/resources/dockerLabel.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/abbde740b9b603f5fd9d56302c300ab5db6c22cf
Log:
Merge pull request #31 from jenkinsci/dockerlabel

JENKINS-39109 Add a configuration option for what label to use for docker agents

andrew.bayer@gmail.com (JIRA)

unread,
Oct 25, 2016, 11:18:02 AM10/25/16
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:59 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages