Parse colors in output with ansi-color plugin.

master
Icedream 2018-05-07 20:31:54 +02:00
parent f110d78447
commit 828cc82bd5
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 15 additions and 11 deletions

6
Jenkinsfile vendored
View File

@ -22,12 +22,15 @@ node("docker && linux && amd64") {
def tomcatVersion = version[0] def tomcatVersion = version[0]
def jreVersion = version[1] def jreVersion = version[1]
def guacamoleVersion ansiColor {
def image = docker.build( def image = docker.build(
"${dockerNamespace}/${dockerBase}:tomcat${tomcatVersion}-jre${jreVersion}", "${dockerNamespace}/${dockerBase}:tomcat${tomcatVersion}-jre${jreVersion}",
"--build-arg TOMCAT_VERSION=${tomcatVersion} --build-arg JRE_VERSION=${jreVersion} .") "--build-arg TOMCAT_VERSION=${tomcatVersion} --build-arg JRE_VERSION=${jreVersion} .")
}
def guacamoleVersion
image.inside("-w /tmp") { image.inside("-w /tmp") {
ansiColor {
sh """ sh """
unzip /opt/guacamole/guacamole.war META-INF/maven/org.apache.guacamole/guacamole/pom.properties unzip /opt/guacamole/guacamole.war META-INF/maven/org.apache.guacamole/guacamole/pom.properties
""" """
@ -36,6 +39,7 @@ node("docker && linux && amd64") {
returnStdout: true, returnStdout: true,
).trim() ).trim()
} }
}
def imageTag = "${dockerNamespace}/${dockerBase}:${guacamoleVersion}-tomcat${tomcatVersion}-jre${jreVersion}" def imageTag = "${dockerNamespace}/${dockerBase}:${guacamoleVersion}-tomcat${tomcatVersion}-jre${jreVersion}"
images << [ image, imageFullName ] images << [ image, imageFullName ]