From 93c10f985f2e46777378ddc966a077416222fad7 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Fri, 3 Apr 2020 17:40:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=BA=D0=B8=D0=B4=D0=B0=D1=82=D1=8C=20=D0=B2=D0=BE?= =?UTF-8?q?=D0=B7=D0=B2=D1=80=D0=B0=D1=82=20=D0=BF=D0=B0=D0=B9=D0=BF=D0=BB?= =?UTF-8?q?=D0=B0=D0=B9=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vars/pipeline1C.groovy | 100 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 vars/pipeline1C.groovy diff --git a/vars/pipeline1C.groovy b/vars/pipeline1C.groovy new file mode 100644 index 0000000..5749aad --- /dev/null +++ b/vars/pipeline1C.groovy @@ -0,0 +1,100 @@ +import ru.pulsar.jenkins.library.configuration.JobConfiguration + +import java.util.concurrent.TimeUnit + +void call() { + + def config = jobConfiguration() as JobConfiguration + def agent1C = config.v8version + + //noinspection GroovyAssignabilityCheck + pipeline { + agent none + + options { + buildDiscarder(logRotator(numToKeepStr: '30')) + timeout(time: 2, unit: TimeUnit.HOURS) + timestamps() + } + + environment { + STORAGE_PATH = credentials(jobConfiguration.secrets.storagePath) + STORAGE = credentials(jobConfiguration.secrets.storage) + } + + stages { + + stage('pipeline1C') { + parallel { + stage('SonarQube') { + agent { + label 'sonar' + } + + steps { + log.location() + + sonarScanner() + } + } + + stage('1C') { + agent { + label agent1C + } + + stages { + stage('Подготовка базы') { + steps { + log.location() + + installLocalDependencies() + + dir("build/out") { echo '' } + + script { + def storageVersion = versionParser.storage() + + // Создание базы загрузкой конфигурации из хранилища + cmd "oscript_modules/bin/vrunner init-dev --storage --storage-name $STORAGE_PATH --storage-user $STORAGE_USR --storage-pwd $STORAGE_PSW --storage-ver $storageVersion --ibconnection \"/F./build/ib\"" + } + + zipInfobase() + } + } + + stages { + parallel { + stage('Синтаксический контроль') { + steps { + log.location() + + installLocalDependencies() + + unzipInfobase() + + // Запуск синтакс-проверки + cmd("oscript_modules/bin/vrunner syntax-check --settings tools/vrunner.json", true) + + junit allowEmptyResults: true, testResults: 'build/out/junitsyntax.xml' + } + } + + stage('Дымовые тесты') { + steps { + log.location() + + installLocalDependencies() + + unzipInfobase() + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file