Commit ab974ede authored by Josue Martinez Villacorta's avatar Josue Martinez Villacorta
Browse files

ENA-2989 Webin portal, update to use gitlab repo.

parent e84dd7ce
......@@ -20,7 +20,7 @@ enum Environment{
}
ext.version_base = '0.4.2_test'
ext.environment = project.hasProperty('env') ? env : Environment.dev.toString();
ext.environment = project.hasProperty('env') ? env : Environment.dev.toString()
version = version_base + "-$ext.environment"
group = 'uk.ac.ebi.ena.webin-portal'
......@@ -169,34 +169,35 @@ task buildClient(type:NpmTask, dependsOn:'npmInstall'){
def getEnvRemotes() {
def hosts = [] ;
def hosts = []
switch (environment){
case "dev": hosts.add(remotes.dev) ; break;
case "test": hosts.add(remotes.test) ; break;
case "dev": hosts.add(remotes.dev) ; break
case "test": hosts.add(remotes.test) ; break
case "prod":
hosts.add(remotes.prodA) ;
hosts.add(remotes.prodB) ;
break;
hosts.add(remotes.prodA)
hosts.add(remotes.prodB)
break
}
return hosts ;
return hosts
}
def getAngularBuildScript(){
def script = envAngularBuildScriptMap[environment.toString()];
if(script) return script;
def script = envAngularBuildScriptMap[environment.toString()]
if(script) return script
else return envAngularBuildScriptMap['default']
}
task deploy() {
doLast {
doLast{
ssh.run {
println("execute" + "~/ena/generic-deploy.sh $project.name $version $environment $serverPort $serverContextPath")
for (remote in getEnvRemotes()) {
println("execute" + "~/ena/generic-deploy.sh $project.group $project.name $version $environment $serverPort $serverContextPath")
for (remote in getEnvRemotes()){
println("Deploying into: " + remote)
session(remote) {
execute "~/ena/generic-deploy.sh $project.name $version $environment $serverPort $serverContextPath"
execute "~/ena/generic-deploy.sh $project.group $project.name $version $environment $serverPort $serverContextPath"
}
}
}
......@@ -204,7 +205,6 @@ task deploy() {
}
task restartDev(){
doLast{
restart(remotes.dev)
......@@ -257,9 +257,9 @@ def displayInfo(remote){
}
def doGet(url){
def doGet(String url){
try {
println url;
println url
println(new URL(url).text)
}
catch(all){
......@@ -281,9 +281,7 @@ def getBaseURL(remote){
}
def removeLeadingSlash(url){
static def removeLeadingSlash(url){
if(url.substring(0,1) == "/" )return url.substring(1)
return url
}
......@@ -291,11 +289,11 @@ def removeLeadingSlash(url){
def printSetup(){
println()
println("ENVIRONMENT:" + ext.environment);
println("VERSION:" + version);
println("VERSION BASE:" + version_base);
println("GROUP:" + group);
println("KEY FILE::" + ext.sshKeyFile);
println("ENVIRONMENT:" + ext.environment)
println("VERSION:" + version)
println("VERSION BASE:" + version_base)
println("GROUP:" + group)
println("KEY FILE::" + ext.sshKeyFile)
println()
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment