mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2025-01-09 14:45:27 +02:00
Вынос логгера в отдельный класс
This commit is contained in:
parent
6e0c5885ae
commit
4dccf2d98e
13
src/ru/pulsar/jenkins/library/steps/Logger.groovy
Normal file
13
src/ru/pulsar/jenkins/library/steps/Logger.groovy
Normal file
@ -0,0 +1,13 @@
|
||||
package ru.pulsar.jenkins.library.steps
|
||||
|
||||
import ru.pulsar.jenkins.library.IStepExecutor
|
||||
import ru.pulsar.jenkins.library.ioc.ContextRegistry
|
||||
|
||||
class Logger implements Serializable {
|
||||
static void printLocation() {
|
||||
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor()
|
||||
|
||||
def env = System.getenv();
|
||||
steps.echo("Running on node $env.NODE_NAME")
|
||||
}
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
import ru.pulsar.jenkins.library.steps.Logger
|
||||
|
||||
def call() {
|
||||
echo "Running on node $env.NODE_NAME"
|
||||
Logger.printLocation()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user