Skip to content

Commit

Permalink
fix conditions, add bdd
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Jan 19, 2025
1 parent 7a9ccaf commit f77ac27
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/ru/pulsar/jenkins/library/steps/ZipInfobase.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ class ZipInfobase implements Serializable {

def archiveInfobaseOptions = getArchiveInfobaseOptionsForStage(config, stage)

def archiveName
if (stage == 'initInfoBase') {
archiveName = "1Cv8.1CD.zip"
} else {
archiveName = "1Cv8.1CD.${stage}.zip"
}

// опция отвечает только за то, будет ли файл сохранен в виде артефакта
def archiveInfobase = false
if (archiveInfobaseOptions.onAlways
|| (archiveInfobaseOptions.onFailure && (currentResult == Result.FAILURE || currentResult == Result.ABORTED))
Expand All @@ -35,12 +43,6 @@ class ZipInfobase implements Serializable {
archiveInfobase = true
}

def archiveName
if (!stage) {
archiveName = "1Cv8.1CD.zip"
} else {
archiveName = "1Cv8.1CD.${stage}.zip"
}
steps.zip('build/ib', archiveName, '1Cv8.1CD', archiveInfobase)
steps.stash(archiveName, archiveName, false)
}
Expand Down
12 changes: 11 additions & 1 deletion vars/pipeline1C.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void call() {
timeout(time: config.timeoutOptions.zipInfoBase, unit: TimeUnit.MINUTES) {
printLocation()

zipInfobase config
zipInfobase config, 'initInfoBase'
}
}
}
Expand Down Expand Up @@ -237,6 +237,16 @@ void call() {
}
}
}

stage('Архивация ИБ') {
steps {
timeout(time: config.timeoutOptions.zipInfoBase, unit: TimeUnit.MINUTES) {
printLocation()

zipInfobase config, 'bdd'
}
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion vars/zipInfobase.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ru.pulsar.jenkins.library.configuration.JobConfiguration
import ru.pulsar.jenkins.library.ioc.ContextRegistry
import ru.pulsar.jenkins.library.steps.ZipInfobase

def call(JobConfiguration config, String stageName = '') {
def call(JobConfiguration config, String stageName) {
ContextRegistry.registerDefaultContext(this)

def zipInfobase = new ZipInfobase(config, stageName)
Expand Down

0 comments on commit f77ac27

Please sign in to comment.