mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2024-11-28 09:33:03 +02:00
Спрятал дымовые за флагом
This commit is contained in:
parent
308e5e40f9
commit
fd4aeb4eef
@ -7,7 +7,8 @@
|
||||
"stages": {
|
||||
"sonarqube": false,
|
||||
"syntaxCheck": false,
|
||||
"edtValidate": false
|
||||
"edtValidate": false,
|
||||
"smoke": false
|
||||
},
|
||||
"sonarqube": {
|
||||
"sonarQubeInstallation": "",
|
||||
|
@ -37,6 +37,10 @@
|
||||
"edtValidate" : {
|
||||
"type" : "boolean",
|
||||
"description" : "Валидация EDT включена"
|
||||
},
|
||||
"smoke" : {
|
||||
"type" : "boolean",
|
||||
"description" : "Дымовые тесты включены"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -15,6 +15,9 @@ class StageFlags implements Serializable {
|
||||
@JsonPropertyDescription("Валидация EDT включена")
|
||||
boolean edtValidate
|
||||
|
||||
@JsonPropertyDescription("Дымовые тесты включены")
|
||||
boolean smoke
|
||||
|
||||
@Override
|
||||
@NonCPS
|
||||
String toString() {
|
||||
@ -22,6 +25,7 @@ class StageFlags implements Serializable {
|
||||
"sonarqube=" + sonarqube +
|
||||
", syntaxCheck=" + syntaxCheck +
|
||||
", edtValidate=" + edtValidate +
|
||||
", smoke=" + smoke +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -84,11 +84,7 @@ void call() {
|
||||
|
||||
stage('Дымовые тесты') {
|
||||
steps {
|
||||
printLocation()
|
||||
|
||||
installLocalDependencies()
|
||||
|
||||
unzipInfobase()
|
||||
smoke config
|
||||
}
|
||||
}
|
||||
}
|
||||
|
23
vars/smoke.groovy
Normal file
23
vars/smoke.groovy
Normal file
@ -0,0 +1,23 @@
|
||||
import ru.pulsar.jenkins.library.configuration.JobConfiguration
|
||||
import ru.pulsar.jenkins.library.ioc.ContextRegistry
|
||||
|
||||
def call(JobConfiguration config) {
|
||||
|
||||
ContextRegistry.registerDefaultContext(this)
|
||||
|
||||
// TODO: Вынести в отдельный класс по аналогии с SonarScanner
|
||||
|
||||
printLocation()
|
||||
|
||||
if (!config.stageFlags.smoke) {
|
||||
echo("Smoke tests step is disabled")
|
||||
return
|
||||
}
|
||||
|
||||
def options = config.syntaxCheckOptions
|
||||
|
||||
installLocalDependencies()
|
||||
|
||||
unzipInfobase()
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user