Parse colors in output with ansi-color plugin.
parent
f110d78447
commit
828cc82bd5
|
@ -22,19 +22,23 @@ node("docker && linux && amd64") {
|
||||||
def tomcatVersion = version[0]
|
def tomcatVersion = version[0]
|
||||||
def jreVersion = version[1]
|
def jreVersion = version[1]
|
||||||
|
|
||||||
|
ansiColor {
|
||||||
|
def image = docker.build(
|
||||||
|
"${dockerNamespace}/${dockerBase}:tomcat${tomcatVersion}-jre${jreVersion}",
|
||||||
|
"--build-arg TOMCAT_VERSION=${tomcatVersion} --build-arg JRE_VERSION=${jreVersion} .")
|
||||||
|
}
|
||||||
|
|
||||||
def guacamoleVersion
|
def guacamoleVersion
|
||||||
def image = docker.build(
|
|
||||||
"${dockerNamespace}/${dockerBase}:tomcat${tomcatVersion}-jre${jreVersion}",
|
|
||||||
"--build-arg TOMCAT_VERSION=${tomcatVersion} --build-arg JRE_VERSION=${jreVersion} .")
|
|
||||||
|
|
||||||
image.inside("-w /tmp") {
|
image.inside("-w /tmp") {
|
||||||
sh """
|
ansiColor {
|
||||||
unzip /opt/guacamole/guacamole.war META-INF/maven/org.apache.guacamole/guacamole/pom.properties
|
sh """
|
||||||
"""
|
unzip /opt/guacamole/guacamole.war META-INF/maven/org.apache.guacamole/guacamole/pom.properties
|
||||||
guacamoleVersion = sh(
|
"""
|
||||||
script: "grep -Po '(?i)^version=\\K.+\\s*\$' META-INF/maven/org.apache.guacamole/guacamole/pom.properties",
|
guacamoleVersion = sh(
|
||||||
returnStdout: true,
|
script: "grep -Po '(?i)^version=\\K.+\\s*\$' META-INF/maven/org.apache.guacamole/guacamole/pom.properties",
|
||||||
).trim()
|
returnStdout: true,
|
||||||
|
).trim()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def imageTag = "${dockerNamespace}/${dockerBase}:${guacamoleVersion}-tomcat${tomcatVersion}-jre${jreVersion}"
|
def imageTag = "${dockerNamespace}/${dockerBase}:${guacamoleVersion}-tomcat${tomcatVersion}-jre${jreVersion}"
|
||||||
|
|
Loading…
Reference in New Issue