Add 'last-completed' to copyartifact 'which-build' values
Change-Id: I4ae84f7ca2d8d28195d6590c7a25d6c8886cde77
This commit is contained in:
parent
74c8ac4561
commit
51a18754c6
@ -109,6 +109,7 @@ def copyartifact(parser, xml_parent, data):
|
|||||||
parameters (optional)
|
parameters (optional)
|
||||||
:which-build values:
|
:which-build values:
|
||||||
* **last-successful**
|
* **last-successful**
|
||||||
|
* **last-completed**
|
||||||
* **specific-build**
|
* **specific-build**
|
||||||
* **last-saved**
|
* **last-saved**
|
||||||
* **upstream-build**
|
* **upstream-build**
|
||||||
@ -143,6 +144,7 @@ def copyartifact(parser, xml_parent, data):
|
|||||||
XML.SubElement(t, 'parameters').text = data.get("parameter-filters", "")
|
XML.SubElement(t, 'parameters').text = data.get("parameter-filters", "")
|
||||||
select = data.get('which-build', 'last-successful')
|
select = data.get('which-build', 'last-successful')
|
||||||
selectdict = {'last-successful': 'StatusBuildSelector',
|
selectdict = {'last-successful': 'StatusBuildSelector',
|
||||||
|
'last-completed': 'LastCompletedBuildSelector',
|
||||||
'specific-build': 'SpecificBuildSelector',
|
'specific-build': 'SpecificBuildSelector',
|
||||||
'last-saved': 'SavedBuildSelector',
|
'last-saved': 'SavedBuildSelector',
|
||||||
'upstream-build': 'TriggeredBuildSelector',
|
'upstream-build': 'TriggeredBuildSelector',
|
||||||
|
14
tests/builders/fixtures/copy-artifact002.xml
Normal file
14
tests/builders/fixtures/copy-artifact002.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<builders>
|
||||||
|
<hudson.plugins.copyartifact.CopyArtifact>
|
||||||
|
<project>foo</project>
|
||||||
|
<filter>*.txt</filter>
|
||||||
|
<target>/home/foo</target>
|
||||||
|
<flatten>true</flatten>
|
||||||
|
<optional>true</optional>
|
||||||
|
<parameters>PUBLISH=true</parameters>
|
||||||
|
<selector class="hudson.plugins.copyartifact.LastCompletedBuildSelector"/>
|
||||||
|
</hudson.plugins.copyartifact.CopyArtifact>
|
||||||
|
</builders>
|
||||||
|
</project>
|
9
tests/builders/fixtures/copy-artifact002.yaml
Normal file
9
tests/builders/fixtures/copy-artifact002.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
builders:
|
||||||
|
- copyartifact:
|
||||||
|
project: foo
|
||||||
|
filter: "*.txt"
|
||||||
|
target: /home/foo
|
||||||
|
which-build: last-completed
|
||||||
|
optional: true
|
||||||
|
flatten: true
|
||||||
|
parameter-filters: PUBLISH=true
|
Loading…
x
Reference in New Issue
Block a user