forked from firstBitMarksistskaya/jenkins-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f948c2
commit 117ef58
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/ru/pulsar/jenkins/library/steps/CoverageCleanup.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package ru.pulsar.jenkins.library.steps | ||
|
||
import ru.pulsar.jenkins.library.IStepExecutor | ||
import ru.pulsar.jenkins.library.configuration.JobConfiguration | ||
import ru.pulsar.jenkins.library.ioc.ContextRegistry | ||
import ru.pulsar.jenkins.library.utils.Logger | ||
|
||
class CoverageCleanup implements Serializable { | ||
|
||
private final JobConfiguration config; | ||
|
||
private String encoding = 'UTF-8' | ||
|
||
CoverageCleanup(JobConfiguration config) { | ||
this.config = config | ||
} | ||
|
||
def run() { | ||
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor() | ||
|
||
Logger.printLocation() | ||
|
||
if (steps.isUnix()) { | ||
def command = "pkill Coverage41C && pkill dbgs" | ||
steps.sh(command, false, false, encoding) | ||
} else { | ||
def command = "taskkill /IM Coverage41C /F & taskkill /IM dbgs /F" | ||
steps.sh(command, false, false, encoding) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import ru.pulsar.jenkins.library.configuration.JobConfiguration | ||
import ru.pulsar.jenkins.library.ioc.ContextRegistry | ||
import ru.pulsar.jenkins.library.steps.CoverageCleanup | ||
|
||
def call(JobConfiguration config) { | ||
ContextRegistry.registerDefaultContext(this) | ||
|
||
def coverageCleanup = new CoverageCleanup(config); | ||
coverageCleanup.run() | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters