Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def getComputerName() {
- def computer = powershell returnStdout: true, script: '(Get-WmiObject Win32_ComputerSystem).Name', label: 'Get Computer Name'
- return computer.toLowerCase().trim()
- }
- def getNodeDomain() {
- def domain = powershell returnStdout: true, script: '(Get-WmiObject Win32_ComputerSystem).Domain', label: 'Get Computer Domain'
- return domain.toLowerCase().trim()
- }
- def customizeSiteConfiguration() {
- def configPath = "${codeBase}/pipeline/Scripts/Installation/InstallConfig.json"
- println "Loading configuration from: ${configPath}"
- def configFile = readFile(configPath)
- def installConfig = new JsonSlurper().parseText(configFile)
- def computerName = getComputerName()
- def nodeDomain = getNodeDomain()
- installConfig.db_name = "${computerName}_tests"
- installConfig.email_viewer_url = "${computerName}:1080/"
- installConfig.mail_host = "${computerName}"
- installConfig.mail_sent_from_address = "${computerName}@some.com"
- installConfig.mc_domain = "${nodeDomain}"
- installConfig.license = getLicenseKey(computerName, nodeDomain, installConfig.mc_http_port)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement