forked from jenkinsci/acceptance-test-harness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ec2.groovy
54 lines (41 loc) · 1.84 KB
/
ec2.groovy
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
import org.jenkinsci.test.acceptance.PublicKeyAuthenticator
import org.jenkinsci.test.acceptance.controller.*
import org.jenkinsci.test.acceptance.guice.TestScope
import org.jenkinsci.test.acceptance.machine.Ec2Provider
import org.jenkinsci.test.acceptance.machine.JenkinsProvider
import org.jenkinsci.test.acceptance.machine.RemoteJenkinsProvider
import org.jenkinsci.test.acceptance.machine.MachineProvider
import org.jenkinsci.test.acceptance.machine.MultitenancyMachineProvider
import org.jenkinsci.test.acceptance.resolver.JenkinsDownloader
import org.jenkinsci.test.acceptance.resolver.JenkinsResolver
import org.jenkinsci.test.acceptance.slave.SlaveProvider
import org.jenkinsci.test.acceptance.slave.SshSlaveProvider
def localWar = new File("jenkins.war")
def common = module {
bind(org.jenkinsci.test.acceptance.Authenticator).named("publicKeyAuthenticator").to(PublicKeyAuthenticator)
jenkins_md5_sum="b6aacb5f25a323120f8c791fe2d947b9"
bind JenkinsResolver toInstance new JenkinsDownloader("http://mirrors.jenkins-ci.org/war/latest/jenkins.war")
// bind JenkinsResolver toInstance new JenkinsUploader(localWar)
}
slaves = subworld {
maxMtMachines=30
maxNumOfMachines=1
install(common)
user="ubuntu"
bind MachineProvider to MultitenancyMachineProvider
bind MachineProvider named "raw" to Ec2Provider
}
masters = subworld {
maxMtMachines=2
maxNumOfMachines=1
install(common)
user="ubuntu"
bind MachineProvider to MultitenancyMachineProvider
bind MachineProvider named "raw" to Ec2Provider
}
joc = subworld {
bind JenkinsController toInstance new WinstoneController(localWar)
}
bind SlaveProvider toProvider slaves[SshSlaveProvider]
bind(JenkinsProvider).named("masters").toProvider(masters[RemoteJenkinsProvider])
bind(JenkinsController).named("joc").toProvider(joc[JenkinsController]).in(TestScope)