You've already forked jenkins-lib
mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2025-08-25 20:09:25 +02:00
fix start step
This commit is contained in:
@@ -44,7 +44,7 @@ interface IStepExecutor {
|
|||||||
|
|
||||||
def ringCommand(String script)
|
def ringCommand(String script)
|
||||||
|
|
||||||
void start(String script)
|
void start(String executable, String params)
|
||||||
|
|
||||||
void tool(String toolName)
|
void tool(String toolName)
|
||||||
|
|
||||||
|
@@ -76,8 +76,8 @@ class StepExecutor implements IStepExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void start(String script) {
|
void start(String executable, String params) {
|
||||||
steps.start(script)
|
steps.start(executable, params)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -5,20 +5,22 @@ import ru.pulsar.jenkins.library.ioc.ContextRegistry
|
|||||||
|
|
||||||
class Start implements Serializable {
|
class Start implements Serializable {
|
||||||
|
|
||||||
private String script
|
private String executable
|
||||||
|
private String params
|
||||||
private String encoding = 'UTF-8'
|
private String encoding = 'UTF-8'
|
||||||
|
|
||||||
Start(String script) {
|
Start(String executable, String params) {
|
||||||
this.script = script
|
this.executable = executable
|
||||||
|
this.params = params
|
||||||
};
|
};
|
||||||
|
|
||||||
void run() {
|
void run() {
|
||||||
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor()
|
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor()
|
||||||
|
|
||||||
if (steps.isUnix()) {
|
if (steps.isUnix()) {
|
||||||
steps.sh("$script &", false, false , encoding)
|
steps.sh("$executable $params &", false, false , encoding)
|
||||||
} else {
|
} else {
|
||||||
steps.bat("chcp 65001 > nul \nstart $script", false, false, encoding)
|
steps.bat("chcp 65001 > nul \nstart \"\" /B \"$executable\" \"$params\"", false, false, encoding)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -51,8 +51,8 @@ class CoverageUtils {
|
|||||||
|
|
||||||
String dbgsPath = findDbgs(steps, config)
|
String dbgsPath = findDbgs(steps, config)
|
||||||
|
|
||||||
steps.start("${dbgsPath} --addr=127.0.0.1 --port=${coverageContext.port}")
|
steps.start(dbgsPath, "--addr=127.0.0.1 --port=${coverageContext.port}")
|
||||||
steps.start("${coverageOpts.coverage41CPath} start -i DefAlias -u http://127.0.0.1:${coverageContext.port} -P $workspaceDir -s $srcDir -o ${stage.getCoverageStashPath()}")
|
steps.start(coverageOpts.coverage41CPath, "start -i DefAlias -u http://127.0.0.1:${coverageContext.port} -P $workspaceDir -s $srcDir -o ${stage.getCoverageStashPath()}")
|
||||||
steps.cmd("${coverageOpts.coverage41CPath} check -i DefAlias -u http://127.0.0.1:${coverageContext.port}")
|
steps.cmd("${coverageOpts.coverage41CPath} check -i DefAlias -u http://127.0.0.1:${coverageContext.port}")
|
||||||
|
|
||||||
def newDbgsPids = getPIDs("dbgs")
|
def newDbgsPids = getPIDs("dbgs")
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
import ru.pulsar.jenkins.library.steps.Start
|
import ru.pulsar.jenkins.library.steps.Start
|
||||||
import ru.pulsar.jenkins.library.ioc.ContextRegistry
|
import ru.pulsar.jenkins.library.ioc.ContextRegistry
|
||||||
|
|
||||||
void call(String script) {
|
void call(String executable, String params) {
|
||||||
ContextRegistry.registerDefaultContext(this)
|
ContextRegistry.registerDefaultContext(this)
|
||||||
|
|
||||||
Start start = new Start(script)
|
Start start = new Start(executable, params)
|
||||||
start.run()
|
start.run()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user