drop overriding .env values with CI parameters

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-11-05 11:58:56 +01:00
parent 05ee65b6fa
commit a6c2518de7
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 0 additions and 11 deletions

View File

@ -144,17 +144,6 @@ def updateEnv(type) {
envFile = "${env.WORKSPACE}/.env.${type}"
}
sh "ln -sf ${envFile} .env"
/* find a list of .env settings to check for them in params */
def envContents = readFile(envFile)
def envLines = envContents.split()
def envVars = envLines.collect { it.split('=').first() }
/* for each var available in params modify the .env file */
envVars.each { var ->
if (params.get(var)) { /* var exists in params and is not empty */
println("Changing setting: ${var}=${params.get(var)}")
sh "sed -i'.bkp' 's/${var}=.*/${var}=${params.get(var)}/' ${envFile}"
}
}
/* show contents for debugging purposes */
sh "cat ${envFile}"
}