ci: fix runtime available log level (#2191)

Closes: https://github.com/waku-org/nwaku/issues/2107
This commit is contained in:
Anton Iakimov 2023-11-08 13:54:55 +01:00 committed by GitHub
parent d7ef3ca192
commit ea6200dd0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.6.0'
pipeline {

View File

@ -42,9 +42,10 @@ pipeline {
'-d:postgres',
].join(' ')
)
string(
name: "LOG_LEVEL",
description: "Chronicles log level (default: TRACE)",
choice(
name: "LOWEST_LOG_LEVEL_ALLOWED",
choces: ['TRACE', 'DEGUG', 'INFO', 'NOTICE', 'WARN', 'ERROR', 'FATAL'],
description: "Defines the log level, which will be available at runtime (Chronicles log level)",
)
booleanParam(
name: 'DEBUG',
@ -61,7 +62,7 @@ pipeline {
"--label=commit='${env.GIT_COMMIT.take(8)}' " +
"--build-arg=MAKE_TARGET='${params.MAKE_TARGET}' " +
"--build-arg=NIMFLAGS='${params.NIMFLAGS}' " +
(params.LOG_LEVEL != null ? "--build-arg=LOG_LEVEL='${params.LOG_LEVEL}' ": "") +
"--build-arg=LOG_LEVEL='${params.LOWEST_LOG_LEVEL_ALLOWED}' " +
"--target=${params.DEBUG ? "debug" : "prod"} ."
)
} }