-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins.xml
167 lines (148 loc) · 4.84 KB
/
jenkins.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description>Build and test a meteor app</description>
<logRotator>
<daysToKeep>60</daysToKeep>
<numToKeep>-1</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>20</artifactNumToKeep>
</logRotator>
<keepDependencies>false</keepDependencies>
<properties>
<nectar.plugins.rbac.groups.JobProxyGroupContainer>
<groups/>
</nectar.plugins.rbac.groups.JobProxyGroupContainer>
<com.cloudbees.jenkins.plugins.PublicKey/>
<com.cloudbees.plugins.deployer.DeployNowJobProperty>
<oneClickDeploy>false</oneClickDeploy>
<configuration>
<user>(jenkins)</user>
<account>${account}</account>
<deployables/>
</configuration>
</com.cloudbees.plugins.deployer.DeployNowJobProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<name></name>
<refspec></refspec>
<url>${repositoryUrl}</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>**</name>
</hudson.plugins.git.BranchSpec>
</branches>
<disableSubmodules>false</disableSubmodules>
<recursiveSubmodules>false</recursiveSubmodules>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<authorOrCommitter>false</authorOrCommitter>
<clean>false</clean>
<wipeOutWorkspace>false</wipeOutWorkspace>
<pruneBranches>false</pruneBranches>
<remotePoll>false</remotePoll>
<ignoreNotifyCommit>false</ignoreNotifyCommit>
<useShallowClone>false</useShallowClone>
<buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
<gitTool>Default</gitTool>
<submoduleCfg class="list"/>
<relativeTargetDir></relativeTargetDir>
<reference></reference>
<excludedRegions></excludedRegions>
<excludedUsers></excludedUsers>
<gitConfigName></gitConfigName>
<gitConfigEmail></gitConfigEmail>
<skipTag>false</skipTag>
<includedRegions></includedRegions>
<scmName></scmName>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<jdk>(Default)</jdk>
<triggers class="vector">
<com.cloudbees.jenkins.forge.ForgePushTrigger>
<spec></spec>
</com.cloudbees.jenkins.forge.ForgePushTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>export DISPLAY=:1
Xvfb :1 &
#
# Fetch and install the dependencies
#
node_version=v0.8.21
install_name=node-$node_version-linux-x64
node_home=$PWD/$install_name
if [ ! -e $install_name.tar.gz ]
then
wget -nv http://nodejs.org/dist/$node_version/$install_name.tar.gz
tar xf $install_name.tar.gz
git clone git://github.com/meteor/meteor.git
meteor/meteor --version
cd tests
git clone https://github.com/jgonera/webspecter.git --recursive
$node_home/bin/npm install phantomjs
fi
#
# run the Integration tests (this requires a server running, and selenium wd)
#
# Start meteor app
cd $WORKSPACE/todos
$WORKSPACE/meteor/meteor &
METEOR_PID=$!
sleep 5
# run integration tests and shutdown
cd $WORKSPACE/tests
PATH=$PATH:node_modules/phantomjs/bin
PATH=$PATH:$node_home/bin
PATH=$PATH:webspecter/bin
webspecter -R xunit integration.coffee > $WORKSPACE/test.out.xml
kill -s TERM $METEOR_PID
#
# Meteor bundle and rezip for cloudbees
#
cd $WORKSPACE
rm -rf bundle bundle.tar.gz
cd todos
$WORKSPACE/meteor/meteor bundle ../bundle.tar.gz
cd $WORKSPACE
tar xf bundle.tar.gz
cd bundle
rm -rf ../target
mkdir -p ../target
rm -rf ../target/app.zip
zip -rq ../target/app.zip *</command>
</hudson.tasks.Shell>
<com.cloudbees.plugins.deployer.DeployBuilder>
<configuration>
<user>(jenkins)</user>
<account>${account}</account>
<deployables>
<com.cloudbees.plugins.deployer.deployables.WildcardMatchingDeployable>
<applicationId>${applicationName}</applicationId>
<applicationEnvironment></applicationEnvironment>
<applicationConfig/>
<apiEndPoint>https://api.cloudbees.com/api</apiEndPoint>
<filePattern>target/*.zip</filePattern>
</com.cloudbees.plugins.deployer.deployables.WildcardMatchingDeployable>
</deployables>
</configuration>
</com.cloudbees.plugins.deployer.DeployBuilder>
</builders>
<publishers>
<hudson.tasks.junit.JUnitResultArchiver>
<testResults>test.out.xml</testResults>
<keepLongStdio>false</keepLongStdio>
<testDataPublishers/>
</hudson.tasks.junit.JUnitResultArchiver>
</publishers>
<buildWrappers/>
</project>