Commit f9656c52 authored by Harald Sitter's avatar Harald Sitter 🌼

attempt to infer the type from our own name if at all possible

parent 6b837086
env.DIST = 'xenial'
env.TYPE = params.TYPE
env.PWD_BIND = '/workspace'
if (params.TYPE) {
if (env.TYPE == null) {
if (params.TYPE != null) {
env.TYPE = params.TYPE
} else {
type = inferType()
if (type != null) {
env.TYPE = type
}
}
}
if (env.TYPE == null) {
error 'TYPE param not set. Cannot run install test without a type.'
}
......@@ -54,3 +64,17 @@ def cleanNode(label = null, body) {
}
}
}
// When not called from an ISO build we'll want to infer the type from our own name.
def inferType() {
if (!env.JOB_NAME) {
return null
}
String[] types = ["useredition", "devedition-gitunstable", "devedition-gitstable"]
for (type in types) {
if (env.JOB_NAME.contains(type)) {
return type
}
}
return null
}
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