1
0
mirror of https://github.com/firstBitMarksistskaya/jenkins-lib.git synced 2025-03-17 21:17:50 +02:00

Расширение интерфейса шагов

This commit is contained in:
Nikita Gryzlov 2020-04-15 18:23:00 +03:00
parent c72ac6d893
commit 6e0c5885ae
No known key found for this signature in database
GPG Key ID: C1EAE411FEF0BF2F
2 changed files with 32 additions and 0 deletions

View File

@ -11,4 +11,14 @@ interface IStepExecutor {
String libraryResource(String path)
String readFile(String file, String encoding)
void echo(message)
void cmd(String script, boolean returnStatus)
void cmd(String gString)
void tool(String toolName)
void withSonarQubeEnv(String installationName, Closure body)
}

View File

@ -32,4 +32,26 @@ class StepExecutor implements IStepExecutor {
String readFile(String file, String encoding) {
steps.readFile encoding: encoding, file: file
}
@Override
void echo(Object message) {
steps.echo message
}
@Override
void cmd(String script, boolean returnStatus = false) {
steps.cmd script: script, returnStatus: returnStatus
}
@Override
void tool(String toolName) {
steps.tool toolName
}
@Override
void withSonarQubeEnv(String installationName, Closure body) {
steps.withSonarQubeEnv(installationName) {
body()
}
}
}