You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-05-16 09:38:28 +02:00
Main build (Jenkins)
This commit is contained in:
@@ -210,7 +210,7 @@ ___
|
||||
<summary>Синопсис</summary>
|
||||
<br>
|
||||
|
||||
Этот проект предоставляет библиотеку для интеграции 1С:Предприятие, OneScript и CLI с внешними сервисами через REST API и другие протоколы. Благодаря представленным в ней методам вы можете работать в экосистеме 1С:Предприятие с такими сервисами и технологиями как: Airtable, Bitrix24, CDEK, ClickHouse, Dropbox, FTP(S), Google Calendar, Google Drive, Google Sheets, GreenAPI (WhatsApp), GreenAPI (Max), gRPC, MongoDB, MS SQL, MySQL, Neocities, Notion, Ollama, OpenAI, PostgreSQL, RCON, ReportPortal, RSS/Atom, AWS S3, SFTP, Slack, SQLite, SSH, TCP, Telegram, Viber, VK, VK Teams, WebSocket, Yandex.Disk, HTTP
|
||||
Этот проект предоставляет библиотеку для интеграции 1С:Предприятие, OneScript и CLI с внешними сервисами через REST API и другие протоколы. Благодаря представленным в ней методам вы можете работать в экосистеме 1С:Предприятие с такими сервисами и технологиями как: Airtable, Bitrix24, CDEK, ClickHouse, Dropbox, FTP(S), Google Calendar, Google Drive, Google Sheets, GreenAPI (WhatsApp), GreenAPI (Max), gRPC, MongoDB, MS SQL, MySQL, Neocities, Notion, Ollama, OpenAI, PostgreSQL, RCON, ReportPortal, RSS/Atom, AWS S3, SFTP, Slack, SQLite, SSH, TCP, Telegram, Viber, VK, VK Teams, WebSocket, Yandex.Disk, ZeroMQ, HTTP
|
||||
|
||||
Существуют варианты поставки в виде расширения (.cfe, XML, EDT), OPM-пакета и других пакетов для разных операционных систем. Версия 1С: 8.3.10. Подходит для любых конфигураций, не использует БСП
|
||||
|
||||
|
||||
+2
-1
@@ -140,7 +140,8 @@
|
||||
"RSS": true,
|
||||
"HTTP": true,
|
||||
"Core": true,
|
||||
"WebSocket": true
|
||||
"WebSocket": true,
|
||||
"ZeroMQ": true
|
||||
}
|
||||
},
|
||||
"testIbPath": {
|
||||
|
||||
@@ -1 +1 @@
|
||||
2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039
|
||||
90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15
|
||||
@@ -599,6 +599,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['ZeroMQ', './service/yaxunit_conf/en/ZeroMQ.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -599,6 +599,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['ZeroMQ', './service/yaxunit_conf/ru/ZeroMQ.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -599,6 +599,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['ZeroMQ', './service/yaxunit_conf/en/ZeroMQ.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -599,6 +599,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['ZeroMQ', './service/yaxunit_conf/ru/ZeroMQ.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -687,6 +687,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -687,6 +687,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -687,6 +687,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -687,6 +687,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -767,6 +767,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -767,6 +767,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -697,6 +697,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -697,6 +697,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -697,6 +697,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -697,6 +697,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -694,6 +694,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -694,6 +694,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-GreenAPI') {
|
||||
when {
|
||||
expression { return shouldRunStage('GreenAPI') }
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String libraryName, String configPath) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
script {
|
||||
runCommand("\"C:/Program Files (x86)/1cv8/8.3.26.1656/bin/1cv8c.exe\" /IBConnectionString \"Srvr=\"\"DEVSRV\"\";Ref=\"\"OpenIntegrationsEng\"\";\" /C\"RunUnitTests=${configPath}\"")
|
||||
|
||||
timeout(time: 60, unit: 'MINUTES') {
|
||||
waitUntil {
|
||||
fileExists "./test_results/${libraryName}.code"
|
||||
}
|
||||
}
|
||||
|
||||
if (fileExists("./test_results/${libraryName}.report")) {
|
||||
def reportContent = readFile("./test_results/${libraryName}.report")
|
||||
echo "=== ${libraryName} report content ==="
|
||||
echo reportContent
|
||||
echo "=========================="
|
||||
} else {
|
||||
echo "WARNING: ${libraryName}.report file not found"
|
||||
}
|
||||
|
||||
def exitCode = readFile("./test_results/${libraryName}.code").trim().replaceAll("[^0-9]", "")
|
||||
echo "Exit code for ${libraryName}: ${exitCode}"
|
||||
if (exitCode != "0") {
|
||||
error "Tests ${libraryName} failed with exit code: ${exitCode}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Prepare Test Results Directory') {
|
||||
steps {
|
||||
script {
|
||||
runCommand '''
|
||||
if exist ".\\test_results" (
|
||||
rmdir /s /q ".\\test_results"
|
||||
)
|
||||
mkdir ".\\test_results"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Create ReportPortal launch'){
|
||||
steps{
|
||||
bat encoding: 'UTF-8', script:'chcp 65001 & oscript ./ci/os/internal/Classes/ReportPortalMethods.os start "1C:Enterprise"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['Core', './service/yaxunit_conf/en/Core.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['ZeroMQ', './service/yaxunit_conf/en/ZeroMQ.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String libraryName, String configPath) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
script {
|
||||
runCommand("\"C:/Program Files (x86)/1cv8/8.3.26.1656/bin/1cv8c.exe\" /IBConnectionString \"Srvr=\"\"DEVSRV\"\";Ref=\"\"OpenIntegrations\"\";\" /C\"RunUnitTests=${configPath}\"")
|
||||
|
||||
timeout(time: 60, unit: 'MINUTES') {
|
||||
waitUntil {
|
||||
fileExists "./test_results/${libraryName}.code"
|
||||
}
|
||||
}
|
||||
|
||||
if (fileExists("./test_results/${libraryName}.report")) {
|
||||
def reportContent = readFile("./test_results/${libraryName}.report")
|
||||
echo "=== ${libraryName} report content ==="
|
||||
echo reportContent
|
||||
echo "=========================="
|
||||
} else {
|
||||
echo "WARNING: ${libraryName}.report file not found"
|
||||
}
|
||||
|
||||
def exitCode = readFile("./test_results/${libraryName}.code").trim().replaceAll("[^0-9]", "")
|
||||
echo "Exit code for ${libraryName}: ${exitCode}"
|
||||
if (exitCode != "0") {
|
||||
error "Tests ${libraryName} failed with exit code: ${exitCode}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Prepare Test Results Directory') {
|
||||
steps {
|
||||
script {
|
||||
runCommand '''
|
||||
if exist ".\\test_results" (
|
||||
rmdir /s /q ".\\test_results"
|
||||
)
|
||||
mkdir ".\\test_results"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Create ReportPortal launch'){
|
||||
steps{
|
||||
bat encoding: 'UTF-8', script:'chcp 65001 & oscript ./ci/os/internal/Classes/ReportPortalMethods.os start "1C:Enterprise"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['Core', './service/yaxunit_conf/ru/Core.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['ZeroMQ', './service/yaxunit_conf/ru/ZeroMQ.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String libraryName, String configPath) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
script {
|
||||
runCommand("\"C:/Program Files (x86)/1cv8/8.3.26.1656/bin/1cv8c.exe\" /IBConnectionString \"File=\"\"D:/TEST_IB/OpenIntegrationsIB_en\"\";\" /C\"RunUnitTests=${configPath}\"")
|
||||
|
||||
timeout(time: 60, unit: 'MINUTES') {
|
||||
waitUntil {
|
||||
fileExists "./test_results/${libraryName}.code"
|
||||
}
|
||||
}
|
||||
|
||||
if (fileExists("./test_results/${libraryName}.report")) {
|
||||
def reportContent = readFile("./test_results/${libraryName}.report")
|
||||
echo "=== ${libraryName} report content ==="
|
||||
echo reportContent
|
||||
echo "=========================="
|
||||
} else {
|
||||
echo "WARNING: ${libraryName}.report file not found"
|
||||
}
|
||||
|
||||
def exitCode = readFile("./test_results/${libraryName}.code").trim().replaceAll("[^0-9]", "")
|
||||
echo "Exit code for ${libraryName}: ${exitCode}"
|
||||
if (exitCode != "0") {
|
||||
error "Tests ${libraryName} failed with exit code: ${exitCode}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Prepare Test Results Directory') {
|
||||
steps {
|
||||
script {
|
||||
runCommand '''
|
||||
if exist ".\\test_results" (
|
||||
rmdir /s /q ".\\test_results"
|
||||
)
|
||||
mkdir ".\\test_results"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Create ReportPortal launch'){
|
||||
steps{
|
||||
bat encoding: 'UTF-8', script:'chcp 65001 & oscript ./ci/os/internal/Classes/ReportPortalMethods.os start "1C:Enterprise"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['Core', './service/yaxunit_conf/en/Core.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['ZeroMQ', './service/yaxunit_conf/en/ZeroMQ.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String libraryName, String configPath) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
script {
|
||||
runCommand("\"C:/Program Files (x86)/1cv8/8.3.26.1656/bin/1cv8c.exe\" /IBConnectionString \"File=\"\"D:/TEST_IB/OpenIntegrationsIB_ru\"\";\" /C\"RunUnitTests=${configPath}\"")
|
||||
|
||||
timeout(time: 60, unit: 'MINUTES') {
|
||||
waitUntil {
|
||||
fileExists "./test_results/${libraryName}.code"
|
||||
}
|
||||
}
|
||||
|
||||
if (fileExists("./test_results/${libraryName}.report")) {
|
||||
def reportContent = readFile("./test_results/${libraryName}.report")
|
||||
echo "=== ${libraryName} report content ==="
|
||||
echo reportContent
|
||||
echo "=========================="
|
||||
} else {
|
||||
echo "WARNING: ${libraryName}.report file not found"
|
||||
}
|
||||
|
||||
def exitCode = readFile("./test_results/${libraryName}.code").trim().replaceAll("[^0-9]", "")
|
||||
echo "Exit code for ${libraryName}: ${exitCode}"
|
||||
if (exitCode != "0") {
|
||||
error "Tests ${libraryName} failed with exit code: ${exitCode}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Prepare Test Results Directory') {
|
||||
steps {
|
||||
script {
|
||||
runCommand '''
|
||||
if exist ".\\test_results" (
|
||||
rmdir /s /q ".\\test_results"
|
||||
)
|
||||
mkdir ".\\test_results"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Create ReportPortal launch'){
|
||||
steps{
|
||||
bat encoding: 'UTF-8', script:'chcp 65001 & oscript ./ci/os/internal/Classes/ReportPortalMethods.os start "1C:Enterprise"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['Core', './service/yaxunit_conf/ru/Core.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['ZeroMQ', './service/yaxunit_conf/ru/ZeroMQ.json'],
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'Deb-Agent' // Имя или метка агента
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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_2.1.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/2.1.0/oint_2.1.0_all_en.deb '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Install oint package') {
|
||||
steps {
|
||||
script {
|
||||
sh 'dpkg -i oint_2.1.0_all_en.deb'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Prepare'){
|
||||
steps{
|
||||
sh 'cd ./src/en/OInt && opm build && opm install oint-2.1.0.ospx && rm oint-2.1.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/internal/Classes/ReportPortalMethods.os start "CLI"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/en/OInt/tests/Modules/OPItc_Core.os', 'CheckIBToLastBuildCompliance'],
|
||||
['./src/en/OInt/tests/Modules/OPItc_Core.os', 'ValidateAdvancedCall'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'Deb-Agent' // Имя или метка агента
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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_2.1.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/2.1.0/oint_2.1.0_all_ru.deb '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Install oint package') {
|
||||
steps {
|
||||
script {
|
||||
sh 'dpkg -i oint_2.1.0_all_ru.deb'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Prepare'){
|
||||
steps{
|
||||
sh 'cd ./src/ru/OInt && opm build && opm install oint-2.1.0.ospx && rm oint-2.1.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/internal/Classes/ReportPortalMethods.os start "CLI"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/ru/OInt/tests/Modules/OPItc_Core.os', 'ПроверитьСоответствиеИБПоследнейСборке'],
|
||||
['./src/ru/OInt/tests/Modules/OPItc_Core.os', 'ПроверитьРасширенныйВызов'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'Rpm-Agent' // Имя или метка агента
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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-2.1.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/2.1.0/oint-2.1.0-1.noarch_en.rpm '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Install oint package') {
|
||||
steps {
|
||||
script {
|
||||
// Устанавливаем скаченный пакет
|
||||
sh 'rpm -ivh --replacepkgs oint-2.1.0-1.noarch_en.rpm'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Prepare'){
|
||||
steps{
|
||||
sh 'cd ./src/en/OInt && opm build && opm install oint-2.1.0.ospx && rm oint-2.1.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/internal/Classes/ReportPortalMethods.os start "CLI"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/en/OInt/tests/Modules/OPItc_Core.os', 'CheckIBToLastBuildCompliance'],
|
||||
['./src/en/OInt/tests/Modules/OPItc_Core.os', 'ValidateAdvancedCall'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'Rpm-Agent' // Имя или метка агента
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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-2.1.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiBuild/job/OpiRelease/lastSuccessfulBuild/artifact/2.1.0/oint-2.1.0-1.noarch_ru.rpm '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Install oint package') {
|
||||
steps {
|
||||
script {
|
||||
// Устанавливаем скаченный пакет
|
||||
sh 'rpm -ivh --replacepkgs oint-2.1.0-1.noarch_ru.rpm'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Prepare'){
|
||||
steps{
|
||||
sh 'cd ./src/ru/OInt && opm build && opm install oint-2.1.0.ospx && rm oint-2.1.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/internal/Classes/ReportPortalMethods.os start "CLI"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/ru/OInt/tests/Modules/OPItc_Core.os', 'ПроверитьСоответствиеИБПоследнейСборке'],
|
||||
['./src/ru/OInt/tests/Modules/OPItc_Core.os', 'ПроверитьРасширенныйВызов'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Decrypt Data') {
|
||||
steps {
|
||||
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-2.1.0.ospx; del oint-2.1.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 = "D:/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 = "D:/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/2.1.0/oint_2.1.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/internal/Classes/ReportPortalMethods.os start "CLI"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/en/OInt/tests/Modules/OPItc_Core.os', 'CheckIBToLastBuildCompliance'],
|
||||
['./src/en/OInt/tests/Modules/OPItc_Core.os', 'ValidateAdvancedCall'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Decrypt Data') {
|
||||
steps {
|
||||
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-2.1.0.ospx; del oint-2.1.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 = "D:/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 = "D:/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/2.1.0/oint_2.1.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/internal/Classes/ReportPortalMethods.os start "CLI"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/ru/OInt/tests/Modules/OPItc_Core.os', 'ПроверитьСоответствиеИБПоследнейСборке'],
|
||||
['./src/ru/OInt/tests/Modules/OPItc_Core.os', 'ПроверитьРасширенныйВызов'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'Deb-Agent' // Имя или метка агента
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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-2.1.0.ospx && rm oint-2.1.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/internal/Classes/ReportPortalMethods.os start "OneScript"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/en/OInt/tests/Modules/OPIt_Core.os', 'CheckIBToLastBuildCompliance'],
|
||||
['./src/en/OInt/tests/Modules/OPIt_Core.os', 'ValidateAdvancedCall'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'Deb-Agent' // Имя или метка агента
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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-2.1.0.ospx && rm oint-2.1.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/internal/Classes/ReportPortalMethods.os start "OneScript"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/ru/OInt/tests/Modules/OPIt_Core.os', 'ПроверитьСоответствиеИБПоследнейСборке'],
|
||||
['./src/ru/OInt/tests/Modules/OPIt_Core.os', 'ПроверитьРасширенныйВызов'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'Rpm-Agent' // Имя или метка агента
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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-2.1.0.ospx && rm oint-2.1.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/internal/Classes/ReportPortalMethods.os start "OneScript"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/en/OInt/tests/Modules/OPIt_Core.os', 'CheckIBToLastBuildCompliance'],
|
||||
['./src/en/OInt/tests/Modules/OPIt_Core.os', 'ValidateAdvancedCall'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'Rpm-Agent' // Имя или метка агента
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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-2.1.0.ospx && rm oint-2.1.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/internal/Classes/ReportPortalMethods.os start "OneScript"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/ru/OInt/tests/Modules/OPIt_Core.os', 'ПроверитьСоответствиеИБПоследнейСборке'],
|
||||
['./src/ru/OInt/tests/Modules/OPIt_Core.os', 'ПроверитьРасширенныйВызов'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Remove OInt from OneScript Lib') {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||
powershell encoding: 'UTF-8', script: '''
|
||||
$dirPath = "D:/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 = "D:/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-2.1.0.ospx; del oint-2.1.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/internal/Classes/ReportPortalMethods.os start "OneScript"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/en/OInt/tests/Modules/OPIt_Core.os', 'CheckIBToLastBuildCompliance'],
|
||||
['./src/en/OInt/tests/Modules/OPIt_Core.os', 'ValidateAdvancedCall'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
def runCommand(String command) {
|
||||
if (isUnix()) {
|
||||
sh(script: command)
|
||||
} else {
|
||||
bat(script: command)
|
||||
}
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
|
||||
stage('Read stages config') {
|
||||
steps {
|
||||
script {
|
||||
def configText = readFile './service/tests_config.json'
|
||||
env.STAGES_CONFIG = configText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Remove OInt from OneScript Lib') {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||
powershell encoding: 'UTF-8', script: '''
|
||||
$dirPath = "D:/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 = "D:/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-2.1.0.ospx; del oint-2.1.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/internal/Classes/ReportPortalMethods.os start "OneScript"'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-Core') {
|
||||
when {
|
||||
expression { return shouldRunStage('Core') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
['./src/ru/OInt/tests/Modules/OPIt_Core.os', 'ПроверитьСоответствиеИБПоследнейСборке'],
|
||||
['./src/ru/OInt/tests/Modules/OPIt_Core.os', 'ПроверитьРасширенныйВызов'],
|
||||
]
|
||||
for (test in tests) {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Testing-ZeroMQ') {
|
||||
when {
|
||||
expression { return shouldRunStage('ZeroMQ') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tests = [
|
||||
|
||||
]
|
||||
for (test in tests) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
runLibraryTest(test[0], test[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
script {
|
||||
catchError() {
|
||||
runCommand('oscript ./ci/os/internal/Classes/ReportPortalMethods.os stop')
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def shouldRunStage(stageName) {
|
||||
try {
|
||||
if (!env.STAGES_CONFIG) {
|
||||
echo "[WARN] STAGES_CONFIG not set. Assuming stage '${stageName}' is ENABLED."
|
||||
return true
|
||||
}
|
||||
def config = readJSON text: env.STAGES_CONFIG
|
||||
def value = config[stageName]
|
||||
if (value == null) {
|
||||
echo "[WARN] Stage '${stageName}' not found in config. Defaulting to DISABLED."
|
||||
return false
|
||||
}
|
||||
return value == true
|
||||
} catch (Exception e) {
|
||||
echo "[ERROR] Failed to parse STAGES_CONFIG: ${e.message}"
|
||||
echo "Raw config: ${env.STAGES_CONFIG}"
|
||||
// Решите: включать stage по умолчанию или нет?
|
||||
return false // или true — по вашему усмотрению
|
||||
}
|
||||
}
|
||||
|
||||
def runLibraryTest(String configPath, String libraryName) {
|
||||
try {
|
||||
echo "Executing: 1testrunner -run \"${configPath}\" \"${libraryName}\""
|
||||
runCommand("1testrunner -run \"${configPath}\" \"${libraryName}\"")
|
||||
echo "Test ${libraryName} completed successfully"
|
||||
} catch (Exception e) {
|
||||
echo "ERROR in test ${libraryName}: ${e.getMessage()}"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
Vendored
+5
@@ -601,6 +601,7 @@ li > a.menu__link {
|
||||
.VKTeams a::before,
|
||||
.WebSocket a::before,
|
||||
.YandexDisk a::before,
|
||||
.ZeroMQ a::before,
|
||||
.HTTP a::before{
|
||||
padding-right: 0.7rem;
|
||||
padding-top: 0.4rem;
|
||||
@@ -746,6 +747,10 @@ li > a.menu__link {
|
||||
content: url(../../static/img/APIs/small/YandexDisk.png);
|
||||
}
|
||||
|
||||
.ZeroMQ > div > a::before{
|
||||
content: url(../../static/img/APIs/small/ZeroMQ.png);
|
||||
}
|
||||
|
||||
.HTTP > div > a::before{
|
||||
content: url(../../static/img/APIs/small/HTTP.png);
|
||||
}
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
---
|
||||
id: ZeroMQ
|
||||
sidebar_class_name: ZeroMQ
|
||||
keywords: [1C, 1C:Enterprise, 1C:Enterprise 8.3, API, Integration, Services, Messaging, OneScript, CLI, ZeroMQ]
|
||||
---
|
||||
|
||||
<img src={require('../../static/img/APIs/ZeroMQ.png').default} width='64px' />
|
||||
|
||||
# ZeroMQ
|
||||
|
||||
import LibraryIntro from '@site/src/components/LibraryIntro';
|
||||
|
||||
<LibraryIntro module="OPI_ZeroMQ" use="oint/api/ws" lang="en"/>
|
||||
|
||||
This section is dedicated to the library for working with ZeroMQ in 1C:Enterprise and OneScript. This page describes all the actions necessary to get started
|
||||
|
||||
## Getting Started
|
||||
|
||||
ZeroMQ is a high-performance asynchronous messaging library designed for use in distributed and parallel applications. It provides sockets that carry atomic messages between various messaging patterns, such as request-reply, publish-subscribe, and others.
|
||||
|
||||
### Key Features
|
||||
|
||||
- **Asynchronous messaging** — high-performance data transfer between processes and systems
|
||||
- **Various messaging patterns** — support for REQ-REP, PUB-SUB, PUSH-PULL and other interaction models
|
||||
- **Inter-process communication** — data exchange between applications on a single machine or network
|
||||
- **Transport independence** — support for TCP, IPC, inproc and other protocols
|
||||
|
||||
### Use Cases
|
||||
|
||||
ZeroMQ can be used for:
|
||||
|
||||
- Building distributed data exchange systems
|
||||
- Organizing message queues between services
|
||||
- Creating monitoring and metrics collection systems
|
||||
- Implementing microservice architecture
|
||||
- Inter-process communication of 1C applications
|
||||
|
||||
:::note
|
||||
Working with ZeroMQ may require installation of appropriate system libraries and components in your operating system
|
||||
:::
|
||||
+2
-2
@@ -17,11 +17,11 @@ import Admonition from '@theme/Admonition';
|
||||
<Tabs>
|
||||
<TabItem value="params" label="Parameters" default>
|
||||
|
||||
`Function GetLog(Val ServerObject, Val AsString = False, Val EventCount = 100) Export`
|
||||
`Function GetLog(Val AddInObject, Val AsString = False, Val EventCount = 100) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
| ServerObject | - | Arbitrary | ✔ | Server or client component object |
|
||||
| AddInObject | - | Arbitrary | ✔ | Server or client component object |
|
||||
| AsString | - | Boolean | ✖ | True > returns log as a single string, False > as an array |
|
||||
| EventCount | - | Number | ✖ | Number of recent events to retrieve. 0 > no limits |
|
||||
|
||||
|
||||
Vendored
+1
@@ -89,6 +89,7 @@ const sidebars = {
|
||||
{ type: 'category', link: { type: 'doc', id: 'Instructions/SSH' }, label: 'SSH', className: 'SSH', items: [{ type: 'autogenerated', dirName: 'SSH' }] },
|
||||
{ type: 'category', link: { type: 'doc', id: 'Instructions/TCP' }, label: 'TCP', className: 'TCP', items: [{ type: 'autogenerated', dirName: 'TCP' }] },
|
||||
{ type: 'category', link: { type: 'doc', id: 'Instructions/WebSocket' }, label: 'WebSocket', className: 'WebSocket', items: [{ type: 'autogenerated', dirName: 'WebSocket' }] },
|
||||
{ type: 'category', link: { type: 'doc', id: 'Instructions/ZeroMQ' }, label: 'ZeroMQ', className: 'ZeroMQ', items: [{ type: 'autogenerated', dirName: 'ZeroMQ' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
---
|
||||
id: ZeroMQ
|
||||
sidebar_class_name: ZeroMQ
|
||||
keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3, API, Интеграция, Сервисы, Обмен, OneScript, CLI, ZeroMQ]
|
||||
---
|
||||
|
||||
<img src={require('../../static/img/APIs/ZeroMQ.png').default} width='64px' />
|
||||
|
||||
# ZeroMQ
|
||||
|
||||
import LibraryIntro from '@site/src/components/LibraryIntro';
|
||||
|
||||
<LibraryIntro module="OPI_ZeroMQ" use="oint/api/ws" lang="ru"/>
|
||||
|
||||
Этот раздел посвящен библиотеке для работы с ZeroMQ в 1С:Предприятие и OneScript. На данной странице описаны все действия, необходимые для полноценного начала работы
|
||||
|
||||
## Начало работы
|
||||
|
||||
ZeroMQ — это высокопроизводительная библиотека асинхронного обмена сообщениями, предназначенная для использования в распределенных и параллельных приложениях. Она предоставляет сокеты, которые переносят атомарные сообщения между различными паттернами обмена, такими как запрос-ответ, публикация-подписка и другие.
|
||||
|
||||
### Основные возможности
|
||||
|
||||
- **Асинхронный обмен сообщениями** — высокопроизводительная передача данных между процессами и системами
|
||||
- **Различные паттерны обмена** — поддержка REQ-REP, PUB-SUB, PUSH-PULL и других моделей взаимодействия
|
||||
- **Межпроцессное взаимодействие** — обмен данными между приложениями на одной машине или в сети
|
||||
- **Независимость от транспорта** — поддержка TCP, IPC, inproc и других протоколов
|
||||
|
||||
### Области применения
|
||||
|
||||
ZeroMQ может использоваться для:
|
||||
|
||||
- Построения распределенных систем обмена данными
|
||||
- Организации очередей сообщений между сервисами
|
||||
- Создания систем мониторинга и сбора метрик
|
||||
- Реализации микросервисной архитектуры
|
||||
- Межпроцессного взаимодействия приложений 1С
|
||||
|
||||
:::note
|
||||
Для работы с ZeroMQ может потребоваться установка соответствующих системных библиотек и компонентов в вашей операционной системе
|
||||
:::
|
||||
+2
-2
@@ -17,11 +17,11 @@ import Admonition from '@theme/Admonition';
|
||||
<Tabs>
|
||||
<TabItem value="params" label="Параметры" default>
|
||||
|
||||
`Функция ПолучитьЛог(Знач ОбъектСервера, Знач КакСтрока = Ложь, Знач ЧислоСобытий = 100) Экспорт`
|
||||
`Функция ПолучитьЛог(Знач ОбъектКомпоненты, Знач КакСтрока = Ложь, Знач ЧислоСобытий = 100) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
| ОбъектСервера | - | Произвольный | ✔ | Объект компоненты сервера или клиента |
|
||||
| ОбъектКомпоненты | - | Произвольный | ✔ | Объект компоненты сервера или клиента |
|
||||
| КакСтрока | - | Булево | ✖ | Истина > возвращает лог одной строкой, Ложь > как массив |
|
||||
| ЧислоСобытий | - | Число | ✖ | Число последних событий для получения. 0 > без ограничений |
|
||||
|
||||
|
||||
Vendored
+1
@@ -89,6 +89,7 @@ const sidebars = {
|
||||
{ type: 'category', link: { type: 'doc', id: 'Instructions/SSH' }, label: 'SSH', className: 'SSH', items: [{ type: 'autogenerated', dirName: 'SSH' }] },
|
||||
{ type: 'category', link: { type: 'doc', id: 'Instructions/TCP' }, label: 'TCP', className: 'TCP', items: [{ type: 'autogenerated', dirName: 'TCP' }] },
|
||||
{ type: 'category', link: { type: 'doc', id: 'Instructions/WebSocket' }, label: 'WebSocket', className: 'WebSocket', items: [{ type: 'autogenerated', dirName: 'WebSocket' }] },
|
||||
{ type: 'category', link: { type: 'doc', id: 'Instructions/ZeroMQ' }, label: 'ZeroMQ', className: 'ZeroMQ', items: [{ type: 'autogenerated', dirName: 'ZeroMQ' }] },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Vendored
+1
@@ -35,4 +35,5 @@
|
||||
|| `VK Teams`| vkteams, vk teams |
|
||||
|| `WebSocket`| websocket, ws |
|
||||
|| `Yandex.Disk`| yandexdisk, yandex.disk, yandex disk, yandex drive, yadisk, ya disk |
|
||||
|| `ZeroMQ`| zeromq |
|
||||
|| `HTTP`| http, https |
|
||||
|
||||
Vendored
+1
@@ -34,5 +34,6 @@
|
||||
"VKTeams",
|
||||
"WebSocket",
|
||||
"YandexDisk",
|
||||
"ZeroMQ",
|
||||
"HTTP"
|
||||
]
|
||||
+11066
-11066
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
||||
2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039
|
||||
90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"reportPath": "./test_results/ZeroMQ.report",
|
||||
"closeAfterTests": true,
|
||||
"filter": {
|
||||
"extensions": null,
|
||||
"modules": null,
|
||||
"suites": null,
|
||||
"tags": null,
|
||||
"contexts": null,
|
||||
"paths": null,
|
||||
"tests": [
|
||||
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"ВТранзакции": false
|
||||
},
|
||||
"reportFormat": "dumpjson",
|
||||
"showReport": false,
|
||||
"logging": {
|
||||
"file": "",
|
||||
"console": false,
|
||||
"enable": null,
|
||||
"level": "info"
|
||||
},
|
||||
"exitCode": "./test_results/ZeroMQ.code",
|
||||
"ПодключатьВнешниеКомпоненты": true
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"reportPath": "./test_results/ZeroMQ.report",
|
||||
"closeAfterTests": true,
|
||||
"filter": {
|
||||
"extensions": null,
|
||||
"modules": null,
|
||||
"suites": null,
|
||||
"tags": null,
|
||||
"contexts": null,
|
||||
"paths": null,
|
||||
"tests": [
|
||||
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"ВТранзакции": false
|
||||
},
|
||||
"reportFormat": "dumpjson",
|
||||
"showReport": false,
|
||||
"logging": {
|
||||
"file": "",
|
||||
"console": false,
|
||||
"enable": null,
|
||||
"level": "info"
|
||||
},
|
||||
"exitCode": "./test_results/ZeroMQ.code",
|
||||
"ПодключатьВнешниеКомпоненты": true
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
<key>en</key>
|
||||
<value>Airtable (OpenIntegrations)</value>
|
||||
</synonym>
|
||||
<comment>Module for working with Airtable from the Open Integrations Package</comment>
|
||||
<comment>Airtable Module of OpenIntegrations</comment>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<key>en</key>
|
||||
<value>Bitrix24 (OpenIntegrations)</value>
|
||||
</synonym>
|
||||
<comment>Module for working with Bitrix24 from the Open Integrations Package</comment>
|
||||
<comment>Bitrix24 Module of OpenIntegrations</comment>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
Function GetHashSum() Export
|
||||
|
||||
LastBuildHash = "2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039";
|
||||
LastBuildHash = "90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15";
|
||||
|
||||
Return LastBuildHash;
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<key>en</key>
|
||||
<value>GreenAPI Max (OpenIntegrations)</value>
|
||||
</synonym>
|
||||
<comment>Module for working with Max via GreenAPI from the OpenIntegrations set</comment>
|
||||
<comment>Max via GreenAPI Module of OpenIntegrations</comment>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<key>en</key>
|
||||
<value>SFTP (OpenIntegrations)</value>
|
||||
</synonym>
|
||||
<comment>Module for working with SFTP from the OpenIntegrations package</comment>
|
||||
<comment>SFTP Module of OpenIntegrations</comment>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
|
||||
@@ -76,15 +76,15 @@ EndFunction
|
||||
// Retrieves server log data (with logging to memory enabled)
|
||||
//
|
||||
// Parameters:
|
||||
// ServerObject - Arbitrary - Server or client component object - srv
|
||||
// AddInObject - Arbitrary - Server or client component object - srv
|
||||
// AsString - Boolean - True > returns log as a single string, False > as an array - str
|
||||
// EventCount - Number - Number of recent events to retrieve. 0 > no limits - count
|
||||
//
|
||||
// Returns:
|
||||
// String, Map Of KeyAndValue - Log as a string or a map with the full execution result
|
||||
Function GetLog(Val ServerObject, Val AsString = False, Val EventCount = 100) Export
|
||||
Function GetLog(Val AddInObject, Val AsString = False, Val EventCount = 100) Export
|
||||
|
||||
Return OPI_AddIns.GetLog(ServerObject
|
||||
Return OPI_AddIns.GetLog(AddInObject
|
||||
, AsString
|
||||
, EventCount);
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// OneScript: ./OInt/api/ws/Modules/OPI_ZeroMQ.os
|
||||
// Lib: ZeroMQ
|
||||
// CLI: none
|
||||
// Keywords: zeromq
|
||||
|
||||
// DocsCategory: Exchange
|
||||
// DocsNameRU: ZeroMQ
|
||||
// DocsNameEN: ZeroMQ
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check method-too-many-params
|
||||
|
||||
// #Use "../../../tools/main"
|
||||
// #Use "../../../tools/http"
|
||||
|
||||
#Region Public
|
||||
|
||||
#Region Common
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:CommonModule xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="24eea7a6-f36a-46d7-ac80-3665064f0dc6">
|
||||
<name>OPI_ZeroMQ</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>ZeroMQ (OPI)</value>
|
||||
</synonym>
|
||||
<comment>ZeroMQ Module of OpenIntegrations</comment>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
</mdclass:CommonModule>
|
||||
@@ -102,6 +102,7 @@
|
||||
<commonModules>CommonModule.OPI_YandexDisk</commonModules>
|
||||
<commonModules>CommonModule.OPI_YandexID</commonModules>
|
||||
<commonModules>CommonModule.OPI_YandexMetrika</commonModules>
|
||||
<commonModules>CommonModule.OPI_ZeroMQ</commonModules>
|
||||
<commonModules>CommonModule.OPI_Tools</commonModules>
|
||||
<commonModules>CommonModule.OPI_HTTPRequests</commonModules>
|
||||
<commonModules>CommonModule.OPI_SQLQueries</commonModules>
|
||||
|
||||
@@ -155,6 +155,7 @@ Function GetTestingSectionMapping() Export
|
||||
Sections.Insert("S3" , 5);
|
||||
Sections.Insert("TCP" , 5);
|
||||
Sections.Insert("WebSocket" , 5);
|
||||
Sections.Insert("ZeroMQ" , 5);
|
||||
Sections.Insert("GreenAPI" , 5);
|
||||
Sections.Insert("GreenMax" , 5);
|
||||
Sections.Insert("Ollama" , 5);
|
||||
@@ -209,6 +210,7 @@ Function GetTestTable(Val TestModule = "") Export
|
||||
GRPC = "GRPC";
|
||||
CHouse = "ClickHouse";
|
||||
RSS = "RSS";
|
||||
ZMQ = "ZeroMQ";
|
||||
|
||||
TestTable = New ValueTable;
|
||||
TestTable.Columns.Add("Method");
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
// OneScript: ./OInt/tests/Modules/OPIt_ZeroMQ.os
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:UnusedParameters-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
// BSLLS:UsingHardcodePath-off
|
||||
// BSLLS:UnusedLocalVariable-off
|
||||
// BSLLS:DeprecatedMessage-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:CommentedCode-off
|
||||
// BSLLS:AssignAliasFieldsInQuery-off
|
||||
// BSLLS:UsingHardcodeNetworkAddress-off
|
||||
// BSLLS:UnreachableCode-off
|
||||
// BSLLS:UnusedLocalMethod-off
|
||||
// BSLLS:NestedFunctionInParameters-off
|
||||
// BSLLS:MissingTemporaryFileDeletion-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:MagicDate-off
|
||||
// BSLLS:MissingParameterDescription-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:MethodSize-off
|
||||
// BSLLS:NestedConstructorsInStructureDeclaration-off
|
||||
// BSLLS:NumberOfValuesInStructureConstructor-off
|
||||
// BSLLS:UsingHardcodeSecretInformation-off
|
||||
// BSLLS:SpaceAtStartComment-off
|
||||
|
||||
//@skip-check undefined-variable
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check undefined-function-or-procedure
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-unused-local-variable
|
||||
//@skip-check bsl-legacy-check-string-literal
|
||||
//@skip-check bsl-legacy-check-method-for-statements-after-return
|
||||
//@skip-check missing-temporary-file-deletion
|
||||
//@skip-check module-unused-method
|
||||
//@skip-check use-non-recommended-method
|
||||
|
||||
// #Use oint
|
||||
// #Use asserts
|
||||
// #Use "internal"
|
||||
|
||||
// For YAxUnit
|
||||
|
||||
Procedure ИсполняемыеСценарии() Export
|
||||
|
||||
OPI_TestDataRetrieval.FormYAXTests("ZeroMQ");
|
||||
|
||||
EndProcedure
|
||||
|
||||
// For Asserts
|
||||
|
||||
Function ПолучитьСписокТестов(UnitTesting) Export
|
||||
|
||||
Return OPI_TestDataRetrieval.FormAssertsTests("ZeroMQ");
|
||||
|
||||
EndFunction
|
||||
|
||||
#Region Internal
|
||||
|
||||
#Region RunnableTests
|
||||
|
||||
#Region ZeroMQ
|
||||
|
||||
#EndRegion // ZeroMQ
|
||||
|
||||
#EndRegion // RunnableTests
|
||||
|
||||
#EndRegion // Internal
|
||||
|
||||
#Region Private
|
||||
|
||||
#Region AtomicTests
|
||||
|
||||
#Region ZeroMQ
|
||||
|
||||
#EndRegion // ZeroMQ
|
||||
|
||||
#EndRegion // AtomicTests
|
||||
|
||||
#EndRegion // Private
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:CommonModule xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="e4fdeef2-4faf-40a3-b21b-83f979404a45">
|
||||
<name>OPIt_ZeroMQ</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>ZeroMQ</value>
|
||||
</synonym>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
</mdclass:CommonModule>
|
||||
@@ -0,0 +1,119 @@
|
||||
// OneScript: ./OInt/tests/Modules/OPItc_ZeroMQ.os
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:UnusedParameters-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
// BSLLS:UsingHardcodePath-off
|
||||
// BSLLS:UnusedLocalVariable-off
|
||||
// BSLLS:DeprecatedMessage-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:CommentedCode-off
|
||||
// BSLLS:AssignAliasFieldsInQuery-off
|
||||
// BSLLS:UsingHardcodeNetworkAddress-off
|
||||
// BSLLS:UnreachableCode-off
|
||||
// BSLLS:UnusedLocalMethod-off
|
||||
// BSLLS:NestedFunctionInParameters-off
|
||||
// BSLLS:MissingTemporaryFileDeletion-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:MagicDate-off
|
||||
// BSLLS:MissingParameterDescription-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:MethodSize-off
|
||||
// BSLLS:NestedConstructorsInStructureDeclaration-off
|
||||
// BSLLS:NumberOfValuesInStructureConstructor-off
|
||||
// BSLLS:UsingHardcodeSecretInformation-off
|
||||
// BSLLS:SpaceAtStartComment-off
|
||||
|
||||
//@skip-check undefined-variable
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check undefined-function-or-procedure
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-unused-local-variable
|
||||
//@skip-check bsl-legacy-check-string-literal
|
||||
//@skip-check bsl-legacy-check-method-for-statements-after-return
|
||||
//@skip-check missing-temporary-file-deletion
|
||||
//@skip-check module-unused-method
|
||||
//@skip-check use-non-recommended-method
|
||||
|
||||
//#Use "../../tools/main"
|
||||
//#Use "../../tools/http"
|
||||
//#Use "../../api"
|
||||
//#Use asserts
|
||||
//#Use "internal"
|
||||
|
||||
// For YAxUnit
|
||||
|
||||
Procedure ИсполняемыеСценарии() Export
|
||||
|
||||
OPI_TestDataRetrieval.FormYAXTestsCLI("ZeroMQ");
|
||||
|
||||
EndProcedure
|
||||
|
||||
// For Asserts
|
||||
|
||||
Function ПолучитьСписокТестов(UnitTesting) Export
|
||||
|
||||
Return OPI_TestDataRetrieval.FormAssertsTestsCLI("ZeroMQ");
|
||||
|
||||
EndFunction
|
||||
|
||||
#Region Internal
|
||||
|
||||
#Region RunnableTests
|
||||
|
||||
#Region ZeroMQ
|
||||
|
||||
#EndRegion // ZeroMQ
|
||||
|
||||
#EndRegion // RunnableTests
|
||||
|
||||
#EndRegion // Internal
|
||||
|
||||
#Region Private
|
||||
|
||||
#Region AtomicTests
|
||||
|
||||
#Region ZeroMQ
|
||||
|
||||
#EndRegion // ZeroMQ
|
||||
|
||||
#EndRegion // AtomicTests
|
||||
|
||||
#EndRegion // Private
|
||||
|
||||
#Region Alternate
|
||||
|
||||
|
||||
|
||||
#EndRegion
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:CommonModule xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="9b002ba6-70d0-43ef-8cf8-7f1ed208b6fe">
|
||||
<name>OPItc_ZeroMQ</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>ZeroMQ</value>
|
||||
</synonym>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
</mdclass:CommonModule>
|
||||
+3
-1
@@ -60,11 +60,13 @@
|
||||
<commonModules>CommonModule.OPIt_YandexDisk</commonModules>
|
||||
<commonModules>CommonModule.OPIt_YandexID</commonModules>
|
||||
<commonModules>CommonModule.OPIt_YandexMetrika</commonModules>
|
||||
<commonModules>CommonModule.OPIt_ZeroMQ</commonModules>
|
||||
<commonModules>CommonModule.OPItc_Airtable</commonModules>
|
||||
<commonModules>CommonModule.OPItc_Bitrix24</commonModules>
|
||||
<commonModules>CommonModule.OPItc_BuildHash</commonModules>
|
||||
<commonModules>CommonModule.OPItc_CDEK</commonModules>
|
||||
<commonModules>CommonModule.OPItc_ClickHouse</commonModules>
|
||||
<commonModules>CommonModule.OPItc_Core</commonModules>
|
||||
<commonModules>CommonModule.OPItc_Dropbox</commonModules>
|
||||
<commonModules>CommonModule.OPItc_FTP</commonModules>
|
||||
<commonModules>CommonModule.OPItc_GoogleCalendar</commonModules>
|
||||
@@ -100,5 +102,5 @@
|
||||
<commonModules>CommonModule.OPItc_YandexDisk</commonModules>
|
||||
<commonModules>CommonModule.OPItc_YandexID</commonModules>
|
||||
<commonModules>CommonModule.OPItc_YandexMetrika</commonModules>
|
||||
<commonModules>CommonModule.OPItc_Core</commonModules>
|
||||
<commonModules>CommonModule.OPItc_ZeroMQ</commonModules>
|
||||
</mdclass:Configuration>
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039
|
||||
90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15
|
||||
Vendored
+1
@@ -37,4 +37,5 @@
|
||||
<module name="OPI_YandexDisk" file="yadisk/Modules/OPI_YandexDisk.os"/>
|
||||
<module name="OPI_YandexID" file="yandex/Modules/OPI_YandexID.os"/>
|
||||
<module name="OPI_YandexMetrika" file="metrika/Modules/OPI_YandexMetrika.os"/>
|
||||
<module name="OPI_ZeroMQ" file="ws/Modules/OPI_ZeroMQ.os"/>
|
||||
</package-def>
|
||||
|
||||
+5
-5
@@ -76,15 +76,15 @@ EndFunction
|
||||
// Retrieves server log data (with logging to memory enabled)
|
||||
//
|
||||
// Parameters:
|
||||
// ServerObject - Arbitrary - Server or client component object - srv
|
||||
// AddInObject - Arbitrary - Server or client component object - srv
|
||||
// AsString - Boolean - True > returns log as a single string, False > as an array - str
|
||||
// EventCount - Number - Number of recent events to retrieve. 0 > no limits - count
|
||||
//
|
||||
// Returns:
|
||||
// String, Map Of KeyAndValue - Log as a string or a map with the full execution result
|
||||
Function GetLog(Val ServerObject, Val AsString = False, Val EventCount = 100) Export
|
||||
Function GetLog(Val AddInObject, Val AsString = False, Val EventCount = 100) Export
|
||||
|
||||
Return OPI_AddIns.GetLog(ServerObject
|
||||
Return OPI_AddIns.GetLog(AddInObject
|
||||
, AsString
|
||||
, EventCount);
|
||||
|
||||
@@ -585,8 +585,8 @@ Function ПолучитьНастройкиЛогирования(Val Запис
|
||||
Return GetLoggingSettings(ЗаписьВПамять, МаксимумСобытий, ПутьКФайлу);
|
||||
EndFunction
|
||||
|
||||
Function ПолучитьЛог(Val ОбъектСервера, Val КакСтрока = False, Val ЧислоСобытий = 100) Export
|
||||
Return GetLog(ОбъектСервера, КакСтрока, ЧислоСобытий);
|
||||
Function ПолучитьЛог(Val ОбъектКомпоненты, Val КакСтрока = False, Val ЧислоСобытий = 100) Export
|
||||
Return GetLog(ОбъектКомпоненты, КакСтрока, ЧислоСобытий);
|
||||
EndFunction
|
||||
|
||||
Function ОткрытьСоединение(Val Адрес, Val Tls = Undefined, Val Прокси = Undefined, Val Заголовки = Undefined, Val Логирование = Undefined) Export
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
// OneScript: ./OInt/api/ws/Modules/OPI_ZeroMQ.os
|
||||
// Lib: ZeroMQ
|
||||
// CLI: none
|
||||
// Keywords: zeromq
|
||||
|
||||
// DocsCategory: Exchange
|
||||
// DocsNameRU: ZeroMQ
|
||||
// DocsNameEN: ZeroMQ
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check method-too-many-params
|
||||
|
||||
#Use "../../../tools/main"
|
||||
#Use "../../../tools/http"
|
||||
|
||||
#Region Public
|
||||
|
||||
#Region Common
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region Alternate
|
||||
|
||||
|
||||
|
||||
#EndRegion
|
||||
Vendored
+1
@@ -37,4 +37,5 @@
|
||||
<module name="OPI_YandexDisk" file="api/yadisk/Modules/OPI_YandexDisk.os"/>
|
||||
<module name="OPI_YandexID" file="api/yandex/Modules/OPI_YandexID.os"/>
|
||||
<module name="OPI_YandexMetrika" file="api/metrika/Modules/OPI_YandexMetrika.os"/>
|
||||
<module name="OPI_ZeroMQ" file="api/ws/Modules/OPI_ZeroMQ.os"/>
|
||||
</package-def>
|
||||
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
// OneScript: ./OInt/tests/Modules/OPIt_ZeroMQ.os
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:UnusedParameters-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
// BSLLS:UsingHardcodePath-off
|
||||
// BSLLS:UnusedLocalVariable-off
|
||||
// BSLLS:DeprecatedMessage-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:CommentedCode-off
|
||||
// BSLLS:AssignAliasFieldsInQuery-off
|
||||
// BSLLS:UsingHardcodeNetworkAddress-off
|
||||
// BSLLS:UnreachableCode-off
|
||||
// BSLLS:UnusedLocalMethod-off
|
||||
// BSLLS:NestedFunctionInParameters-off
|
||||
// BSLLS:MissingTemporaryFileDeletion-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:MagicDate-off
|
||||
// BSLLS:MissingParameterDescription-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:MethodSize-off
|
||||
// BSLLS:NestedConstructorsInStructureDeclaration-off
|
||||
// BSLLS:NumberOfValuesInStructureConstructor-off
|
||||
// BSLLS:UsingHardcodeSecretInformation-off
|
||||
// BSLLS:SpaceAtStartComment-off
|
||||
|
||||
//@skip-check undefined-variable
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check undefined-function-or-procedure
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-unused-local-variable
|
||||
//@skip-check bsl-legacy-check-string-literal
|
||||
//@skip-check bsl-legacy-check-method-for-statements-after-return
|
||||
//@skip-check missing-temporary-file-deletion
|
||||
//@skip-check module-unused-method
|
||||
//@skip-check use-non-recommended-method
|
||||
|
||||
#Use oint
|
||||
#Use asserts
|
||||
#Use "internal"
|
||||
|
||||
// For YAxUnit
|
||||
|
||||
Procedure ИсполняемыеСценарии() Export
|
||||
|
||||
OPI_TestDataRetrieval.FormYAXTests("ZeroMQ");
|
||||
|
||||
EndProcedure
|
||||
|
||||
// For Asserts
|
||||
|
||||
Function ПолучитьСписокТестов(UnitTesting) Export
|
||||
|
||||
Return OPI_TestDataRetrieval.FormAssertsTests("ZeroMQ");
|
||||
|
||||
EndFunction
|
||||
|
||||
#Region Internal
|
||||
|
||||
#Region RunnableTests
|
||||
|
||||
#Region ZeroMQ
|
||||
|
||||
#EndRegion // ZeroMQ
|
||||
|
||||
#EndRegion // RunnableTests
|
||||
|
||||
#EndRegion // Internal
|
||||
|
||||
#Region Private
|
||||
|
||||
#Region AtomicTests
|
||||
|
||||
#Region ZeroMQ
|
||||
|
||||
#EndRegion // ZeroMQ
|
||||
|
||||
#EndRegion // AtomicTests
|
||||
|
||||
#EndRegion // Private
|
||||
|
||||
#Region Alternate
|
||||
|
||||
|
||||
|
||||
#EndRegion
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
// OneScript: ./OInt/tests/Modules/OPItc_ZeroMQ.os
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:UnusedParameters-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
// BSLLS:UsingHardcodePath-off
|
||||
// BSLLS:UnusedLocalVariable-off
|
||||
// BSLLS:DeprecatedMessage-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:CommentedCode-off
|
||||
// BSLLS:AssignAliasFieldsInQuery-off
|
||||
// BSLLS:UsingHardcodeNetworkAddress-off
|
||||
// BSLLS:UnreachableCode-off
|
||||
// BSLLS:UnusedLocalMethod-off
|
||||
// BSLLS:NestedFunctionInParameters-off
|
||||
// BSLLS:MissingTemporaryFileDeletion-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:MagicDate-off
|
||||
// BSLLS:MissingParameterDescription-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:MethodSize-off
|
||||
// BSLLS:NestedConstructorsInStructureDeclaration-off
|
||||
// BSLLS:NumberOfValuesInStructureConstructor-off
|
||||
// BSLLS:UsingHardcodeSecretInformation-off
|
||||
// BSLLS:SpaceAtStartComment-off
|
||||
|
||||
//@skip-check undefined-variable
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check undefined-function-or-procedure
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-unused-local-variable
|
||||
//@skip-check bsl-legacy-check-string-literal
|
||||
//@skip-check bsl-legacy-check-method-for-statements-after-return
|
||||
//@skip-check missing-temporary-file-deletion
|
||||
//@skip-check module-unused-method
|
||||
//@skip-check use-non-recommended-method
|
||||
|
||||
#Use "../../tools/main"
|
||||
#Use "../../tools/http"
|
||||
#Use "../../api"
|
||||
#Use asserts
|
||||
#Use "internal"
|
||||
|
||||
// For YAxUnit
|
||||
|
||||
Procedure ИсполняемыеСценарии() Export
|
||||
|
||||
OPI_TestDataRetrieval.FormYAXTestsCLI("ZeroMQ");
|
||||
|
||||
EndProcedure
|
||||
|
||||
// For Asserts
|
||||
|
||||
Function ПолучитьСписокТестов(UnitTesting) Export
|
||||
|
||||
Return OPI_TestDataRetrieval.FormAssertsTestsCLI("ZeroMQ");
|
||||
|
||||
EndFunction
|
||||
|
||||
#Region Internal
|
||||
|
||||
#Region RunnableTests
|
||||
|
||||
#Region ZeroMQ
|
||||
|
||||
#EndRegion // ZeroMQ
|
||||
|
||||
#EndRegion // RunnableTests
|
||||
|
||||
#EndRegion // Internal
|
||||
|
||||
#Region Private
|
||||
|
||||
#Region AtomicTests
|
||||
|
||||
#Region ZeroMQ
|
||||
|
||||
#EndRegion // ZeroMQ
|
||||
|
||||
#EndRegion // AtomicTests
|
||||
|
||||
#EndRegion // Private
|
||||
|
||||
#Region Alternate
|
||||
|
||||
|
||||
|
||||
#EndRegion
|
||||
@@ -155,6 +155,7 @@ Function GetTestingSectionMapping() Export
|
||||
Sections.Insert("S3" , 5);
|
||||
Sections.Insert("TCP" , 5);
|
||||
Sections.Insert("WebSocket" , 5);
|
||||
Sections.Insert("ZeroMQ" , 5);
|
||||
Sections.Insert("GreenAPI" , 5);
|
||||
Sections.Insert("GreenMax" , 5);
|
||||
Sections.Insert("Ollama" , 5);
|
||||
@@ -209,6 +210,7 @@ Function GetTestTable(Val TestModule = "") Export
|
||||
GRPC = "GRPC";
|
||||
CHouse = "ClickHouse";
|
||||
RSS = "RSS";
|
||||
ZMQ = "ZeroMQ";
|
||||
|
||||
TestTable = New ValueTable;
|
||||
TestTable.Columns.Add("Method");
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
|
||||
Function GetHashSum() Export
|
||||
|
||||
LastBuildHash = "2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039";
|
||||
LastBuildHash = "90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15";
|
||||
|
||||
Return LastBuildHash;
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039
|
||||
90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
Function GetHashSum() Export
|
||||
|
||||
LastBuildHash = "2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039";
|
||||
LastBuildHash = "90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15";
|
||||
|
||||
Return LastBuildHash;
|
||||
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
// OneScript: ./OInt/tests/Modules/OPItc_ZeroMQ.os
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:UnusedParameters-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
// BSLLS:UsingHardcodePath-off
|
||||
// BSLLS:UnusedLocalVariable-off
|
||||
// BSLLS:DeprecatedMessage-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:CommentedCode-off
|
||||
// BSLLS:AssignAliasFieldsInQuery-off
|
||||
// BSLLS:UsingHardcodeNetworkAddress-off
|
||||
// BSLLS:UnreachableCode-off
|
||||
// BSLLS:UnusedLocalMethod-off
|
||||
// BSLLS:NestedFunctionInParameters-off
|
||||
// BSLLS:MissingTemporaryFileDeletion-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:MagicDate-off
|
||||
// BSLLS:MissingParameterDescription-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:MethodSize-off
|
||||
// BSLLS:NestedConstructorsInStructureDeclaration-off
|
||||
// BSLLS:NumberOfValuesInStructureConstructor-off
|
||||
// BSLLS:UsingHardcodeSecretInformation-off
|
||||
// BSLLS:SpaceAtStartComment-off
|
||||
|
||||
//@skip-check undefined-variable
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check undefined-function-or-procedure
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-unused-local-variable
|
||||
//@skip-check bsl-legacy-check-string-literal
|
||||
//@skip-check bsl-legacy-check-method-for-statements-after-return
|
||||
//@skip-check missing-temporary-file-deletion
|
||||
//@skip-check module-unused-method
|
||||
//@skip-check use-non-recommended-method
|
||||
|
||||
//#Использовать "../../tools/main"
|
||||
//#Использовать "../../tools/http"
|
||||
//#Использовать "../../api"
|
||||
//#Использовать asserts
|
||||
//#Использовать "internal"
|
||||
|
||||
// Для YaxUnit
|
||||
|
||||
Процедура ИсполняемыеСценарии() Экспорт
|
||||
|
||||
OPI_ПолучениеДанныхТестов.СформироватьТестыЯксCLI("ZeroMQ");
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
// Для Asserts
|
||||
|
||||
Функция ПолучитьСписокТестов(ЮнитТестирование) Экспорт
|
||||
|
||||
Возврат OPI_ПолучениеДанныхТестов.СформироватьТестыАссертсCLI("ZeroMQ");
|
||||
|
||||
КонецФункции
|
||||
|
||||
#Область СлужебныйПрограммныйИнтерфейс
|
||||
|
||||
#Область ЗапускаемыеТесты
|
||||
|
||||
#Область ZeroMQ
|
||||
|
||||
#КонецОбласти // ZeroMQ
|
||||
|
||||
#КонецОбласти // ЗапускаемыеТесты
|
||||
|
||||
#КонецОбласти // СлужебныйПрограммныйИнтерфейс
|
||||
|
||||
#Область СлужебныеПроцедурыИФункции
|
||||
|
||||
#Область АтомарныеТесты
|
||||
|
||||
#Область ZeroMQ
|
||||
|
||||
#КонецОбласти // ZeroMQ
|
||||
|
||||
#КонецОбласти // АтомарныеТесты
|
||||
|
||||
#КонецОбласти // СлужебныеПроцедурыИФункции
|
||||
|
||||
#Region Alternate
|
||||
|
||||
|
||||
|
||||
#EndRegion
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039
|
||||
90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15
|
||||
Vendored
+1
@@ -37,4 +37,5 @@
|
||||
<module name="OPI_YandexDisk" file="yadisk/Modules/OPI_YandexDisk.os"/>
|
||||
<module name="OPI_YandexID" file="yandex/Modules/OPI_YandexID.os"/>
|
||||
<module name="OPI_YandexMetrika" file="metrika/Modules/OPI_YandexMetrika.os"/>
|
||||
<module name="OPI_ZeroMQ" file="ws/Modules/OPI_ZeroMQ.os"/>
|
||||
</package-def>
|
||||
|
||||
+5
-5
@@ -76,15 +76,15 @@
|
||||
// Получает данные лога сервера (при включенном логировании в память)
|
||||
//
|
||||
// Параметры:
|
||||
// ОбъектСервера - Произвольный - Объект компоненты сервера или клиента - srv
|
||||
// ОбъектКомпоненты - Произвольный - Объект компоненты сервера или клиента - srv
|
||||
// КакСтрока - Булево - Истина > возвращает лог одной строкой, Ложь > как массив - str
|
||||
// ЧислоСобытий - Число - Число последних событий для получения. 0 > без ограничений - count
|
||||
//
|
||||
// Возвращаемое значение:
|
||||
// Строка, Соответствие Из КлючИЗначение - Лог как строка или соответствие с полным результатом выполнения
|
||||
Функция ПолучитьЛог(Знач ОбъектСервера, Знач КакСтрока = Ложь, Знач ЧислоСобытий = 100) Экспорт
|
||||
Функция ПолучитьЛог(Знач ОбъектКомпоненты, Знач КакСтрока = Ложь, Знач ЧислоСобытий = 100) Экспорт
|
||||
|
||||
Возврат OPI_Компоненты.ПолучитьЛог(ОбъектСервера
|
||||
Возврат OPI_Компоненты.ПолучитьЛог(ОбъектКомпоненты
|
||||
, КакСтрока
|
||||
, ЧислоСобытий);
|
||||
|
||||
@@ -585,8 +585,8 @@ Function GetLoggingSettings(Val WriteToMemory = True, Val MaxEvents = 300, Val F
|
||||
Return ПолучитьНастройкиЛогирования(WriteToMemory, MaxEvents, FilePath);
|
||||
EndFunction
|
||||
|
||||
Function GetLog(Val ServerObject, Val AsString = False, Val EventCount = 100) Export
|
||||
Return ПолучитьЛог(ServerObject, AsString, EventCount);
|
||||
Function GetLog(Val AddInObject, Val AsString = False, Val EventCount = 100) Export
|
||||
Return ПолучитьЛог(AddInObject, AsString, EventCount);
|
||||
EndFunction
|
||||
|
||||
Function CreateConnection(Val Address, Val Tls = Undefined, Val Proxy = Undefined, Val Headers = Undefined, Val Logging = Undefined) Export
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
// OneScript: ./OInt/api/ws/Modules/OPI_ZeroMQ.os
|
||||
// Lib: ZeroMQ
|
||||
// CLI: none
|
||||
// Keywords: zeromq
|
||||
|
||||
// DocsCategory: Exchange
|
||||
// DocsNameRU: ZeroMQ
|
||||
// DocsNameEN: ZeroMQ
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check method-too-many-params
|
||||
|
||||
#Использовать "../../../tools/main"
|
||||
#Использовать "../../../tools/http"
|
||||
|
||||
#Область ПрограммныйИнтерфейс
|
||||
|
||||
#Область Общие
|
||||
|
||||
#КонецОбласти
|
||||
|
||||
#КонецОбласти
|
||||
|
||||
#Region Alternate
|
||||
|
||||
|
||||
|
||||
#EndRegion
|
||||
Vendored
+1
@@ -37,4 +37,5 @@
|
||||
<module name="OPI_YandexDisk" file="api/yadisk/Modules/OPI_YandexDisk.os"/>
|
||||
<module name="OPI_YandexID" file="api/yandex/Modules/OPI_YandexID.os"/>
|
||||
<module name="OPI_YandexMetrika" file="api/metrika/Modules/OPI_YandexMetrika.os"/>
|
||||
<module name="OPI_ZeroMQ" file="api/ws/Modules/OPI_ZeroMQ.os"/>
|
||||
</package-def>
|
||||
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
// OneScript: ./OInt/tests/Modules/OPIt_ZeroMQ.os
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:UnusedParameters-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
// BSLLS:UsingHardcodePath-off
|
||||
// BSLLS:UnusedLocalVariable-off
|
||||
// BSLLS:DeprecatedMessage-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:CommentedCode-off
|
||||
// BSLLS:AssignAliasFieldsInQuery-off
|
||||
// BSLLS:UsingHardcodeNetworkAddress-off
|
||||
// BSLLS:UnreachableCode-off
|
||||
// BSLLS:UnusedLocalMethod-off
|
||||
// BSLLS:NestedFunctionInParameters-off
|
||||
// BSLLS:MissingTemporaryFileDeletion-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:MagicDate-off
|
||||
// BSLLS:MissingParameterDescription-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:MethodSize-off
|
||||
// BSLLS:NestedConstructorsInStructureDeclaration-off
|
||||
// BSLLS:NumberOfValuesInStructureConstructor-off
|
||||
// BSLLS:UsingHardcodeSecretInformation-off
|
||||
// BSLLS:SpaceAtStartComment-off
|
||||
|
||||
//@skip-check undefined-variable
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check undefined-function-or-procedure
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-unused-local-variable
|
||||
//@skip-check bsl-legacy-check-string-literal
|
||||
//@skip-check bsl-legacy-check-method-for-statements-after-return
|
||||
//@skip-check missing-temporary-file-deletion
|
||||
//@skip-check module-unused-method
|
||||
//@skip-check use-non-recommended-method
|
||||
|
||||
#Использовать oint
|
||||
#Использовать asserts
|
||||
#Использовать "internal"
|
||||
|
||||
// Для YaxUnit
|
||||
|
||||
Процедура ИсполняемыеСценарии() Экспорт
|
||||
|
||||
OPI_ПолучениеДанныхТестов.СформироватьТестыЯкс("ZeroMQ");
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
// Для Asserts
|
||||
|
||||
Функция ПолучитьСписокТестов(ЮнитТестирование) Экспорт
|
||||
|
||||
Возврат OPI_ПолучениеДанныхТестов.СформироватьТестыАссертс("ZeroMQ");
|
||||
|
||||
КонецФункции
|
||||
|
||||
#Область СлужебныйПрограммныйИнтерфейс
|
||||
|
||||
#Область ЗапускаемыеТесты
|
||||
|
||||
#Область ZeroMQ
|
||||
|
||||
#КонецОбласти // ZeroMQ
|
||||
|
||||
#КонецОбласти // ЗапускаемыеТесты
|
||||
|
||||
#КонецОбласти // СлужебныйПрограммныйИнтерфейс
|
||||
|
||||
#Область СлужебныеПроцедурыИФункции
|
||||
|
||||
#Область АтомарныеТесты
|
||||
|
||||
#Область ZeroMQ
|
||||
|
||||
#КонецОбласти // ZeroMQ
|
||||
|
||||
#КонецОбласти // АтомарныеТесты
|
||||
|
||||
#КонецОбласти // СлужебныеПроцедурыИФункции
|
||||
|
||||
#Region Alternate
|
||||
|
||||
|
||||
|
||||
#EndRegion
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
// OneScript: ./OInt/tests/Modules/OPItc_ZeroMQ.os
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023-2026 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:UnusedParameters-off
|
||||
// BSLLS:DuplicateStringLiteral-off
|
||||
// BSLLS:UsingHardcodePath-off
|
||||
// BSLLS:UnusedLocalVariable-off
|
||||
// BSLLS:DeprecatedMessage-off
|
||||
// BSLLS:LineLength-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:CommentedCode-off
|
||||
// BSLLS:AssignAliasFieldsInQuery-off
|
||||
// BSLLS:UsingHardcodeNetworkAddress-off
|
||||
// BSLLS:UnreachableCode-off
|
||||
// BSLLS:UnusedLocalMethod-off
|
||||
// BSLLS:NestedFunctionInParameters-off
|
||||
// BSLLS:MissingTemporaryFileDeletion-off
|
||||
// BSLLS:UsingSynchronousCalls-off
|
||||
// BSLLS:MagicNumber-off
|
||||
// BSLLS:MagicDate-off
|
||||
// BSLLS:MissingParameterDescription-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:MethodSize-off
|
||||
// BSLLS:NestedConstructorsInStructureDeclaration-off
|
||||
// BSLLS:NumberOfValuesInStructureConstructor-off
|
||||
// BSLLS:UsingHardcodeSecretInformation-off
|
||||
// BSLLS:SpaceAtStartComment-off
|
||||
|
||||
//@skip-check undefined-variable
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check undefined-function-or-procedure
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check module-unused-local-variable
|
||||
//@skip-check bsl-legacy-check-string-literal
|
||||
//@skip-check bsl-legacy-check-method-for-statements-after-return
|
||||
//@skip-check missing-temporary-file-deletion
|
||||
//@skip-check module-unused-method
|
||||
//@skip-check use-non-recommended-method
|
||||
|
||||
#Использовать "../../tools/main"
|
||||
#Использовать "../../tools/http"
|
||||
#Использовать "../../api"
|
||||
#Использовать asserts
|
||||
#Использовать "internal"
|
||||
|
||||
// Для YaxUnit
|
||||
|
||||
Процедура ИсполняемыеСценарии() Экспорт
|
||||
|
||||
OPI_ПолучениеДанныхТестов.СформироватьТестыЯксCLI("ZeroMQ");
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
// Для Asserts
|
||||
|
||||
Функция ПолучитьСписокТестов(ЮнитТестирование) Экспорт
|
||||
|
||||
Возврат OPI_ПолучениеДанныхТестов.СформироватьТестыАссертсCLI("ZeroMQ");
|
||||
|
||||
КонецФункции
|
||||
|
||||
#Область СлужебныйПрограммныйИнтерфейс
|
||||
|
||||
#Область ЗапускаемыеТесты
|
||||
|
||||
#Область ZeroMQ
|
||||
|
||||
#КонецОбласти // ZeroMQ
|
||||
|
||||
#КонецОбласти // ЗапускаемыеТесты
|
||||
|
||||
#КонецОбласти // СлужебныйПрограммныйИнтерфейс
|
||||
|
||||
#Область СлужебныеПроцедурыИФункции
|
||||
|
||||
#Область АтомарныеТесты
|
||||
|
||||
#Область ZeroMQ
|
||||
|
||||
#КонецОбласти // ZeroMQ
|
||||
|
||||
#КонецОбласти // АтомарныеТесты
|
||||
|
||||
#КонецОбласти // СлужебныеПроцедурыИФункции
|
||||
|
||||
#Region Alternate
|
||||
|
||||
|
||||
|
||||
#EndRegion
|
||||
@@ -155,6 +155,7 @@
|
||||
Разделы.Вставить("S3" , 5);
|
||||
Разделы.Вставить("TCP" , 5);
|
||||
Разделы.Вставить("WebSocket" , 5);
|
||||
Разделы.Вставить("ZeroMQ" , 5);
|
||||
Разделы.Вставить("GreenAPI" , 5);
|
||||
Разделы.Вставить("GreenMax" , 5);
|
||||
Разделы.Вставить("Ollama" , 5);
|
||||
@@ -209,6 +210,7 @@
|
||||
GRPC = "GRPC";
|
||||
CHouse = "ClickHouse";
|
||||
RSS = "RSS";
|
||||
ZMQ = "ZeroMQ";
|
||||
|
||||
ТаблицаТестов = Новый ТаблицаЗначений;
|
||||
ТаблицаТестов.Колонки.Добавить("Метод");
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
|
||||
Function GetHashSum() Export
|
||||
|
||||
LastBuildHash = "2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039";
|
||||
LastBuildHash = "90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15";
|
||||
|
||||
Return LastBuildHash;
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
2C23C0530773FAAA1B222C635955E927EEB9B7D45CACCD3699049161A2E2D039
|
||||
90E2FA981862C6C69EB955DB282C4550D70FE87C846D3DDD1ADFCCD015BFCA15
|
||||
Reference in New Issue
Block a user