1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-04-24 20:34:14 +02:00

Переработка структуры каталогов

This commit is contained in:
Anton Titovets
2026-01-23 16:16:46 +03:00
parent aef1a72112
commit 6857f8671d
731 changed files with 15604 additions and 20431 deletions
+432 -432
View File
@@ -1,435 +1,435 @@
{
"primary": {
"description": "Primary project data",
"value": {
"version": {
"description": "Current project version",
"value": "1.32.0"
},
"repoUrl": {
"description": "Repository URL",
"value": "https://github.com/Bayselonarrend/OpenIntegrations"
}
}
},
"local": {
"description": "Paths and information for processing on local machine",
"value": {
"engineWindows": {
"description": "OneScript engine for CLI packs (Windows)",
"value": "C:/engine/windows"
},
"engineLinux": {
"description": "OneScript engine for CLI packs (Linux)",
"value": "C:/engine/linux"
},
"engineLinuxWsl": {
"description": "OneScript engine for CLI packs (Linux, at WSL)",
"value": "/mnt/c/engine/linux/"
},
"onecPath": {
"description": "1C:Enterprise exe path",
"value": "C:/Program Files/1cv8/8.3.18.1208/bin/1cv8.exe"
},
"osPath": {
"description": "OneScript exe path",
"value": "C:/Program Files/OneScript/"
},
"ghcliPath": {
"description": "GitHub CLI exe path",
"value": "C:/Program Files/GitHub CLI/gh.exe"
},
"innoPath": {
"description": "Inno Setup exe path",
"value": "C:/Program Files (x86)/Inno Setup 6/Compil32.exe"
},
"serverName": {
"description": "Build server name",
"value": "DEVSRV"
},
"edtProjectsPath": {
"description": "EDT projects directory",
"value": "C:/Users/bayse/AppData/Local/1C/1cedtstart/projects"
},
"jenkinsHost": {
"description": "Jenkins URL",
"value": "https://jenkins.openintegrations.dev"
},
"rcloneConf": {
"description": "rclone configuration name for web site deploying",
"value": "hoster"
},
"npmPath": {
"description": "NPM executable",
"value": "C:/Program Files/nodejs/npm.cmd"
}
}
},
"paths": {
"description": "Special repository directories paths",
"value": {
"root": {
"description": "Source code root directory",
"value": "./src/"
},
"addinsSrc": {
"description": "AddIns directory",
"value": "./src/addins/"
},
"packageSrc": {
"description": "OneScript package directory",
"value": "./src/ru/OInt/"
},
"packagedefSrc": {
"description": "Packagedef file path",
"value": "./src/ru/OInt/packagedef"
},
"configurationSrc": {
"description": "1C configuration directory",
"value": "./src/ru/OPI/src/"
},
"dictionariesSrc": {
"description": "Translation dictionaries directory",
"value": "./service/dictionaries/"
},
"workflowsSrc": {
"description": "GitHub Actions workflows directory",
"value": "./.github/workflows/"
},
"jenkinsSrc": {
"description": "Jenkinsfiles directory",
"value": "./ci/"
},
"paramsExamplesSrc": {
"description": "CLI tips directory",
"value": "./service/params_examples/"
},
"templatesSrc": {
"description": "CI template files directory",
"value": "./service/templates/"
}
}
},
"docs": {
"description": "Docs generation settings",
"value": {
"deployMainSrc": {
"description": "Primary docs workspace directory",
"value": "./docs/docusaurus/"
},
"deployDocsSrc": {
"description": "MD files at workspace docs directory",
"value": "./docs/docusaurus/docs/"
},
"deployBuildSrc": {
"description": "Deploy-ready docs directory",
"value": "./docs/docusaurus/build/"
},
"deployModulesSrc": {
"description": "Node modules directory",
"value": "./docs/docusaurus/node_modules/"
}
}
},
"tests": {
"description": "Testing data",
"value": {
"yaxunitConf": {
"description": "YaxUnit configurations directory",
"value": "./service/yaxunit_conf/"
},
"jenkinsSplit": {
"description": "Jenkins path for split tests",
"value": "/job/OPITest/job/OpiSplitTests"
},
"jenkinsFull": {
"description": "Jenkins path for full tests",
"value": "/job/OPITest/job/OpiFullTest"
},
"availability": {
"description": "Enabled and disabled tests categories",
"value": {
"Telegram": true,
"VK": true,
"Viber": true,
"Twitter": true,
"FTP": true,
"SSH": true,
"SFTP": true,
"PostgreSQL": true,
"MySQL": true,
"MSSQL": true,
"SQLite": true,
"RCON": true,
"YandexDisk": true,
"GoogleWorkspace": true,
"GoogleCalendar": true,
"GoogleDrive": true,
"GoogleSheets": true,
"Notion": true,
"Slack": true,
"Airtable": true,
"Dropbox": true,
"Bitrix24": true,
"VkTeams": true,
"Neocities": true,
"CDEK": true,
"YandexMetrika": true,
"S3": true,
"TCP": true,
"GreenAPI": true,
"GreenMax": true,
"Ollama": true,
"HTTPКлиент": true,
"OpenAI": false,
"ReportPortal": true,
"HTTPClient": true,
"BuildCheck": true,
"MongoDB": true,
"GRPC": true,
"ClickHouse": true
}
}
}
},
"release": {
"description": "Release producing data",
"value": {
"artifactsCount": {
"description": "Release artifacts (files) count",
"value": 16
}
}
},
"localization": {
"description": "Localization data",
"value": {
"mainLang": {
"description": "Main project language",
"value": "ru"
},
"langs": {
"description": "Localization languages",
"value": [
"en",
"ru"
]
},
"langsVars": {
"description": "Language defined data",
"value": {
"ru": {
"description": "Language defined data for Russian",
"value": {
"edt_project": {
"description": "1C:EDT project name",
"value": "OpenIntegrations_Ru"
},
"ib_name": {
"description": "1C infobase name",
"value": "OpenIntegrations"
},
"methodString": {
"description": "Method word translation",
"value": "Метод"
},
"synonymString": {
"description": "Synonym word translation",
"value": "Синоним"
},
"sectionsString": {
"description": "Section word translation",
"value": "Раздел"
},
"testsModule": {
"description": "Main tests module name",
"value": "OPI_Тесты"
},
"testsModuleCLI": {
"description": "CLI test module name",
"value": "OPI_ТестыCLI"
},
"testsTableMethod": {
"description": "Test table retrieve method",
"value": "OPI_ПолучениеДанныхТестов.ПолучитьТаблицуТестов()"
},
"testsSectionsMethod": {
"description": "Test selections array retrieve method (for Jenkins)",
"value": "OPI_ПолучениеДанныхТестов.ПолучитьСоответствиеРазделовТестирования()"
},
"testsSectionsMethodGA": {
"dictionaries": "Test selections array retrieve method (for Github Actions)",
"value": "OPI_ПолучениеДанныхТестов.ПолучитьСоответствиеРазделовТестированияGA()"
},
"docsMdSrc": {
"description": "Docs MD files directory",
"value": "./docs/ru/md/"
},
"codeExamplesSrc": {
"description": "Docs code examples directory",
"value": "./docs/ru/examples/"
},
"testValuesSrc": {
"description": "Docs test values directory",
"value": "./docs/ru/data/"
},
"testsModulePath": {
"description": "Main tests module path",
"value": "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os"
},
"testsCliModulePath": {
"description": "CLI test module path",
"value": "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os"
},
"testsRegionName": {
"description": "Atomic test retrieve method",
"value": "АтомарныеТесты"
},
"remoteDocsSrc": {
"description": "Docs directory on remote server (hosting)",
"value": "public_html"
},
"namesTranslation": {
"description": "Modules names localization",
"value": {}
},
"docsCategories": {
"description": "Docs categories and classes",
"value": {
"Messenger": "Мессенджеры",
"Social": "Социальные сети",
"Database": "Базы данных и электронные таблицы",
"Folder": "Файловые хостинги и хранилища",
"CRM": "Комплексные решения (CMS, CRM)",
"Commerce": "Электронная коммерция и доставка",
"Calendar": "Планирование и управление проектами",
"AI": "Искусственный интеллект",
"Exchange": "Протоколы обмена",
"Other": "Прочее"
}
}
}
},
"en": {
"description": "Language defined data for English",
"value": {
"edt_project": {
"description": "1C:EDT project name",
"value": "OpenIntegrations_En"
},
"ib_name": {
"description": "1C infobase name",
"value": "OpenIntegrationsEng"
},
"methodString": {
"description": "Method word translation",
"value": "Method"
},
"synonymString": {
"description": "Synonym word translation",
"value": "Synonym"
},
"sectionsString": {
"description": "Section word translation",
"value": "Section"
},
"testsModule": {
"description": "Main tests module name",
"value": "OPI_Tests"
},
"testsModuleCLI": {
"description": "CLI test module name",
"value": "OPI_TestsCLI"
},
"testsTableMethod": {
"description": "Test table retrieve method",
"value": "OPI_TestDataRetrieval.GetTestTable()"
},
"testsSectionsMethod": {
"description": "Test selections array retrieve method (for Jenkins)",
"value": "OPI_TestDataRetrieval.GetTestingSectionMapping()"
},
"testsSectionsMethodGA": {
"dictionaries": "Test selections array retrieve method (for Github Actions)",
"value": "OPI_TestDataRetrieval.GetTestingSectionMappingGA()"
},
"docsMdSrc": {
"description": "Docs MD files directory",
"value": "./docs/en/md/"
},
"codeExamplesSrc": {
"description": "Docs code examples directory",
"value": "./docs/en/examples/"
},
"testValuesSrc": {
"description": "Docs test values directory",
"value": "./docs/en/data/"
},
"testsModulePath": {
"description": "Main tests module path",
"value": "./src/en/OInt/tests/Modules/internal/OPI_Tests.os"
},
"testsCliModulePath": {
"description": "CLI test module path",
"value": "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os"
},
"testsRegionName": {
"description": "Atomic test retrieve method",
"value": "AtomicTests"
},
"remoteDocsSrc": {
"description": "Docs directory on remote server (hosting)",
"value": "public_html_en"
},
"namesTranslation": {
"description": "Modules names localization",
"value": {
"OPI_Инструменты": "OPI_Tools",
"OPI_Криптография": "OPI_Cryptography",
"OPI_HTTPКлиент": "OPI_HTTPClient",
"OPI_Компоненты": "OPI_AddIns",
"OPI_ЗапросыHTTP": "OPI_HTTPRequests",
"OPI_ЗапросыSQL": "OPI_SQLQueries",
"OPI_ПолучениеДанныхТестов": "OPI_TestDataRetrieval",
"OPI_ПреобразованиеТипов": "OPI_TypeConversion"
}
},
"docsCategories": {
"description": "Docs categories and classes",
"value": {
"Messenger": "Messengers",
"Social": "Social networks",
"Database": "Databases and spreadsheets",
"Folder": "File-hosting services and storages",
"CRM": "Complete solutions (CMS, CRM)",
"Commerce": "E-commerce and delivery",
"Calendar": "Planning and projects management",
"AI": "Artificial Intelligence",
"Exchange": "Exchange protocols",
"Other": "Other"
}
}
}
}
}
}
}
},
"replacements": {
"description": "Dictionary of values replacements",
"value": {
"oscriptConvertation": {
"description": "Replacements for 1C to OneScript conversion",
"value": {
"// #Использовать": "#Использовать",
"//#Использовать": "#Использовать",
"УстановитьБезопасныйРежим(Истина);": "",
"УстановитьБезопасныйРежим(Ложь);": "",
"// !OInt ": "",
"#КонецЕсли": "// #КонецЕсли",
"#Если": "// #Если"
}
}
}
"primary": {
"description": "Primary project data",
"value": {
"version": {
"description": "Current project version",
"value": "1.32.0"
},
"repoUrl": {
"description": "Repository URL",
"value": "https://github.com/Bayselonarrend/OpenIntegrations"
}
}
},
"local": {
"description": "Paths and information for processing on local machine",
"value": {
"engineWindows": {
"description": "OneScript engine for CLI packs (Windows)",
"value": "C:/engine/windows"
},
"engineLinux": {
"description": "OneScript engine for CLI packs (Linux)",
"value": "C:/engine/linux"
},
"engineLinuxWsl": {
"description": "OneScript engine for CLI packs (Linux, at WSL)",
"value": "/mnt/c/engine/linux/"
},
"onecPath": {
"description": "1C:Enterprise exe path",
"value": "C:/Program Files/1cv8/8.3.18.1208/bin/1cv8.exe"
},
"osPath": {
"description": "OneScript exe path",
"value": "C:/Program Files/OneScript/"
},
"ghcliPath": {
"description": "GitHub CLI exe path",
"value": "C:/Program Files/GitHub CLI/gh.exe"
},
"innoPath": {
"description": "Inno Setup exe path",
"value": "C:/Program Files (x86)/Inno Setup 6/Compil32.exe"
},
"serverName": {
"description": "Build server name",
"value": "DEVSRV"
},
"edtProjectsPath": {
"description": "EDT projects directory",
"value": "C:/Users/bayse/AppData/Local/1C/1cedtstart/projects"
},
"jenkinsHost": {
"description": "Jenkins URL",
"value": "https://jenkins.openintegrations.dev"
},
"rcloneConf": {
"description": "rclone configuration name for web site deploying",
"value": "hoster"
},
"npmPath": {
"description": "NPM executable",
"value": "C:/Program Files/nodejs/npm.cmd"
}
}
},
"paths": {
"description": "Special repository directories paths",
"value": {
"root": {
"description": "Source code root directory",
"value": "./src/"
},
"addinsSrc": {
"description": "AddIns directory",
"value": "./src/addins/"
},
"packageSrc": {
"description": "OneScript package directory",
"value": "./src/ru/OInt/"
},
"packagedefSrc": {
"description": "Packagedef file path",
"value": "./src/ru/OInt/packagedef"
},
"configurationSrc": {
"description": "1C configuration directory",
"value": "./src/ru/OPI/src/"
},
"dictionariesSrc": {
"description": "Translation dictionaries directory",
"value": "./service/dictionaries/"
},
"workflowsSrc": {
"description": "GitHub Actions workflows directory",
"value": "./.github/workflows/"
},
"jenkinsSrc": {
"description": "Jenkinsfiles directory",
"value": "./ci/pipelines/"
},
"paramsExamplesSrc": {
"description": "CLI tips directory",
"value": "./service/params_examples/"
},
"templatesSrc": {
"description": "CI template files directory",
"value": "./service/templates/"
}
}
},
"docs": {
"description": "Docs generation settings",
"value": {
"deployMainSrc": {
"description": "Primary docs workspace directory",
"value": "./docs/docusaurus/"
},
"deployDocsSrc": {
"description": "MD files at workspace docs directory",
"value": "./docs/docusaurus/docs/"
},
"deployBuildSrc": {
"description": "Deploy-ready docs directory",
"value": "./docs/docusaurus/build/"
},
"deployModulesSrc": {
"description": "Node modules directory",
"value": "./docs/docusaurus/node_modules/"
}
}
},
"tests": {
"description": "Testing data",
"value": {
"yaxunitConf": {
"description": "YaxUnit configurations directory",
"value": "./service/yaxunit_conf/"
},
"jenkinsSplit": {
"description": "Jenkins path for split tests",
"value": "/job/OPITest/job/OpiSplitTests"
},
"jenkinsFull": {
"description": "Jenkins path for full tests",
"value": "/job/OPITest/job/OpiFullTest"
},
"availability": {
"description": "Enabled and disabled tests categories",
"value": {
"Telegram": true,
"VK": true,
"Viber": true,
"Twitter": true,
"FTP": true,
"SSH": true,
"SFTP": true,
"PostgreSQL": true,
"MySQL": true,
"MSSQL": true,
"SQLite": true,
"RCON": true,
"YandexDisk": true,
"GoogleWorkspace": true,
"GoogleCalendar": true,
"GoogleDrive": true,
"GoogleSheets": true,
"Notion": true,
"Slack": true,
"Airtable": true,
"Dropbox": true,
"Bitrix24": true,
"VkTeams": true,
"Neocities": true,
"CDEK": true,
"YandexMetrika": true,
"S3": true,
"TCP": true,
"GreenAPI": true,
"GreenMax": true,
"Ollama": true,
"HTTPКлиент": true,
"OpenAI": false,
"ReportPortal": true,
"HTTPClient": true,
"BuildCheck": true,
"MongoDB": true,
"GRPC": true,
"ClickHouse": true
}
}
}
},
"release": {
"description": "Release producing data",
"value": {
"artifactsCount": {
"description": "Release artifacts (files) count",
"value": 16
}
}
},
"localization": {
"description": "Localization data",
"value": {
"mainLang": {
"description": "Main project language",
"value": "ru"
},
"langs": {
"description": "Localization languages",
"value": [
"en",
"ru"
]
},
"langsVars": {
"description": "Language defined data",
"value": {
"ru": {
"description": "Language defined data for Russian",
"value": {
"edt_project": {
"description": "1C:EDT project name",
"value": "OpenIntegrations_Ru"
},
"ib_name": {
"description": "1C infobase name",
"value": "OpenIntegrations"
},
"methodString": {
"description": "Method word translation",
"value": "Метод"
},
"synonymString": {
"description": "Synonym word translation",
"value": "Синоним"
},
"sectionsString": {
"description": "Section word translation",
"value": "Раздел"
},
"testsModule": {
"description": "Main tests module name",
"value": "OPI_Тесты"
},
"testsModuleCLI": {
"description": "CLI test module name",
"value": "OPI_ТестыCLI"
},
"testsTableMethod": {
"description": "Test table retrieve method",
"value": "OPI_ПолучениеДанныхТестов.ПолучитьТаблицуТестов()"
},
"testsSectionsMethod": {
"description": "Test selections array retrieve method (for Jenkins)",
"value": "OPI_ПолучениеДанныхТестов.ПолучитьСоответствиеРазделовТестирования()"
},
"testsSectionsMethodGA": {
"dictionaries": "Test selections array retrieve method (for Github Actions)",
"value": "OPI_ПолучениеДанныхТестов.ПолучитьСоответствиеРазделовТестированияGA()"
},
"docsMdSrc": {
"description": "Docs MD files directory",
"value": "./docs/ru/md/"
},
"codeExamplesSrc": {
"description": "Docs code examples directory",
"value": "./docs/ru/examples/"
},
"testValuesSrc": {
"description": "Docs test values directory",
"value": "./docs/ru/data/"
},
"testsModulePath": {
"description": "Main tests module path",
"value": "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os"
},
"testsCliModulePath": {
"description": "CLI test module path",
"value": "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os"
},
"testsRegionName": {
"description": "Atomic test retrieve method",
"value": "АтомарныеТесты"
},
"remoteDocsSrc": {
"description": "Docs directory on remote server (hosting)",
"value": "public_html"
},
"namesTranslation": {
"description": "Modules names localization",
"value": {}
},
"docsCategories": {
"description": "Docs categories and classes",
"value": {
"Messenger": "Мессенджеры",
"Social": "Социальные сети",
"Database": "Базы данных и электронные таблицы",
"Folder": "Файловые хостинги и хранилища",
"CRM": "Комплексные решения (CMS, CRM)",
"Commerce": "Электронная коммерция и доставка",
"Calendar": "Планирование и управление проектами",
"AI": "Искусственный интеллект",
"Exchange": "Протоколы обмена",
"Other": "Прочее"
}
}
}
},
"en": {
"description": "Language defined data for English",
"value": {
"edt_project": {
"description": "1C:EDT project name",
"value": "OpenIntegrations_En"
},
"ib_name": {
"description": "1C infobase name",
"value": "OpenIntegrationsEng"
},
"methodString": {
"description": "Method word translation",
"value": "Method"
},
"synonymString": {
"description": "Synonym word translation",
"value": "Synonym"
},
"sectionsString": {
"description": "Section word translation",
"value": "Section"
},
"testsModule": {
"description": "Main tests module name",
"value": "OPI_Tests"
},
"testsModuleCLI": {
"description": "CLI test module name",
"value": "OPI_TestsCLI"
},
"testsTableMethod": {
"description": "Test table retrieve method",
"value": "OPI_TestDataRetrieval.GetTestTable()"
},
"testsSectionsMethod": {
"description": "Test selections array retrieve method (for Jenkins)",
"value": "OPI_TestDataRetrieval.GetTestingSectionMapping()"
},
"testsSectionsMethodGA": {
"dictionaries": "Test selections array retrieve method (for Github Actions)",
"value": "OPI_TestDataRetrieval.GetTestingSectionMappingGA()"
},
"docsMdSrc": {
"description": "Docs MD files directory",
"value": "./docs/en/md/"
},
"codeExamplesSrc": {
"description": "Docs code examples directory",
"value": "./docs/en/examples/"
},
"testValuesSrc": {
"description": "Docs test values directory",
"value": "./docs/en/data/"
},
"testsModulePath": {
"description": "Main tests module path",
"value": "./src/en/OInt/tests/Modules/internal/OPI_Tests.os"
},
"testsCliModulePath": {
"description": "CLI test module path",
"value": "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os"
},
"testsRegionName": {
"description": "Atomic test retrieve method",
"value": "AtomicTests"
},
"remoteDocsSrc": {
"description": "Docs directory on remote server (hosting)",
"value": "public_html_en"
},
"namesTranslation": {
"description": "Modules names localization",
"value": {
"OPI_Инструменты": "OPI_Tools",
"OPI_Криптография": "OPI_Cryptography",
"OPI_HTTPКлиент": "OPI_HTTPClient",
"OPI_Компоненты": "OPI_AddIns",
"OPI_ЗапросыHTTP": "OPI_HTTPRequests",
"OPI_ЗапросыSQL": "OPI_SQLQueries",
"OPI_ПолучениеДанныхТестов": "OPI_TestDataRetrieval",
"OPI_ПреобразованиеТипов": "OPI_TypeConversion"
}
},
"docsCategories": {
"description": "Docs categories and classes",
"value": {
"Messenger": "Messengers",
"Social": "Social networks",
"Database": "Databases and spreadsheets",
"Folder": "File-hosting services and storages",
"CRM": "Complete solutions (CMS, CRM)",
"Commerce": "E-commerce and delivery",
"Calendar": "Planning and projects management",
"AI": "Artificial Intelligence",
"Exchange": "Exchange protocols",
"Other": "Other"
}
}
}
}
}
}
}
},
"replacements": {
"description": "Dictionary of values replacements",
"value": {
"oscriptConvertation": {
"description": "Replacements for 1C to OneScript conversion",
"value": {
"// #Использовать": "#Использовать",
"//#Использовать": "#Использовать",
"УстановитьБезопасныйРежим(Истина);": "",
"УстановитьБезопасныйРежим(Ложь);": "",
"// !OInt ": "",
"#КонецЕсли": "// #КонецЕсли",
"#Если": "// #Если"
}
}
}
}
}
+1 -1
View File
@@ -1 +1 @@
CA479A385851C2708C3EC659013BC2327869F2EFC95EE5255E03F6066BBB3E9D
085D2AC8E7E6A69252BB4E194F1AA6E98FB70B5986A0366AC74026F7E1B38FD8
-105
View File
@@ -1,105 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'Deb-Agent' // Имя или метка агента
}
stages {
stage('Remove oint') {
steps {
script {
// Удаляем oint, если он установлен
sh 'dpkg -r oint || echo "oint not installed"'
}
}
}
stage('Download oint package') {
steps {
script {
// Скачиваем новый deb-пакет oint
sh 'wget -O oint_1.32.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.32.0/oint_1.32.0_all_en.deb '
}
}
}
stage('Install oint package') {
steps {
script {
// Устанавливаем скаченный пакет
sh 'dpkg -i oint_1.32.0_all_en.deb'
}
}
}
stage('Prepare'){
steps{
sh 'cd ./src/en/OInt && opm build && opm install oint-1.32.0.ospx && rm oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
sh 'oscript ./ci/os/rp_start.os "CLI"'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_AttributesAndFeatures"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_UploadingAndUpdatingProducts"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_Barcodes"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_PricesAndStocks"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_PromotionsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_WarehousesManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_FBOScheme"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "en"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'rm "./data.json.gpg"'
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
sh 'rm "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
sh "git config user.email vitaly.the.alpaca@gmail.com"
sh 'git config user.name "Vitaly the Alpaca (bot)"'
sh "git config --global core.ignorecase true"
sh "git add ."
sh 'git commit -m "Test data update (Jenkins)"'
sh "git push origin HEAD:main"
}
}
}
}
}
-105
View File
@@ -1,105 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'Deb-Agent' // Имя или метка агента
}
stages {
stage('Remove oint') {
steps {
script {
// Удаляем oint, если он установлен
sh 'dpkg -r oint || echo "oint not installed"'
}
}
}
stage('Download oint package') {
steps {
script {
// Скачиваем новый deb-пакет oint
sh 'wget -O oint_1.32.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.32.0/oint_1.32.0_all_ru.deb '
}
}
}
stage('Install oint package') {
steps {
script {
// Устанавливаем скаченный пакет
sh 'dpkg -i oint_1.32.0_all_ru.deb'
}
}
}
stage('Prepare'){
steps{
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.32.0.ospx && rm oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
sh 'oscript ./ci/os/rp_start.os "CLI"'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_АтрибутыИХарактеристики"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_ЗагрузкаИОбновлениеТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_Штрихкоды"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_ЦеныИОстаткиТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_РаботаСАкциями"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_РаботаСоСкладами"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_СхемаFBO"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "ru"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'rm "./data.json.gpg"'
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
sh 'rm "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
sh "git config user.email vitaly.the.alpaca@gmail.com"
sh 'git config user.name "Vitaly the Alpaca (bot)"'
sh "git config --global core.ignorecase true"
sh "git add ."
sh 'git commit -m "Test data update (Jenkins)"'
sh "git push origin HEAD:main"
}
}
}
}
}
-104
View File
@@ -1,104 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'Rpm-Agent' // Имя или метка агента
}
stages {
stage('Remove oint') {
steps {
script {
// Удаляем oint, если он установлен
sh 'rpm -e oint || echo "oint not installed"'
}
}
}
stage('Download oint package') {
steps {
script {
// Скачиваем новый rpm-пакет oint
sh 'wget -O oint-1.32.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.32.0/oint-1.32.0-1.noarch_en.rpm '
}
}
}
stage('Install oint package') {
steps {
script {
// Устанавливаем скаченный пакет
sh 'rpm -ivh --replacepkgs oint-1.32.0-1.noarch_en.rpm'
}
}
}
stage('Prepare'){
steps{
sh 'cd ./src/en/OInt && opm build && opm install oint-1.32.0.ospx && rm oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
sh 'oscript ./ci/os/rp_start.os "CLI"'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_AttributesAndFeatures"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_UploadingAndUpdatingProducts"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_Barcodes"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_PricesAndStocks"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_PromotionsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_WarehousesManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_FBOScheme"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "en"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'rm "./data.json.gpg"'
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
sh 'rm "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
sh "git config user.email vitaly.the.alpaca@gmail.com"
sh 'git config user.name "Vitaly the Alpaca (bot)"'
sh "git config --global core.ignorecase true"
sh "git add ."
sh 'git commit -m "Test data update (Jenkins)"'
sh "git push origin HEAD:main"
}
}
}
}
}
-104
View File
@@ -1,104 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'Rpm-Agent' // Имя или метка агента
}
stages {
stage('Remove oint') {
steps {
script {
// Удаляем oint, если он установлен
sh 'rpm -e oint || echo "oint not installed"'
}
}
}
stage('Download oint package') {
steps {
script {
// Скачиваем новый rpm-пакет oint
sh 'wget -O oint-1.32.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.32.0/oint-1.32.0-1.noarch_ru.rpm '
}
}
}
stage('Install oint package') {
steps {
script {
// Устанавливаем скаченный пакет
sh 'rpm -ivh --replacepkgs oint-1.32.0-1.noarch_ru.rpm'
}
}
}
stage('Prepare'){
steps{
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.32.0.ospx && rm oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
sh 'oscript ./ci/os/rp_start.os "CLI"'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_АтрибутыИХарактеристики"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_ЗагрузкаИОбновлениеТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_Штрихкоды"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_ЦеныИОстаткиТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_РаботаСАкциями"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_РаботаСоСкладами"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_СхемаFBO"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "ru"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'rm "./data.json.gpg"'
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
sh 'rm "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
sh "git config user.email vitaly.the.alpaca@gmail.com"
sh 'git config user.name "Vitaly the Alpaca (bot)"'
sh "git config --global core.ignorecase true"
sh "git add ."
sh 'git commit -m "Test data update (Jenkins)"'
sh "git push origin HEAD:main"
}
}
}
}
}
-184
View File
@@ -1,184 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'windows'
}
stages {
stage('Decrypt Data') {
steps {
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.32.0.ospx; del oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
}
}
}
stage('Remove oint.bat if exists') {
steps {
powershell encoding: 'UTF-8', script: '''
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
if (Test-Path $batFile) {
Remove-Item -Path $batFile -Force
Write-Host "Файл oint.bat удален."
} else {
Write-Host "Файл oint.bat не найден, пропускаем удаление."
}
'''
// Проверяем, что файл действительно удален
powershell encoding: 'UTF-8', script: '''
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
if (Test-Path $batFile) {
Write-Error "Ошибка: Файл oint.bat не удален!"
exit 1
} else {
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
}
'''
}
}
stage('Uninstall OInt if installed') {
steps {
powershell encoding: 'UTF-8', script: '''
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
if (Test-Path $uninstallerPath) {
Write-Host "OInt найден. Запускаем удаление..."
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
Write-Host "Удаление OInt завершено."
} else {
Write-Host "OInt не установлен. Пропускаем этап удаления."
}
'''
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
powershell encoding: 'UTF-8', script: '''
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
if (Test-Path $batFile) {
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
exit 1
} else {
Write-Host "Проверка: oint.bat после uninstall отсутствует."
}
'''
}
}
stage('Prepare Download Dir') {
steps {
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
}
}
stage('Download Installer') {
steps {
powershell encoding: 'UTF-8', script: '''
$url = "https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.32.0/oint_1.32.0_installer_en.exe "
$output = "$env:USERPROFILE\\Downloads\\oint_installer.exe"
Invoke-WebRequest -Uri $url -OutFile $output
Write-Host "Инсталлер скачан в: $output"
'''
}
}
stage('Install OInt') {
steps {
powershell encoding: 'UTF-8', script: '''
$installerPath = "$env:USERPROFILE\\Downloads\\oint_installer.exe"
Write-Host "Запускаем установку: $installerPath"
Start-Process -FilePath $installerPath -ArgumentList "/VERYSILENT /NORESTART" -NoNewWindow -Wait
Write-Host "Установка завершена."
'''
}
}
stage('Verify Installation') {
steps {
// Проверяем наличие oint.bat в C:\Program Files (x86)\OInt\bin\
powershell encoding: 'UTF-8', script: '''
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
if (-not (Test-Path $batFile)) {
Write-Error "Ошибка: oint.bat не найден после установки!"
exit 1
} else {
Write-Host "Проверка: oint.bat найден после установки."
}
'''
// Проверяем, что where oint выводит нужный путь
powershell encoding: 'UTF-8', script: '''
$result = (Get-Command oint -ErrorAction SilentlyContinue).Source
$expectedPath = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
if ($result -ne $expectedPath) {
Write-Error "Ошибка: Команда 'where oint' указывает не на тот путь: $result"
exit 1
} else {
Write-Host "Проверка: 'where oint' указывает на правильный путь: $result"
}
'''
}
}
stage('Create ReportPortal launch'){
steps{
bat encoding: 'UTF-8', script:'chcp 65001 & oscript ./ci/os/rp_start.os "CLI"'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_AttributesAndFeatures"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_UploadingAndUpdatingProducts"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_Barcodes"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_PricesAndStocks"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_PromotionsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_WarehousesManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "OzonAPI_FBOScheme"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "en"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
bat encoding: 'UTF-8', script:'del "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
bat "git config user.email vitaly.the.alpaca@gmail.com"
bat 'git config user.name "Vitaly the Alpaca (bot)"'
bat "git config --global core.ignorecase true"
bat "git add ."
bat 'git commit -m "Test data update (Jenkins)"'
bat "git push origin HEAD:main"
}
}
}
}
}
-184
View File
@@ -1,184 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'windows'
}
stages {
stage('Decrypt Data') {
steps {
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.32.0.ospx; del oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
}
}
}
stage('Remove oint.bat if exists') {
steps {
powershell encoding: 'UTF-8', script: '''
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
if (Test-Path $batFile) {
Remove-Item -Path $batFile -Force
Write-Host "Файл oint.bat удален."
} else {
Write-Host "Файл oint.bat не найден, пропускаем удаление."
}
'''
// Проверяем, что файл действительно удален
powershell encoding: 'UTF-8', script: '''
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
if (Test-Path $batFile) {
Write-Error "Ошибка: Файл oint.bat не удален!"
exit 1
} else {
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
}
'''
}
}
stage('Uninstall OInt if installed') {
steps {
powershell encoding: 'UTF-8', script: '''
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
if (Test-Path $uninstallerPath) {
Write-Host "OInt найден. Запускаем удаление..."
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
Write-Host "Удаление OInt завершено."
} else {
Write-Host "OInt не установлен. Пропускаем этап удаления."
}
'''
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
powershell encoding: 'UTF-8', script: '''
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
if (Test-Path $batFile) {
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
exit 1
} else {
Write-Host "Проверка: oint.bat после uninstall отсутствует."
}
'''
}
}
stage('Prepare Download Dir') {
steps {
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
}
}
stage('Download Installer') {
steps {
powershell encoding: 'UTF-8', script: '''
$url = "https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/1.32.0/oint_1.32.0_installer_ru.exe "
$output = "$env:USERPROFILE\\Downloads\\oint_installer.exe"
Invoke-WebRequest -Uri $url -OutFile $output
Write-Host "Инсталлер скачан в: $output"
'''
}
}
stage('Install OInt') {
steps {
powershell encoding: 'UTF-8', script: '''
$installerPath = "$env:USERPROFILE\\Downloads\\oint_installer.exe"
Write-Host "Запускаем установку: $installerPath"
Start-Process -FilePath $installerPath -ArgumentList "/VERYSILENT /NORESTART" -NoNewWindow -Wait
Write-Host "Установка завершена."
'''
}
}
stage('Verify Installation') {
steps {
// Проверяем наличие oint.bat в C:\Program Files (x86)\OInt\bin\
powershell encoding: 'UTF-8', script: '''
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
if (-not (Test-Path $batFile)) {
Write-Error "Ошибка: oint.bat не найден после установки!"
exit 1
} else {
Write-Host "Проверка: oint.bat найден после установки."
}
'''
// Проверяем, что where oint выводит нужный путь
powershell encoding: 'UTF-8', script: '''
$result = (Get-Command oint -ErrorAction SilentlyContinue).Source
$expectedPath = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
if ($result -ne $expectedPath) {
Write-Error "Ошибка: Команда 'where oint' указывает не на тот путь: $result"
exit 1
} else {
Write-Host "Проверка: 'where oint' указывает на правильный путь: $result"
}
'''
}
}
stage('Create ReportPortal launch'){
steps{
bat encoding: 'UTF-8', script:'chcp 65001 & oscript ./ci/os/rp_start.os "CLI"'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_АтрибутыИХарактеристики"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_ЗагрузкаИОбновлениеТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_Штрихкоды"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_ЦеныИОстаткиТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_РаботаСАкциями"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_РаботаСоСкладами"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "ОзонАПИ_СхемаFBO"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "ru"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
bat encoding: 'UTF-8', script:'del "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
bat "git config user.email vitaly.the.alpaca@gmail.com"
bat 'git config user.name "Vitaly the Alpaca (bot)"'
bat "git config --global core.ignorecase true"
bat "git add ."
bat 'git commit -m "Test data update (Jenkins)"'
bat "git push origin HEAD:main"
}
}
}
}
}
-114
View File
@@ -1,114 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'Deb-Agent' // Имя или метка агента
}
stages {
stage('Remove OInt from OneScript Lib') {
steps {
script {
try {
// Удаление каталога /opt/onescript/lib/oint, если существует
sh '''
DIR_PATH="/opt/onescript/lib/oint"
if [ -d "$DIR_PATH" ]; then
echo "Каталог oint найден. Удаляем..."
rm -rf "$DIR_PATH"
echo "Каталог oint успешно удален."
else
echo "Каталог oint не найден. Пропускаем удаление."
fi
'''
// Проверяем, что каталог действительно удален
sh '''
DIR_PATH="/opt/onescript/lib/oint"
if [ -d "$DIR_PATH" ]; then
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
exit 1
else
echo "Проверка: Каталог oint отсутствует после удаления."
fi
'''
} catch (Exception e) {
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
currentBuild.result = 'FAILURE'
error("Удаление каталога oint завершено с ошибкой.")
}
}
}
}
stage('Prepare'){
steps{
sh 'cd ./src/en/OInt && opm build && opm install oint-1.32.0.ospx && rm oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
sh 'oscript ./ci/os/rp_start.os'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_AttributesAndFeatures"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_UploadingAndUpdatingProducts"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_Barcodes"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_PricesAndStocks"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_PromotionsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_WarehousesManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_FBOScheme"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "en"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'rm "./data.json.gpg"'
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
sh 'rm "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
sh "git config user.email vitaly.the.alpaca@gmail.com"
sh 'git config user.name "Vitaly the Alpaca (bot)"'
sh "git config --global core.ignorecase true"
sh "git add ."
sh 'git commit -m "Test data update (Jenkins)"'
sh "git push origin HEAD:main"
}
}
}
}
}
-114
View File
@@ -1,114 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'Deb-Agent' // Имя или метка агента
}
stages {
stage('Remove OInt from OneScript Lib') {
steps {
script {
try {
// Удаление каталога /opt/onescript/lib/oint, если существует
sh '''
DIR_PATH="/opt/onescript/lib/oint"
if [ -d "$DIR_PATH" ]; then
echo "Каталог oint найден. Удаляем..."
rm -rf "$DIR_PATH"
echo "Каталог oint успешно удален."
else
echo "Каталог oint не найден. Пропускаем удаление."
fi
'''
// Проверяем, что каталог действительно удален
sh '''
DIR_PATH="/opt/onescript/lib/oint"
if [ -d "$DIR_PATH" ]; then
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
exit 1
else
echo "Проверка: Каталог oint отсутствует после удаления."
fi
'''
} catch (Exception e) {
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
currentBuild.result = 'FAILURE'
error("Удаление каталога oint завершено с ошибкой.")
}
}
}
}
stage('Prepare'){
steps{
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.32.0.ospx && rm oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
sh 'oscript ./ci/os/rp_start.os'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_АтрибутыИХарактеристики"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_ЗагрузкаИОбновлениеТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_Штрихкоды"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_ЦеныИОстаткиТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_РаботаСАкциями"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_РаботаСоСкладами"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_СхемаFBO"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "ru"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'rm "./data.json.gpg"'
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
sh 'rm "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
sh "git config user.email vitaly.the.alpaca@gmail.com"
sh 'git config user.name "Vitaly the Alpaca (bot)"'
sh "git config --global core.ignorecase true"
sh "git add ."
sh 'git commit -m "Test data update (Jenkins)"'
sh "git push origin HEAD:main"
}
}
}
}
}
-114
View File
@@ -1,114 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'Rpm-Agent' // Имя или метка агента
}
stages {
stage('Remove OInt from OneScript Lib') {
steps {
script {
try {
// Удаление каталога /opt/onescript/lib/oint, если существует
sh '''
DIR_PATH="/opt/onescript/lib/oint"
if [ -d "$DIR_PATH" ]; then
echo "Каталог oint найден. Удаляем..."
rm -rf "$DIR_PATH"
echo "Каталог oint успешно удален."
else
echo "Каталог oint не найден. Пропускаем удаление."
fi
'''
// Проверяем, что каталог действительно удален
sh '''
DIR_PATH="/opt/onescript/lib/oint"
if [ -d "$DIR_PATH" ]; then
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
exit 1
else
echo "Проверка: Каталог oint отсутствует после удаления."
fi
'''
} catch (Exception e) {
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
currentBuild.result = 'FAILURE'
error("Удаление каталога oint завершено с ошибкой.")
}
}
}
}
stage('Prepare'){
steps{
sh 'cd ./src/en/OInt && opm build && opm install oint-1.32.0.ospx && rm oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
sh 'oscript ./ci/os/rp_start.os'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_AttributesAndFeatures"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_UploadingAndUpdatingProducts"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_Barcodes"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_PricesAndStocks"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_PromotionsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_WarehousesManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_FBOScheme"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "en"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'rm "./data.json.gpg"'
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
sh 'rm "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
sh "git config user.email vitaly.the.alpaca@gmail.com"
sh 'git config user.name "Vitaly the Alpaca (bot)"'
sh "git config --global core.ignorecase true"
sh "git add ."
sh 'git commit -m "Test data update (Jenkins)"'
sh "git push origin HEAD:main"
}
}
}
}
}
-114
View File
@@ -1,114 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'Rpm-Agent' // Имя или метка агента
}
stages {
stage('Remove OInt from OneScript Lib') {
steps {
script {
try {
// Удаление каталога /opt/onescript/lib/oint, если существует
sh '''
DIR_PATH="/opt/onescript/lib/oint"
if [ -d "$DIR_PATH" ]; then
echo "Каталог oint найден. Удаляем..."
rm -rf "$DIR_PATH"
echo "Каталог oint успешно удален."
else
echo "Каталог oint не найден. Пропускаем удаление."
fi
'''
// Проверяем, что каталог действительно удален
sh '''
DIR_PATH="/opt/onescript/lib/oint"
if [ -d "$DIR_PATH" ]; then
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
exit 1
else
echo "Проверка: Каталог oint отсутствует после удаления."
fi
'''
} catch (Exception e) {
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
currentBuild.result = 'FAILURE'
error("Удаление каталога oint завершено с ошибкой.")
}
}
}
}
stage('Prepare'){
steps{
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.32.0.ospx && rm oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
sh 'oscript ./ci/os/rp_start.os'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_АтрибутыИХарактеристики"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_ЗагрузкаИОбновлениеТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_Штрихкоды"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_ЦеныИОстаткиТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_РаботаСАкциями"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_РаботаСоСкладами"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_СхемаFBO"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "ru"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'rm "./data.json.gpg"'
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
sh 'rm "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
sh "git config user.email vitaly.the.alpaca@gmail.com"
sh 'git config user.name "Vitaly the Alpaca (bot)"'
sh "git config --global core.ignorecase true"
sh "git add ."
sh 'git commit -m "Test data update (Jenkins)"'
sh "git push origin HEAD:main"
}
}
}
}
}
-112
View File
@@ -1,112 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'windows'
}
stages {
stage('Remove OInt from OneScript Lib') {
steps {
script {
try {
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
powershell encoding: 'UTF-8', script: '''
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
if (Test-Path $dirPath) {
Write-Host "Каталог oint найден. Удаляем..."
Remove-Item -Path $dirPath -Recurse -Force
Write-Host "Каталог oint успешно удален."
} else {
Write-Host "Каталог oint не найден. Пропускаем удаление."
}
'''
// Проверяем, что каталог действительно удален
powershell encoding: 'UTF-8', script: '''
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
if (Test-Path $dirPath) {
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
exit 1
} else {
Write-Host "Проверка: Каталог oint отсутствует после удаления."
}
'''
} catch (Exception e) {
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
currentBuild.result = 'FAILURE'
error("Удаление каталога oint завершено с ошибкой.")
}
}
}
}
stage('Build OInt from source and decrypt secret data'){
steps{
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.32.0.ospx; del oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
bat encoding: 'UTF-8', script:'chcp 65001 & oscript ./ci/os/rp_start.os'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_AttributesAndFeatures"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_UploadingAndUpdatingProducts"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_Barcodes"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_PricesAndStocks"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_PromotionsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_WarehousesManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "OzonAPI_FBOScheme"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "en"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
bat encoding: 'UTF-8', script:'del "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
bat "git config user.email vitaly.the.alpaca@gmail.com"
bat 'git config user.name "Vitaly the Alpaca (bot)"'
bat "git config --global core.ignorecase true"
bat "git add ."
bat 'git commit -m "Test data update (Jenkins)"'
bat "git push origin HEAD:main"
}
}
}
}
}
-112
View File
@@ -1,112 +0,0 @@
def runCommand(String command) {
if (isUnix()) {
sh(script: command)
} else {
bat(script: command)
}
}
pipeline {
agent {
label 'windows'
}
stages {
stage('Remove OInt from OneScript Lib') {
steps {
script {
try {
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
powershell encoding: 'UTF-8', script: '''
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
if (Test-Path $dirPath) {
Write-Host "Каталог oint найден. Удаляем..."
Remove-Item -Path $dirPath -Recurse -Force
Write-Host "Каталог oint успешно удален."
} else {
Write-Host "Каталог oint не найден. Пропускаем удаление."
}
'''
// Проверяем, что каталог действительно удален
powershell encoding: 'UTF-8', script: '''
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
if (Test-Path $dirPath) {
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
exit 1
} else {
Write-Host "Проверка: Каталог oint отсутствует после удаления."
}
'''
} catch (Exception e) {
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
currentBuild.result = 'FAILURE'
error("Удаление каталога oint завершено с ошибкой.")
}
}
}
}
stage('Build OInt from source and decrypt secret data'){
steps{
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.32.0.ospx; del oint-1.32.0.ospx'
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
}
}
}
stage('Create ReportPortal launch'){
steps{
bat encoding: 'UTF-8', script:'chcp 65001 & oscript ./ci/os/rp_start.os'
}
}
stage('Testing-Ozon') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_АтрибутыИХарактеристики"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_ЗагрузкаИОбновлениеТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_Штрихкоды"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_ЦеныИОстаткиТоваров"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_РаботаСАкциями"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_РаботаСоСкладами"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ОзонАПИ_СхемаFBO"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "ru"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
bat encoding: 'UTF-8', script:'del "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
bat "git config user.email vitaly.the.alpaca@gmail.com"
bat 'git config user.name "Vitaly the Alpaca (bot)"'
bat "git config --global core.ignorecase true"
bat "git add ."
bat 'git commit -m "Test data update (Jenkins)"'
bat "git push origin HEAD:main"
}
}
}
}
}
+1 -1
View File
@@ -32,7 +32,7 @@
Обработчик = Новый CLIMethods(ДанныеПроекта);
Обработчик = Новый AlternativeNamesMethods(ДанныеПроекта);
Обработчик = Новый CLITestsMethods(ДанныеПроекта);
//Обработчик = Новый JenkinsTestsMethods(ДанныеПроекта);
Обработчик = Новый JenkinsTestsMethods(ДанныеПроекта);
Обработчик = Новый APICatalogGenerator(ДанныеПроекта);
Обработчик = Новый TestIndexGenerator(ДанныеПроекта);
Обработчик = Новый HashSumGenerator(ДанныеПроекта);
+31 -60
View File
@@ -102,33 +102,47 @@
ТекстМодуля = ДокументМодуля.ПолучитьТекст();
СтруктураМодуля = Парсер.Разобрать(ТекстМодуля);
ТекущийИндекс = Новый Соответствие;
ТекущийИндекс.Вставить("module" , ТекущаяБиблиотека);
ТекущийИндекс.Вставить("library", ТекущаяБиблиотека);
МассивМетодов = Новый Массив;
ТекущийИндекс = Новый Структура;
ТекущийИндексставить("module" , ТекущийМодуль);
ТекущийИндекс.Вставить("library" , ТекущаяБиблиотека);
ТекущийИндекс.Вставить("self_depend", СтрЧислоВхождений(ТекстМодуля, ТекущийМодуль) > 1);
МассивМетодов = Новый Массив;
МассивМетодовРегиона = Новый Массив;
МассивРегионов = Новый Массив;
Для Каждого Метод Из СтруктураМодуля.Объявления Цикл
Если Метод.Тип = "ИнструкцияПрепроцессораОбласть" Тогда
Если ЗначениеЗаполнено(МассивМетодовРегиона) Тогда
СтруктураРегиона = Новый Структура("name,methods", ТекущаяОбласть, МассивМетодовРегиона);
МассивРегионов.Добавить(СтруктураРегиона);
МассивМетодовРегиона = Новый Массив;
КонецЕсли;
ТекущаяОбласть = Синонимайзер(Метод.Имя);
КонецЕсли;
Если Метод.Тип = "ОбъявлениеМетода" И Метод.Сигнатура.Экспорт = Истина Тогда
ИмяМетода = Метод.Сигнатура.Имя;
ТекущийМетод = РазобратьКомментарийМетода(ДокументМодуля, Метод, Модуль);
Если ТекущийМетод = Неопределено Тогда
Продолжить;
КонецЕсли;
ТекущийМетод.Вставить("region", ТекущаяОбласть);
МассивМетодов.Добавить(ТекущийМетод);
МассивМетодовРегиона.Добавить(ИмяМетода);
КонецЕсли;
КонецЦикла;
СписокЗависимостей = Новый Структура;
ОпределитьСписокЗависимостей(ТекстМодуля, СписокЗависимостей);
ТекущийИндекс.Вставить("depends", СписокЗависимостей);
ТекущийИндекс.Вставить("regions", МассивРегионов);
ТекущийИндекс.Вставить("methods", МассивМетодов);
Возврат ТекущийИндекс;
@@ -145,6 +159,11 @@
ИмяМетода = Метод.Сигнатура.Имя;
МассивКомментария = ПарсингКомментария(ТекстовыйДокумент, НомерСтроки);
Если Не ЗначениеЗаполнено(МассивКомментария) Тогда
Возврат Неопределено;
КонецЕсли;
МассивПараметров = Новый Массив;
ОписаниеМетода = СформироватьСтруктуруМетода(МассивКомментария, МассивПараметров);
@@ -211,53 +230,6 @@
КонецФункции
Процедура ОпределитьСписокЗависимостей(ТекстМодуля, СтруктураЗависимостей)
Для Каждого Модуль Из ОбщийМассивМодулей Цикл
ИскомаяЗависимость = Модуль.ИмяБезРасширения;
Если СтрЧислоВхождений(ТекстМодуля, ИскомаяЗависимость) = 0 Тогда
Продолжить;
КонецЕсли;
АбсолютныйПуть = Модуль.ПолноеИмя;
АбсолютныйПуть = СтрЗаменить(АбсолютныйПуть, "\", "/");
ЧастиПути = СтрРазделить(АбсолютныйПуть, "/");
ЧислоЧастей = ЧастиПути.ВГраница();
НовыйПуть = Новый Массив;
Для Н = 0 По ЧислоЧастей Цикл
ОбратныйИндекс = ЧислоЧастей - Н;
ТекущийЭлемент = ЧастиПути[ОбратныйИндекс];
Если нРег(ТекущийЭлемент) = "oint" Тогда
НовыйПуть.Вставить(0, "oint");
НовыйПуть.Вставить(0, "%1");
Прервать;
Иначе
НовыйПуть.Вставить(0, ТекущийЭлемент);
КонецЕсли;
КонецЦикла;
НовыйПуть = СтрСоединить(НовыйПуть, "/");
Если СтруктураЗависимостей.Свойство(ИскомаяЗависимость) Тогда
Продолжить;
КонецЕсли;
СтруктураЗависимостей.Вставить(ИскомаяЗависимость, НовыйПуть);
ТекстЗависимости = ПолучитьСтрокуИзДвоичныхДанных(Новый ДвоичныеДанные(АбсолютныйПуть));
ОпределитьСписокЗависимостей(ТекстЗависимости, СтруктураЗависимостей)
КонецЦикла;
КонецПроцедуры
Функция ПарсингКомментария(Знач ТекстовыйДокумент, Знач НомерСтроки)
ТекущаяСтрока = ТекстовыйДокумент.ПолучитьСтроку(НомерСтроки - 1);
@@ -337,7 +309,7 @@
ЭтоНезанятая = СписокЗанятыхБукв.НайтиПоЗначению(ТекущаяБуква) = Неопределено;
Если ЭтоСогласная И ЭтоНезанятая Тогда
ТекущееОписание.Вставить("short", "-" + Буква);
ТекущееОписание.Вставить("short", "-" + ТекущаяБуква);
СписокЗанятыхБукв.Добавить(ТекущаяБуква);
Прервать;
КонецЕсли;
@@ -356,7 +328,7 @@
ЭтоНезанятая = СписокЗанятыхБукв.НайтиПоЗначению(ТекущаяБуква) = Неопределено;
Если ЭтоГласная И ЭтоНезанятая Тогда
ТекущееОписание.Вставить("short", "-" + Буква);
ТекущееОписание.Вставить("short", "-" + ТекущаяБуква);
СписокЗанятыхБукв.Добавить(ТекущаяБуква);
Прервать;
КонецЕсли;
@@ -373,7 +345,7 @@
ЭтоНезанятая = СписокЗанятыхБукв.НайтиПоЗначению(ТекущаяБуква) = Неопределено;
Если ЭтоНезанятая Тогда
ТекущееОписание.Вставить("short", "-" + Буква);
ТекущееОписание.Вставить("short", "-" + ТекущаяБуква);
СписокЗанятыхБукв.Добавить(ТекущаяБуква);
Прервать;
КонецЕсли;
@@ -462,7 +434,6 @@
КонецФункции
Процедура ОпределитьСоответствиеМодулейКоманд(ТекущийЯзык)
СоответствиеМодулейКоманд = Новый Соответствие();
+1 -1
View File
@@ -307,7 +307,7 @@
КонецЕсли;
Попытка
ИмяПараметра = СтрЗаменить(СписокПараметров[Н]["name"], "--", "");
ИмяПараметра = СтрЗаменить(СписокПараметров[Н]["name"], "--", "");
Исключение
А = 1;
КонецПопытки;
@@ -57,7 +57,7 @@
ПутьJenkinsFull = ДанныеПроекта.ПолучитьЗначениеНастройки("tests.jenkinsFull");
ПутьJenkinsSplit = ДанныеПроекта.ПолучитьЗначениеНастройки("tests.jenkinsSplit");
КаталогWorkflowТестов = КаталогWorkflow + "jenkins_full_tests/";
КаталогWorkflowТестов = КаталогWorkflow + "tests_full/";
ШаблонКонфигурацииYaxUnit = КаталогКонфигурацииYaxUnit + "template.txt";
ШаблонКонфигурацииYaxUnit = Новый ДвоичныеДанные(ШаблонКонфигурацииYaxUnit);
ШаблонКонфигурацииYaxUnit = ПолучитьСтрокуИзДвоичныхДанных(ШаблонКонфигурацииYaxUnit);
@@ -134,7 +134,7 @@
ПутьJenkinsБиблиотеки = ПутьJenkinsSplit + "/job/" + ИмяБиблиотеки;
СоздатьПапкуJenkins(ПутьJenkinsSplit, ИмяБиблиотеки, ИмяБиблиотеки);
СформироватьWorflow(СтрШаблон("%1%2/%3/", КаталогWorkflow, "jenkins_split_tests", ИмяБиблиотеки)
СформироватьWorflow(СтрШаблон("%1%2/%3/", КаталогWorkflow, "tests_split", ИмяБиблиотеки)
, Язык
, ТекущийСписок
, ПутьJenkinsБиблиотеки);
@@ -171,13 +171,13 @@
СоздатьКаталог(КаталогWorkflow);
КонецЕсли;
ФайлJenkinsOS = КаталогWorkflow + "os_test_" + Язык;
ФайлJenkinsOSRPM = КаталогWorkflow + "os_rpm_test_" + Язык;
ФайлJenkinsOSDEB = КаталогWorkflow + "os_deb_test_" + Язык;
ФайлWindowsCLI = КаталогWorkflow + "cli_test_" + Язык;
ФайлRpmCLI = КаталогWorkflow + "cli_rpm_test_" + Язык;
ФайлDebCLI = КаталогWorkflow + "cli_deb_test_" + Язык;
ФайлWindows1c = КаталогWorkflow + "1c_test_" + Язык;
ФайлJenkinsOS = СтрШаблон("%1/os_test_%2.jenkinsfile", КаталогWorkflow, Язык);
ФайлJenkinsOSRPM = СтрШаблон("%1/os_rpm_test_%2.jenkinsfile", КаталогWorkflow, Язык);
ФайлJenkinsOSDEB = СтрШаблон("%1/os_deb_test_%2.jenkinsfile", КаталогWorkflow, Язык);
ФайлWindowsCLI = СтрШаблон("%1/cli_test_%2.jenkinsfile", КаталогWorkflow, Язык);
ФайлRpmCLI = СтрШаблон("%1/cli_rpm_test_%2.jenkinsfile", КаталогWorkflow, Язык);
ФайлDebCLI = СтрШаблон("%1/cli_deb_test_%2.jenkinsfile", КаталогWorkflow, Язык);
ФайлWindows1c = СтрШаблон("%1/1c_test_%2.jenkinsfile", КаталогWorkflow, Язык);
ТекстВыполненияOS = ПолучитьТекстВыполненияOs(ТаблицаТестов, СписокБиблиотек, МодульТестов, Язык);
ТекстВыполненияCLI = ПолучитьТекстВыполненияOs(ТаблицаТестов, СписокБиблиотек, МодульТестовCLI, Язык);

Some files were not shown because too many files have changed in this diff Show More