forked from jpmonette/q
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
85 lines (77 loc) · 2.74 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:sf="antlib:com.salesforce" default="sf" basedir=".">
<taskdef uri="antlib:com.salesforce" resource="com/salesforce/antlib.xml" classpath="lib/ant-salesforce.jar"/>
<path id="ant.additions.classpath">
<fileset dir="./lib/" includes="*.jar"/>
</path>
<target name="retrieve">
<property file="retrieve.properties" />
<echo>Removing existing metadata from src directory...</echo>
<delete includeemptydirs="true" quiet="false">
<fileset dir=".">
<include name="src/**" />
<exclude name="src/package.xml" />
</fileset>
</delete>
<echo>Retrieving metadata from sandbox with user ${sf.username}...</echo>
<sf:retrieve
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.serverurl}"
maxPoll="${sf.maxPoll}"
retrieveTarget="src"
unpackaged="src/package.xml" />
</target>
<target name="build">
<property environment="env" />
<property file="build.properties" />
<echo>Continuous Integration Build</echo>
<echo>${build.cmd}</echo>
<antcall target="${build.cmd}" />
</target>
<target name="validate">
<echo>Validate and run local tests in Org with username: ${sf.username}</echo>
<taskdef
name="deployWithXmlReport"
classname="com.salesforce.ant.DeployWithXmlReportTask"
classpathref="ant.additions.classpath" />
<deployWithXmlReport
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.serverurl}"
maxPoll="${sf.maxPoll}"
deployRoot="src"
testLevel="RunLocalTests"
junitreportdir="${build.junitreportdir}"
pollWaitMillis="${sf.pollWaitMillis}"
checkOnly="true" />
</target>
<target name="deployAndRunAllTests">
<echo>Deploy and RunAllTests in Org with username: ${sf.username}</echo>
<sf:deploy
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.serverurl}"
maxPoll="${sf.maxPoll}"
deployRoot="${user.dir}/src"
testLevel="${sf.testLevel}" />
</target>
<!-- Retrieve the information of all items of a particular metadata type -->
<target name="listMetadata">
<property file="retrieve.properties" />
<sf:listMetadata
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.serverurl}"
metadataType="${sf.metadataType}"
resultFilePath="metadataList.log" />
</target>
<!-- Retrieve the information on all supported metadata type -->
<target name="describeMetadata">
<property file="retrieve.properties" />
<sf:describeMetadata
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.serverurl}" />
</target>
</project>