In my case, I have a pipeline called setup-upstream to select 4 nodes with the sim-test label and changes to reserved-sim-test-{buildnumber} then trigger the downstream job to call the individual node to run some steps then change its label to sim-test-pre-{buildnumber} if successful.
So the issue is that after sim-test changed to reserved-sim-test-{buildnumber}using:
- def node = Jenkins.instance.getNode({node_name});
- node.setLabelString("reserved-sim-test-{buildnumber}");
- node.save();
I can still access the node by Original label: `{JENKINS_URL}/label/sim-test/ ` and new label: `{JENKINS_URL}/label/reserved-sim-test-{buildnumber}/` from api in a short time.
SomeTests:
Pipeline:
def node = Jenkins.instance.getNode("36.23")
println("Origin lable:"+node.getLabelString())
node.setLabelString("roger")
node.save()
println("New lable:"+node.getLabelString())
def nodes = Jenkins.instance.getLabel("roger").getNodes()
println(nodes)
def nodes2 = Jenkins.instance.getLabel("roger2").getNodes()
println(nodes2)
Output:
10:12:34 Started by user
roger
10:12:34 Replayed
#177
10:12:34 [Pipeline] Start of Pipeline hide
10:12:34 [Pipeline] echo
10:12:34 Origin lable:roger2
10:12:34 [Pipeline] echo
10:12:34 New lable:roger
10:12:34 [Pipeline] echo
10:12:34 [hudson.slaves.DumbSlave[36.23]]
10:12:34 [Pipeline] echo
10:12:34 [hudson.slaves.DumbSlave[36.23]]
10:12:34 [Pipeline] End of Pipeline
10:12:34 Finished: SUCCESS
[JENKINS-71104] The Jenkins core setLabelString() method changes the original label but still can be reached by the origin label
Description |
Original:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{reserved-sim-test-\{buildnumber}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{sim-test-pre-\{buildnumber}}} if successful.
So the issue is that after {{sim-test}} changed to {{{}reserved-sim-test-\{buildnumber}{}}}, I can both access the node by {{{JENKINS_URL}/label/sim-test/}} and {{{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/}} in a short time. |
New:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{{}reserved-sim-test-\{buildnumber}{{}}}}, I can both access the node by \{JENKINS_URL}/label/sim-test/ and \{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/ in a short time. |
Description |
Original:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{{}reserved-sim-test-\{buildnumber}{{}}}}, I can both access the node by \{JENKINS_URL}/label/sim-test/ and \{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/ in a short time. |
New:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{{}reserved-sim-test-\{buildnumber}{}}}, I can both access the node by \{JENKINS_URL}/label/sim-test/ and \{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/ in a short time. |
Description |
Original:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{{}reserved-sim-test-\{buildnumber}{}}}, I can both access the node by \{JENKINS_URL}/label/sim-test/ and \{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/ in a short time. |
New:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}) * node.setLabelString("{{{}reserved-sim-test-\{buildnumber}{}}}") * node.save() I can still access the node by \{JENKINS_URL}/label/sim-test/ -> (Original label) and \{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/ -> (new label) from api in a short time. |
Description |
Original:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}) * node.setLabelString("{{{}reserved-sim-test-\{buildnumber}{}}}") * node.save() I can still access the node by \{JENKINS_URL}/label/sim-test/ -> (Original label) and \{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/ -> (new label) from api in a short time. |
New:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}) * node.setLabelString("{{{}reserved-sim-test-\{buildnumber}{}}}") * node.save() I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. |
Description |
Original:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}) * node.setLabelString("{{{}reserved-sim-test-\{buildnumber}{}}}") * node.save() I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. |
New:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}) * node.setLabelString("{{{}reserved-sim-test-\{buildnumber};{}}}") * node.save() I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. |
Description |
Original:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}) * node.setLabelString("{{{}reserved-sim-test-\{buildnumber};{}}}") * node.save() I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. |
New:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}); * node.setLabelString("{{{}reserved-sim-test-\{buildnumber};{}}}") * node.save(); I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. |
Description |
Original:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}); * node.setLabelString("{{{}reserved-sim-test-\{buildnumber};{}}}") * node.save(); I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. |
New:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}); * node.setLabelString("{{{}reserved-sim-test-\{buildnumber}{}}}"); * node.save(); I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. |
Description |
Original:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}); * node.setLabelString("{{{}reserved-sim-test-\{buildnumber}{}}}"); * node.save(); I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. |
New:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}); * node.setLabelString("reserved-sim-test-\{buildnumber}"); * node.save(); I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. SomeTests: Pipeline: def node = Jenkins.instance.getNode("36.23") println("Origin lable:"+node.getLabelString()) node.setLabelString("roger") node.save() println("New lable:"+node.getLabelString()) def nodes = Jenkins.instance.getLabel("roger").getNodes() println(nodes) def nodes2 = Jenkins.instance.getLabel("roger2").getNodes() println(nodes2) Output: *10:12:34* Started by user [roger|http://192.168.39.7:8080/user/roger] *10:12:34* Replayed [#177|http://192.168.39.7:8080/job/test_roger/177/] *10:12:34* [Pipeline] Start of Pipeline ([hide|http://192.168.39.7:8080/job/test_roger/178/console#])*10:12:34* [Pipeline] echo*10:12:34* Origin lable:roger2*10:12:34* [Pipeline] echo*10:12:34* New lable:roger*10:12:34* [Pipeline] echo*10:12:34* [hudson.slaves.DumbSlave[36.23]]*10:12:34* [Pipeline] echo*10:12:34* [hudson.slaves.DumbSlave[36.23]]*10:12:34* [Pipeline] End of Pipeline*10:12:34* Finished: SUCCESS |
Description |
Original:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}); * node.setLabelString("reserved-sim-test-\{buildnumber}"); * node.save(); I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. SomeTests: Pipeline: def node = Jenkins.instance.getNode("36.23") println("Origin lable:"+node.getLabelString()) node.setLabelString("roger") node.save() println("New lable:"+node.getLabelString()) def nodes = Jenkins.instance.getLabel("roger").getNodes() println(nodes) def nodes2 = Jenkins.instance.getLabel("roger2").getNodes() println(nodes2) Output: *10:12:34* Started by user [roger|http://192.168.39.7:8080/user/roger] *10:12:34* Replayed [#177|http://192.168.39.7:8080/job/test_roger/177/] *10:12:34* [Pipeline] Start of Pipeline ([hide|http://192.168.39.7:8080/job/test_roger/178/console#])*10:12:34* [Pipeline] echo*10:12:34* Origin lable:roger2*10:12:34* [Pipeline] echo*10:12:34* New lable:roger*10:12:34* [Pipeline] echo*10:12:34* [hudson.slaves.DumbSlave[36.23]]*10:12:34* [Pipeline] echo*10:12:34* [hudson.slaves.DumbSlave[36.23]]*10:12:34* [Pipeline] End of Pipeline*10:12:34* Finished: SUCCESS |
New:
In my case, I have a pipeline called {{setup-upstream}} to select 4 nodes with the {{sim-test}} label and changes to {{{}reserved-sim-test-{buildnumber{}}}} then trigger the downstream job to call the individual node to run some steps then change its label to {{{}sim-test-pre-{buildnumber{}}}} if successful.
So the issue is that after {{sim-test}} changed to {{reserved-sim-test-\{buildnumber}using:}} * def node = Jenkins.instance.getNode(\{node_name}); * node.setLabelString("reserved-sim-test-\{buildnumber}"); * node.save(); I can still access the node by Original label: `\{JENKINS_URL}/label/sim-test/ ` and new label: `\{JENKINS_URL}/label/reserved-sim-test-\{buildnumber}/` from api in a short time. SomeTests: Pipeline: def node = Jenkins.instance.getNode("36.23") println("Origin lable:"+node.getLabelString()) node.setLabelString("roger") node.save() println("New lable:"+node.getLabelString()) def nodes = Jenkins.instance.getLabel("roger").getNodes() println(nodes) def nodes2 = Jenkins.instance.getLabel("roger2").getNodes() println(nodes2) Output: *10:12:34* Started by user [roger|http://192.168.39.7:8080/user/roger] *10:12:34* Replayed [#177|http://192.168.39.7:8080/job/test_roger/177/] *10:12:34* [Pipeline] Start of Pipeline ([hide|http://192.168.39.7:8080/job/test_roger/178/console#]) *10:12:34* [Pipeline] echo *10:12:34* Origin lable:roger2 *10:12:34* [Pipeline] echo *10:12:34* New lable:roger *10:12:34* [Pipeline] echo *10:12:34* [hudson.slaves.DumbSlave[36.23]] *10:12:34* [Pipeline] echo *10:12:34* [hudson.slaves.DumbSlave[36.23]] *10:12:34* [Pipeline] End of Pipeline *10:12:34* Finished: SUCCESS |