Skip to content
Permalink
Browse files
[FIXED JENKINS-7825]
Exposed the UI that sets the assigned label of matrix projects.
This deprecates the "Matrix tie parent" plugin.
  • Loading branch information
kohsuke committed Jun 20, 2013
1 parent edb9bc5 commit d35f0d55d3343a499900cc5bc45d004726a224b7
Showing with 292 additions and 10 deletions.
  1. +3 −0 changelog.html
  2. +1 −1 core/src/main/java/hudson/model/Queue.java
  3. +1 −0 core/src/main/java/jenkins/model/Jenkins.java
  4. +1 −0 core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly
  5. +9 −0 core/src/main/resources/hudson/matrix/MatrixProject/help-slaveAffinity.html
  6. +1 −9 core/src/main/resources/hudson/model/AbstractItem/configure-common.jelly
  7. 0 ...ect-config/slave.html → core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity.html
  8. 0 ...nfig/slave_de.html → core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity_de.html
  9. 0 ...nfig/slave_fr.html → core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity_fr.html
  10. 0 ...nfig/slave_ja.html → core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity_ja.html
  11. 0 ...lave_pt_BR.html → core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity_pt_BR.html
  12. 0 ...nfig/slave_ru.html → core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity_ru.html
  13. 0 ...nfig/slave_tr.html → core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity_tr.html
  14. 0 ...lave_zh_TW.html → core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity_zh_TW.html
  15. +38 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel.jelly
  16. +25 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel.properties
  17. +23 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel_bg.properties
  18. +24 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel_da.properties
  19. +24 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel_de.properties
  20. +24 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel_es.properties
  21. +24 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel_ja.properties
  22. +23 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel_pt_BR.properties
  23. +23 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel_ru.properties
  24. +23 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel_tr.properties
  25. +25 −0 core/src/main/resources/lib/hudson/project/config-assignedLabel_zh_TW.properties
@@ -55,6 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=rfe>
Matrix project's parent can be now tied to labels/slaves.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-7825">issue 7825</a>)
<li class=bug>
Clean up fingerprint records that correspond to the deleted build recods
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-18417">issue 18417</a>)
@@ -1812,7 +1812,7 @@ public CauseOfBlockage getCauseOfBlockage() {
else return new BecauseNodeIsBusy(nodes.iterator().next());
}
} else {
CauseOfBlockage c = null;
CauseOfBlockage c;
for (Node node : allNodes) {
if (node.toComputer().isPartiallyIdle()) {
c = canTake(node);
@@ -66,6 +66,7 @@
import hudson.model.NoFingerprintMatch;
import hudson.model.OverallLoadStatistics;
import hudson.model.Project;
import hudson.model.Queue.BuildableItem;
import hudson.model.Queue.FlyweightTask;
import hudson.model.RestartListener;
import hudson.model.RootAction;
@@ -34,6 +34,7 @@ THE SOFTWARE.

<f:section title="${%Advanced Project Options}">
<f:advanced>
<p:config-assignedLabel />
<p:config-quietPeriod />
<p:config-retryCount />
<p:config-blockWhenUpstreamBuilding />
@@ -0,0 +1,9 @@
<div>
A matrix project needs to first execute what we call the "parent build", which checks out
a copy of the source tree and capture its state to ensure all the individual builds will
check out the same state.

<p>
If you need to control where this parent build runs, please use this option to specify
its label/slave.
</div>
@@ -45,15 +45,7 @@ THE SOFTWARE.
</f:entry>
</j:if>

<!-- master/slave -->
<j:if test="${app.labels.size() gt 1 || app.clouds.size() gt 0 || (it.assignedLabel!=null and it.assignedLabel!=app.selfLabel)}">
<f:optionalBlock name="hasSlaveAffinity" title="${%Restrict where this project can be run}" checked="${it.assignedLabel!=null}"
help="/help/project-config/slave.html">
<f:entry title="${%Label Expression}" field="assignedLabelString">
<f:textbox autoCompleteDelimChar=" "/>
</f:entry>
</f:optionalBlock>
</j:if>
<p:config-assignedLabel />

<f:section title="${%Advanced Project Options}">
<f:advanced>
@@ -0,0 +1,38 @@
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

<!--
Configuration for the assigned label
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<!-- master/slave -->
<j:if test="${app.labels.size() gt 1 || app.clouds.size() gt 0 || (it.assignedLabel!=null and it.assignedLabel!=app.selfLabel)}">
<f:optionalBlock name="hasSlaveAffinity" title="${%Restrict where this project can be run}" checked="${it.assignedLabel!=null}" field="slaveAffinity">
<f:entry title="${%Label Expression}" field="assignedLabelString">
<f:textbox autoCompleteDelimChar=" "/>
</f:entry>
</f:optionalBlock>
</j:if>
</j:jelly>
@@ -0,0 +1,25 @@
# The MIT License
#
# Copyright (c) 2004-2012, Sun Microsystems, Inc., Kohsuke Kawaguchi, Eric Lefevre-Ardant
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

default.value=(Default)
Advanced\ Project\ Options=Advanced Project Options
Display\ Name=Display Name
@@ -0,0 +1,23 @@
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Restrict\ where\ this\ project\ can\ be\ run=\u041E\u0433\u0440\u0430\u043D\u0438\u0447\u0438 \u043A\u044A\u0434\u0435 \u0434\u0430 \u0441\u0435 \u043F\u0443\u0441\u043A\u0430 \u0442\u043E\u0437\u0438 \u043F\u0440\u043E\u0435\u043A\u0442
@@ -0,0 +1,24 @@
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc. Kohsuke Kawaguchi. Knud Poulsen.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Label\ Expression=Etiketudtryk
Restrict\ where\ this\ project\ can\ be\ run=Begr\u00E6ns hvor dette projekt kan k\u00F8res
@@ -0,0 +1,24 @@
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Simon Wiest
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Restrict\ where\ this\ project\ can\ be\ run=Beschr\u00E4nke, wo dieses Projekt ausgef\u00FChrt werden darf
Label\ Expression=Label-Ausdruck
@@ -0,0 +1,24 @@
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Eric Lefevre-Ardant
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Label\ Expression=Expresi\u00F3n
Restrict\ where\ this\ project\ can\ be\ run=Restringir d\u00F3nde se puede ejecutar este proyecto.
@@ -0,0 +1,24 @@
# The MIT License
#
# Copyright (c) 2004-2012, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Restrict\ where\ this\ project\ can\ be\ run=\u5B9F\u884C\u3059\u308B\u30CE\u30FC\u30C9\u3092\u5236\u9650
Label\ Expression=\u30E9\u30D9\u30EB\u5F0F
@@ -0,0 +1,23 @@
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Reginaldo L. Russinholi, Cleiber Silva
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Tie\ this\ project\ to\ a\ node=Vincular esse projeto a um N\u00F3
@@ -0,0 +1,23 @@
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Mike Salnikov
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Tie\ this\ project\ to\ a\ node=\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442 \u043A \u0443\u0437\u043B\u0443
@@ -0,0 +1,23 @@
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Oguz Dag
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Tie\ this\ project\ to\ a\ node=Bu projeyi bir noda ba\u011Fla
@@ -0,0 +1,25 @@
# The MIT License
#
# Copyright (c) 2004-2013, Sun Microsystems, Inc., Chunghwa Telecom Co., Ltd. and
# Pei-Tang Huang
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Restrict\ where\ this\ project\ can\ be\ run=\u9650\u5236\u5C08\u6848\u57F7\u884C\u7BC0\u9EDE
Label\ Expression=\u6A19\u7C64\u8868\u793A\u5F0F

0 comments on commit d35f0d5

Please sign in to comment.