Add more tests
Change-Id: Ie0e0e3906edaa278805917e6303b1d5f1daba864
This commit is contained in:
parent
2b2037d878
commit
a0dac0f4e7
|
@ -122,18 +122,10 @@ def copyartifact(parser, xml_parent, data):
|
|||
* **last-unsuccessful**
|
||||
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
builders:
|
||||
- copyartifact:
|
||||
project: foo
|
||||
filter: *.tar.gz
|
||||
target: /home/foo
|
||||
which-build: specific-build
|
||||
build-number: 123
|
||||
optional: true
|
||||
flatten: true
|
||||
parameter-filters: PUBLISH=true
|
||||
.. literalinclude:: ../../tests/builders/fixtures/copy-artifact001.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
t = XML.SubElement(xml_parent, 'hudson.plugins.copyartifact.CopyArtifact')
|
||||
# Warning: this only works with copy artifact version 1.26+,
|
||||
|
@ -383,11 +375,10 @@ def builders_from(parser, xml_parent, data):
|
|||
|
||||
:arg str projectName: the name of the other project
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
builders:
|
||||
- builders-from:
|
||||
- project: "base-build"
|
||||
.. literalinclude:: ../../tests/builders/fixtures/builders-from.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
pbs = XML.SubElement(xml_parent,
|
||||
'hudson.plugins.templateproject.ProxyBuilder')
|
||||
|
@ -440,23 +431,10 @@ def artifact_resolver(parser, xml_parent, data):
|
|||
* **target-file-name** (`str`) -- What to name the artifact
|
||||
(default '')
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
builders:
|
||||
- artifact-resolver:
|
||||
fail-on-error: true
|
||||
repository-logging: true
|
||||
target-directory: foo
|
||||
artifacts:
|
||||
- group-id: commons-logging
|
||||
artifact-id: commons-logging
|
||||
version: 1.1
|
||||
classifier: src
|
||||
extension: jar
|
||||
target-file-name: comm-log.jar
|
||||
- group-id: commons-lang
|
||||
artifact-id: commons-lang
|
||||
version: 1.2
|
||||
.. literalinclude:: ../../tests/builders/fixtures/artifact-resolver.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
ar = XML.SubElement(xml_parent,
|
||||
'org.jvnet.hudson.plugins.repositoryconnector.'
|
||||
|
@ -505,22 +483,10 @@ def gradle(parser, xml_parent, data):
|
|||
root) here, such as ${workspace}/parent/ instead of just
|
||||
${workspace}.
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
builders:
|
||||
- gradle:
|
||||
gradle-name: "gradle-1.2"
|
||||
wrapper: true
|
||||
executable: true
|
||||
use-root-dir: true
|
||||
root-build-script-dir: ${workspace}/tests
|
||||
switches:
|
||||
- "-g /foo/bar/.gradle"
|
||||
- "-PmavenUserName=foobar"
|
||||
tasks: |
|
||||
init
|
||||
build
|
||||
tests
|
||||
.. literalinclude:: ../../tests/builders/fixtures/gradle.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
gradle = XML.SubElement(xml_parent, 'hudson.plugins.gradle.Gradle')
|
||||
XML.SubElement(gradle, 'description').text = ''
|
||||
|
@ -570,16 +536,10 @@ def msbuild(parser, xml_parent, data):
|
|||
:arg bool continue-on-build-failure: should the build continue if
|
||||
msbuild returns an error (defaults to false)
|
||||
|
||||
Example::
|
||||
|
||||
builders:
|
||||
- msbuild:
|
||||
solution-file: "MySolution.sln"
|
||||
msbuild-version: "msbuild-4.0"
|
||||
extra-parameters: "/maxcpucount:4"
|
||||
pass-build-variables: False
|
||||
continue-on-build-failure: True
|
||||
Example:
|
||||
|
||||
.. literalinclude:: ../../tests/builders/fixtures/msbuild.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
msbuilder = XML.SubElement(xml_parent,
|
||||
'hudson.plugins.msbuild.MsBuildBuilder')
|
||||
|
@ -855,32 +815,10 @@ def multijob(parser, xml_parent, data):
|
|||
* **predefined-parameters** (`str`) -- Pass predefined
|
||||
parameters to the other job (optional)
|
||||
|
||||
Example::
|
||||
|
||||
builders:
|
||||
- multijob:
|
||||
name: PhaseOne
|
||||
condition: SUCCESSFUL
|
||||
projects:
|
||||
- name: PhaseOneJobA
|
||||
current-parameters: true
|
||||
node-label-name: "vm_name"
|
||||
node-label: "agent-${BUILD_NUMBER}"
|
||||
git-revision: true
|
||||
- name: PhaseOneJobB
|
||||
current-parameters: true
|
||||
property-file: build.props
|
||||
- multijob:
|
||||
name: PhaseTwo
|
||||
condition: UNSTABLE
|
||||
projects:
|
||||
- name: PhaseTwoJobA
|
||||
current-parameters: true
|
||||
predefined-parameters: foo=bar
|
||||
- name: PhaseTwoJobB
|
||||
current-parameters: false
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: ../../tests/builders/fixtures/multibuild.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
builder = XML.SubElement(xml_parent, 'com.tikal.jenkins.plugins.multijob.'
|
||||
'MultiJobBuilder')
|
||||
|
@ -974,26 +912,10 @@ def grails(parser, xml_parent, data):
|
|||
:arg bool refresh-dependencies: append --refresh-dependencies to all
|
||||
build targets (default false)
|
||||
|
||||
Example::
|
||||
|
||||
builders:
|
||||
- grails:
|
||||
use-wrapper: "true"
|
||||
name: "grails-2.2.2"
|
||||
force-upgrade: "true"
|
||||
non-interactive: "true"
|
||||
targets: "war ear"
|
||||
server-port: "8003"
|
||||
work-dir: "./grails-work"
|
||||
project-dir: "./project-work"
|
||||
base-dir: "./grails/project"
|
||||
properties: "program.name=foo"
|
||||
plain-output: "true"
|
||||
stack-trace: "true"
|
||||
verbose: "true"
|
||||
refresh-dependencies: "true"
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: ../../tests/builders/fixtures/grails.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
grails = XML.SubElement(xml_parent, 'com.g2one.hudson.grails.'
|
||||
'GrailsBuilder')
|
||||
|
@ -1040,14 +962,10 @@ def sbt(parser, xml_parent, data):
|
|||
(default '-Dsbt.log.noformat=true')
|
||||
:arg str subdir-path: Path relative to workspace to run sbt in (default '')
|
||||
|
||||
Example::
|
||||
|
||||
builders:
|
||||
- sbt:
|
||||
name: "default"
|
||||
actions: "clean package"
|
||||
jvm-flags: "-Xmx8G"
|
||||
Example:
|
||||
|
||||
.. literalinclude:: ../../tests/builders/fixtures/sbt.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
sbt = XML.SubElement(xml_parent, 'org.jvnet.hudson.plugins.'
|
||||
'SbtPluginBuilder')
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver>
|
||||
<targetDirectory>foo</targetDirectory>
|
||||
<artifacts>
|
||||
<org.jvnet.hudson.plugins.repositoryconnector.Artifact>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<classifier>src</classifier>
|
||||
<version>1.1</version>
|
||||
<extension>jar</extension>
|
||||
<targetFileName>comm-log.jar</targetFileName>
|
||||
</org.jvnet.hudson.plugins.repositoryconnector.Artifact>
|
||||
<org.jvnet.hudson.plugins.repositoryconnector.Artifact>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<classifier/>
|
||||
<version>1.2</version>
|
||||
<extension>jar</extension>
|
||||
<targetFileName/>
|
||||
</org.jvnet.hudson.plugins.repositoryconnector.Artifact>
|
||||
</artifacts>
|
||||
<failOnError>true</failOnError>
|
||||
<enableRepoLogging>true</enableRepoLogging>
|
||||
<snapshotUpdatePolicy>never</snapshotUpdatePolicy>
|
||||
<releaseUpdatePolicy>never</releaseUpdatePolicy>
|
||||
<snapshotChecksumPolicy>warn</snapshotChecksumPolicy>
|
||||
<releaseChecksumPolicy>warn</releaseChecksumPolicy>
|
||||
</org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,15 @@
|
|||
builders:
|
||||
- artifact-resolver:
|
||||
fail-on-error: true
|
||||
repository-logging: true
|
||||
target-directory: foo
|
||||
artifacts:
|
||||
- group-id: commons-logging
|
||||
artifact-id: commons-logging
|
||||
version: "1.1"
|
||||
classifier: src
|
||||
extension: jar
|
||||
target-file-name: comm-log.jar
|
||||
- group-id: commons-lang
|
||||
artifact-id: commons-lang
|
||||
version: "1.2"
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<hudson.plugins.templateproject.ProxyBuilder>
|
||||
<projectName>base-build</projectName>
|
||||
</hudson.plugins.templateproject.ProxyBuilder>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,2 @@
|
|||
builders:
|
||||
- builders-from: "base-build"
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<hudson.plugins.copyartifact.CopyArtifact>
|
||||
<project>foo</project>
|
||||
<filter>*.tar.gz</filter>
|
||||
<target>/home/foo</target>
|
||||
<flatten>true</flatten>
|
||||
<optional>true</optional>
|
||||
<parameters>PUBLISH=true</parameters>
|
||||
<selector class="hudson.plugins.copyartifact.SpecificBuildSelector">
|
||||
<buildNumber>123</buildNumber>
|
||||
</selector>
|
||||
</hudson.plugins.copyartifact.CopyArtifact>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,10 @@
|
|||
builders:
|
||||
- copyartifact:
|
||||
project: foo
|
||||
filter: "*.tar.gz"
|
||||
target: /home/foo
|
||||
which-build: specific-build
|
||||
build-number: "123"
|
||||
optional: true
|
||||
flatten: true
|
||||
parameter-filters: PUBLISH=true
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<hudson.plugins.gradle.Gradle>
|
||||
<description/>
|
||||
<tasks>init
|
||||
build
|
||||
tests
|
||||
</tasks>
|
||||
<buildFile/>
|
||||
<rootBuildScriptDir>${workspace}/tests</rootBuildScriptDir>
|
||||
<gradleName>gradle-1.2</gradleName>
|
||||
<useWrapper>true</useWrapper>
|
||||
<makeExecutable>true</makeExecutable>
|
||||
<switches>-g /foo/bar/.gradle
|
||||
-PmavenUserName=foobar</switches>
|
||||
<fromRootBuildScriptDir>true</fromRootBuildScriptDir>
|
||||
</hudson.plugins.gradle.Gradle>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,14 @@
|
|||
builders:
|
||||
- gradle:
|
||||
gradle-name: "gradle-1.2"
|
||||
wrapper: true
|
||||
executable: true
|
||||
use-root-dir: true
|
||||
root-build-script-dir: ${workspace}/tests
|
||||
switches:
|
||||
- "-g /foo/bar/.gradle"
|
||||
- "-PmavenUserName=foobar"
|
||||
tasks: |
|
||||
init
|
||||
build
|
||||
tests
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<com.g2one.hudson.grails.GrailsBuilder>
|
||||
<targets>war ear</targets>
|
||||
<name>grails-2.2.2</name>
|
||||
<grailsWorkDir>./grails-work</grailsWorkDir>
|
||||
<projectWorkDir>./project-work</projectWorkDir>
|
||||
<projectBaseDir>./grails/project</projectBaseDir>
|
||||
<serverPort>8003</serverPort>
|
||||
<properties>program.name=foo</properties>
|
||||
<forceUpgrade>true</forceUpgrade>
|
||||
<nonInteractive>true</nonInteractive>
|
||||
<useWrapper>true</useWrapper>
|
||||
<plainOutput>true</plainOutput>
|
||||
<stackTrace>true</stackTrace>
|
||||
<verbose>true</verbose>
|
||||
<refreshDependencies>true</refreshDependencies>
|
||||
</com.g2one.hudson.grails.GrailsBuilder>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,16 @@
|
|||
builders:
|
||||
- grails:
|
||||
use-wrapper: "true"
|
||||
name: "grails-2.2.2"
|
||||
force-upgrade: "true"
|
||||
non-interactive: "true"
|
||||
targets: "war ear"
|
||||
server-port: "8003"
|
||||
work-dir: "./grails-work"
|
||||
project-dir: "./project-work"
|
||||
base-dir: "./grails/project"
|
||||
properties: "program.name=foo"
|
||||
plain-output: "true"
|
||||
stack-trace: "true"
|
||||
verbose: "true"
|
||||
refresh-dependencies: "true"
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<hudson.plugins.msbuild.MsBuildBuilder>
|
||||
<msBuildName>msbuild-4.0</msBuildName>
|
||||
<msBuildFile>MySolution.sln</msBuildFile>
|
||||
<cmdLineArgs>/maxcpucount:4</cmdLineArgs>
|
||||
<buildVariablesAsProperties>false</buildVariablesAsProperties>
|
||||
<continueOnBuildFailure>true</continueOnBuildFailure>
|
||||
</hudson.plugins.msbuild.MsBuildBuilder>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,7 @@
|
|||
builders:
|
||||
- msbuild:
|
||||
solution-file: "MySolution.sln"
|
||||
msbuild-version: "msbuild-4.0"
|
||||
extra-parameters: "/maxcpucount:4"
|
||||
pass-build-variables: False
|
||||
continue-on-build-failure: True
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
|
||||
<phaseName>PhaseOne</phaseName>
|
||||
<continuationCondition>SUCCESSFUL</continuationCondition>
|
||||
<phaseJobs>
|
||||
<com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
<jobName>PhaseOneJobA</jobName>
|
||||
<currParams>true</currParams>
|
||||
<configs>
|
||||
<org.jvnet.jenkins.plugins.nodelabelparameter.parameterizedtrigger.NodeLabelBuildParameter>
|
||||
<name>vm_name</name>
|
||||
<nodeLabel>agent-${BUILD_NUMBER}</nodeLabel>
|
||||
</org.jvnet.jenkins.plugins.nodelabelparameter.parameterizedtrigger.NodeLabelBuildParameter>
|
||||
<hudson.plugins.git.GitRevisionBuildParameters>
|
||||
<combineQueuedCommits>false</combineQueuedCommits>
|
||||
</hudson.plugins.git.GitRevisionBuildParameters>
|
||||
</configs>
|
||||
</com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
<com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
<jobName>PhaseOneJobB</jobName>
|
||||
<currParams>true</currParams>
|
||||
<configs>
|
||||
<hudson.plugins.parameterizedtrigger.FileBuildParameters>
|
||||
<propertiesFile>build.props</propertiesFile>
|
||||
<failTriggerOnMissing>true</failTriggerOnMissing>
|
||||
</hudson.plugins.parameterizedtrigger.FileBuildParameters>
|
||||
</configs>
|
||||
</com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
</phaseJobs>
|
||||
</com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
|
||||
<com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
|
||||
<phaseName>PhaseTwo</phaseName>
|
||||
<continuationCondition>UNSTABLE</continuationCondition>
|
||||
<phaseJobs>
|
||||
<com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
<jobName>PhaseTwoJobA</jobName>
|
||||
<currParams>true</currParams>
|
||||
<configs>
|
||||
<hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
|
||||
<properties>foo=bar</properties>
|
||||
</hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
|
||||
</configs>
|
||||
</com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
<com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
<jobName>PhaseTwoJobB</jobName>
|
||||
<currParams>false</currParams>
|
||||
<configs/>
|
||||
</com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
</phaseJobs>
|
||||
</com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,22 @@
|
|||
builders:
|
||||
- multijob:
|
||||
name: PhaseOne
|
||||
condition: SUCCESSFUL
|
||||
projects:
|
||||
- name: PhaseOneJobA
|
||||
current-parameters: true
|
||||
node-label-name: "vm_name"
|
||||
node-label: "agent-${BUILD_NUMBER}"
|
||||
git-revision: true
|
||||
- name: PhaseOneJobB
|
||||
current-parameters: true
|
||||
property-file: build.props
|
||||
- multijob:
|
||||
name: PhaseTwo
|
||||
condition: UNSTABLE
|
||||
projects:
|
||||
- name: PhaseTwoJobA
|
||||
current-parameters: true
|
||||
predefined-parameters: foo=bar
|
||||
- name: PhaseTwoJobB
|
||||
current-parameters: false
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<org.jvnet.hudson.plugins.SbtPluginBuilder>
|
||||
<name>default</name>
|
||||
<jvmFlags>-Xmx8G</jvmFlags>
|
||||
<sbtFlags>-Dsbt.log.noformat=true</sbtFlags>
|
||||
<actions>clean package</actions>
|
||||
<subdirPath/>
|
||||
</org.jvnet.hudson.plugins.SbtPluginBuilder>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,5 @@
|
|||
builders:
|
||||
- sbt:
|
||||
name: "default"
|
||||
actions: "clean package"
|
||||
jvm-flags: "-Xmx8G"
|
Loading…
Reference in New Issue