forked from Stratio/stratio-metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
74 lines (62 loc) · 2.62 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
67
68
69
70
71
72
73
74
@Library('libpipelines@master') _
hose {
EMAIL = 'rocket'
MODULE = 'discovery'
REPOSITORY = 'discovery'
SLACKTEAM = 'data-governance'
BUILDTOOL = 'make'
DEVTIMEOUT = 120
RELEASETIMEOUT = 80
BUILDTOOLVERSION = '3.5.0'
NEW_VERSIONING = 'true'
ATTIMEOUT = 90
INSTALLTIMEOUT = 90
ANCHORE_TEST = false
ANCHORE_POLICY = 'discovery'
PKGMODULESNAMES = ['discovery']
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)
}
}
}
}