forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Jenkinsfile
66 lines (54 loc) · 2.38 KB
/
Jenkinsfile
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
@Library('libpipelines') _
hose {
EMAIL = 'rocket'
BUILDTOOL = 'docker'
DEVTIMEOUT = 120
RELEASETIMEOUT = 80
ATTIMEOUT = 90
INSTALLTIMEOUT = 90
DEV = { config ->
doDocker(conf: config, skipOnPR: false)
}
INSTALLSERVICES = [
['CHROME': ['image': 'selenium/node-chrome-debug:3.9.1',
'volumes': ['/dev/shm:/dev/shm'],
'env': ['HUB_HOST=selenium391.cd','HUB_PORT=4444','SE_OPTS="-browser browserName=chrome,version=64%%JUID "']
]],
]
INSTALLPARAMETERS = """
| -DREMOTE_USER=\$PEM_VMWARE_USER
| -DSELENIUM_GRID=selenium391.cd:4444
| -DFORCE_BROWSER=chrome_64%%JUID
| """.stripMargin().stripIndent()
ATCREDENTIALS = [[TYPE:'sshKey', ID:'PEM_VMWARE']]
INSTALL = { config, params ->
def ENVIRONMENTMAP = stringToMap(params.ENVIRONMENT)
def pempathhetzner = ""
pempathhetzner = """${params.ENVIRONMENT}
|PEM_FILE_PATH=\$PEM_VMWARE_PATH
|""".stripMargin().stripIndent()
def PATHHETZNER = stringToMap(pempathhetzner)
def PATHHETZNERINSTALL = doReplaceTokens(INSTALLPARAMETERS.replaceAll(/\n/, ''), PATHHETZNER)
def pempathvmware = ""
pempathvmware = """${params.ENVIRONMENT}
|PEM_FILE_PATH=\$PEM_VMWARE_KEY
|""".stripMargin().stripIndent()
def PATHVMWARE = stringToMap(pempathvmware)
def PATHVMWAREINSTALL = doReplaceTokens(INSTALLPARAMETERS.replaceAll(/\n/, ' '), PATHVMWARE)
if (config.INSTALLPARAMETERS.contains('GROUPS_DISCOVERY')) {
if (params.ENVIRONMENT.contains('HETZNER_CLUSTER')) {
PATHHETZNERINSTALL = "${PATHHETZNERINSTALL}".replaceAll('-DGROUPS_DISCOVERY', '-Dgroups')
doAT(conf: config, parameters: PATHHETZNERINSTALL, environmentAuth: ENVIRONMENTMAP['HETZNER_CLUSTER'])
} else {
PATHVMWAREINSTALL = "${PATHVMWAREINSTALL}".replaceAll('-DGROUPS_DISCOVERY', '-Dgroups')
doAT(conf: config, parameters: PATHVMWAREINSTALL)
}
} else {
if (params.ENVIRONMENT.contains('HETZNER_CLUSTER')) {
doAT(conf: config, groups: ['nightly'], parameters: PATHHETZNERINSTALL, environmentAuth: ENVIRONMENTMAP['HETZNER_CLUSTER'])
} else {
doAT(conf: config, groups: ['nightly'], parameters: PATHVMWAREINSTALL)
}
}
}
}