You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-08-10 22:41:43 +02:00
Main build (Jenkins)
This commit is contained in:
87
ci/split_tests/Airtable/cli_deb_test_en
vendored
Normal file
87
ci/split_tests/Airtable/cli_deb_test_en
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_en.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateDatabase"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateField"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateDeleteRecords"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
87
ci/split_tests/Airtable/cli_deb_test_ru
vendored
Normal file
87
ci/split_tests/Airtable/cli_deb_test_ru
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_ru.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьБазу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьПоле"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьУдалитьЗаписи"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
86
ci/split_tests/Airtable/cli_rpm_test_en
vendored
Normal file
86
ci/split_tests/Airtable/cli_rpm_test_en
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateDatabase"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateField"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateDeleteRecords"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
86
ci/split_tests/Airtable/cli_rpm_test_ru
vendored
Normal file
86
ci/split_tests/Airtable/cli_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьБазу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьПоле"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьУдалитьЗаписи"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
166
ci/split_tests/Airtable/cli_test_en
vendored
Normal file
166
ci/split_tests/Airtable/cli_test_en
vendored
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateDatabase"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateField"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_AT_CreateDeleteRecords"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
166
ci/split_tests/Airtable/cli_test_ru
vendored
Normal file
166
ci/split_tests/Airtable/cli_test_ru
vendored
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьБазу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьПоле"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_АТ_СоздатьУдалитьЗаписи"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
ci/split_tests/Airtable/os_deb_test_en
vendored
Normal file
97
ci/split_tests/Airtable/os_deb_test_en
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateDatabase"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateField"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateDeleteRecords"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
ci/split_tests/Airtable/os_deb_test_ru
vendored
Normal file
97
ci/split_tests/Airtable/os_deb_test_ru
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьБазу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьПоле"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьУдалитьЗаписи"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
ci/split_tests/Airtable/os_rpm_test_en
vendored
Normal file
97
ci/split_tests/Airtable/os_rpm_test_en
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateDatabase"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateField"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateDeleteRecords"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
ci/split_tests/Airtable/os_rpm_test_ru
vendored
Normal file
97
ci/split_tests/Airtable/os_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьБазу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьПоле"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьУдалитьЗаписи"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
95
ci/split_tests/Airtable/os_test_en
vendored
Normal file
95
ci/split_tests/Airtable/os_test_en
vendored
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateDatabase"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateField"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "AT_CreateDeleteRecords"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
95
ci/split_tests/Airtable/os_test_ru
vendored
Normal file
95
ci/split_tests/Airtable/os_test_ru
vendored
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-Airtable') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьБазу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьПоле"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "АТ_СоздатьУдалитьЗаписи"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
123
ci/split_tests/Bitrix24/cli_deb_test_en
vendored
Normal file
123
ci/split_tests/Bitrix24/cli_deb_test_en
vendored
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_en.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_TokenManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_ServerTime"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_PostsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_TaskManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_CommentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_WorkingWithDrive"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_Kanban"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_Timekeeping"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_ChatManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_NotificationsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_TasksFieldsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_DepartmentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B2_UsersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_LeadsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_DealsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_CalendarsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
123
ci/split_tests/Bitrix24/cli_deb_test_ru
vendored
Normal file
123
ci/split_tests/Bitrix24/cli_deb_test_ru
vendored
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_ru.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСТокеном"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_СерверноеВремя"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСНовостями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСЗадачами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСКомментариями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСДиском"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_Канбан"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_УчетРабочегоВремени"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСЧатами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСУведомлениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСПолямиЗадач"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_УправлениеПодразделениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_УправлениеПользователями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСЛидами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСоСделками"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСКалендарями"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
122
ci/split_tests/Bitrix24/cli_rpm_test_en
vendored
Normal file
122
ci/split_tests/Bitrix24/cli_rpm_test_en
vendored
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_TokenManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_ServerTime"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_PostsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_TaskManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_CommentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_WorkingWithDrive"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_Kanban"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_Timekeeping"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_ChatManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_NotificationsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_TasksFieldsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_DepartmentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B2_UsersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_LeadsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_DealsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_CalendarsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
122
ci/split_tests/Bitrix24/cli_rpm_test_ru
vendored
Normal file
122
ci/split_tests/Bitrix24/cli_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСТокеном"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_СерверноеВремя"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСНовостями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСЗадачами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСКомментариями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСДиском"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_Канбан"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_УчетРабочегоВремени"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСЧатами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСУведомлениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСПолямиЗадач"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_УправлениеПодразделениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_УправлениеПользователями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСЛидами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСоСделками"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСКалендарями"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
202
ci/split_tests/Bitrix24/cli_test_en
vendored
Normal file
202
ci/split_tests/Bitrix24/cli_test_en
vendored
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_TokenManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_ServerTime"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_PostsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_TaskManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_CommentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_WorkingWithDrive"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_Kanban"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_Timekeeping"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_ChatManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_NotificationsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_TasksFieldsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_DepartmentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B2_UsersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_LeadsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_DealsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_B24_CalendarsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
202
ci/split_tests/Bitrix24/cli_test_ru
vendored
Normal file
202
ci/split_tests/Bitrix24/cli_test_ru
vendored
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСТокеном"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_СерверноеВремя"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСНовостями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСЗадачами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСКомментариями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСДиском"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_Канбан"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_УчетРабочегоВремени"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСЧатами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСУведомлениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСПолямиЗадач"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_УправлениеПодразделениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_УправлениеПользователями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСЛидами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСоСделками"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Б24_РаботаСКалендарями"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
133
ci/split_tests/Bitrix24/os_deb_test_en
vendored
Normal file
133
ci/split_tests/Bitrix24/os_deb_test_en
vendored
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_TokenManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_ServerTime"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_PostsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_TaskManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_CommentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_WorkingWithDrive"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_Kanban"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_Timekeeping"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_ChatManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_NotificationsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_TasksFieldsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_DepartmentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B2_UsersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_LeadsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_DealsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_CalendarsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
133
ci/split_tests/Bitrix24/os_deb_test_ru
vendored
Normal file
133
ci/split_tests/Bitrix24/os_deb_test_ru
vendored
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСТокеном"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_СерверноеВремя"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСНовостями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСЗадачами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСКомментариями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСДиском"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_Канбан"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_УчетРабочегоВремени"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСЧатами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСУведомлениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСПолямиЗадач"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_УправлениеПодразделениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_УправлениеПользователями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСЛидами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСоСделками"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСКалендарями"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
133
ci/split_tests/Bitrix24/os_rpm_test_en
vendored
Normal file
133
ci/split_tests/Bitrix24/os_rpm_test_en
vendored
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_TokenManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_ServerTime"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_PostsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_TaskManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_CommentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_WorkingWithDrive"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_Kanban"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_Timekeeping"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_ChatManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_NotificationsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_TasksFieldsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_DepartmentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B2_UsersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_LeadsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_DealsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_CalendarsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
133
ci/split_tests/Bitrix24/os_rpm_test_ru
vendored
Normal file
133
ci/split_tests/Bitrix24/os_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСТокеном"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_СерверноеВремя"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСНовостями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСЗадачами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСКомментариями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСДиском"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_Канбан"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_УчетРабочегоВремени"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСЧатами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСУведомлениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСПолямиЗадач"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_УправлениеПодразделениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_УправлениеПользователями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСЛидами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСоСделками"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСКалендарями"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
131
ci/split_tests/Bitrix24/os_test_en
vendored
Normal file
131
ci/split_tests/Bitrix24/os_test_en
vendored
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_TokenManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_ServerTime"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_PostsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_TaskManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_CommentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_WorkingWithDrive"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_Kanban"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_Timekeeping"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_ChatManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_NotificationsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_TasksFieldsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_DepartmentsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B2_UsersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_LeadsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_DealsManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "B24_CalendarsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
131
ci/split_tests/Bitrix24/os_test_ru
vendored
Normal file
131
ci/split_tests/Bitrix24/os_test_ru
vendored
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-Bitrix24') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСТокеном"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_СерверноеВремя"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСНовостями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСЗадачами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСКомментариями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСДиском"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_Канбан"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_УчетРабочегоВремени"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСЧатами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСУведомлениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСПолямиЗадач"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_УправлениеПодразделениями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_УправлениеПользователями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСЛидами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСоСделками"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Б24_РаботаСКалендарями"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
84
ci/split_tests/CDEK/cli_deb_test_en
vendored
Normal file
84
ci/split_tests/CDEK/cli_deb_test_en
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_en.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_CdekAPI_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_CDEKAPI_OrdersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_CdekAPI_CourierInvitationsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
84
ci/split_tests/CDEK/cli_deb_test_ru
vendored
Normal file
84
ci/split_tests/CDEK/cli_deb_test_ru
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_ru.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_СдэкАПИ_ОбщиеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_СдэкАПИ_РаботаСЗаказами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_СдэкАПИ_РаботаСЗаявкамиНаВызовКурьера"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
83
ci/split_tests/CDEK/cli_rpm_test_en
vendored
Normal file
83
ci/split_tests/CDEK/cli_rpm_test_en
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_CdekAPI_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_CDEKAPI_OrdersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_CdekAPI_CourierInvitationsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
83
ci/split_tests/CDEK/cli_rpm_test_ru
vendored
Normal file
83
ci/split_tests/CDEK/cli_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_СдэкАПИ_ОбщиеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_СдэкАПИ_РаботаСЗаказами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_СдэкАПИ_РаботаСЗаявкамиНаВызовКурьера"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
163
ci/split_tests/CDEK/cli_test_en
vendored
Normal file
163
ci/split_tests/CDEK/cli_test_en
vendored
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_CdekAPI_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_CDEKAPI_OrdersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_CdekAPI_CourierInvitationsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
163
ci/split_tests/CDEK/cli_test_ru
vendored
Normal file
163
ci/split_tests/CDEK/cli_test_ru
vendored
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_СдэкАПИ_ОбщиеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_СдэкАПИ_РаботаСЗаказами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_СдэкАПИ_РаботаСЗаявкамиНаВызовКурьера"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/CDEK/os_deb_test_en
vendored
Normal file
94
ci/split_tests/CDEK/os_deb_test_en
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "CdekAPI_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "CDEKAPI_OrdersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "CdekAPI_CourierInvitationsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/CDEK/os_deb_test_ru
vendored
Normal file
94
ci/split_tests/CDEK/os_deb_test_ru
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "СдэкАПИ_ОбщиеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "СдэкАПИ_РаботаСЗаказами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "СдэкАПИ_РаботаСЗаявкамиНаВызовКурьера"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/CDEK/os_rpm_test_en
vendored
Normal file
94
ci/split_tests/CDEK/os_rpm_test_en
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "CdekAPI_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "CDEKAPI_OrdersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "CdekAPI_CourierInvitationsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/CDEK/os_rpm_test_ru
vendored
Normal file
94
ci/split_tests/CDEK/os_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "СдэкАПИ_ОбщиеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "СдэкАПИ_РаботаСЗаказами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "СдэкАПИ_РаботаСЗаявкамиНаВызовКурьера"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
92
ci/split_tests/CDEK/os_test_en
vendored
Normal file
92
ci/split_tests/CDEK/os_test_en
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "CdekAPI_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "CDEKAPI_OrdersManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "CdekAPI_CourierInvitationsManagement"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
92
ci/split_tests/CDEK/os_test_ru
vendored
Normal file
92
ci/split_tests/CDEK/os_test_ru
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-CDEK') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "СдэкАПИ_ОбщиеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "СдэкАПИ_РаботаСЗаказами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "СдэкАПИ_РаботаСЗаявкамиНаВызовКурьера"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
99
ci/split_tests/Dropbox/cli_deb_test_en
vendored
Normal file
99
ci/split_tests/Dropbox/cli_deb_test_en
vendored
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_en.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_GetUpdateToken"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_UploadFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_UploadFileByURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_CreateFolder"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_CreateDeleteTag"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_GetAccount"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_AccessManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_GetFolderFileList"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
99
ci/split_tests/Dropbox/cli_deb_test_ru
vendored
Normal file
99
ci/split_tests/Dropbox/cli_deb_test_ru
vendored
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_ru.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ПолучитьОбновитьТокен"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ЗагрузитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ЗагрузитьФайлПоURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_СоздатьУдалитьТег"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ПолучитьАккаунт"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_РаботаСДоступами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ПолучитьСписокФайловПапки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
98
ci/split_tests/Dropbox/cli_rpm_test_en
vendored
Normal file
98
ci/split_tests/Dropbox/cli_rpm_test_en
vendored
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_GetUpdateToken"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_UploadFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_UploadFileByURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_CreateFolder"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_CreateDeleteTag"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_GetAccount"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_AccessManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_GetFolderFileList"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
98
ci/split_tests/Dropbox/cli_rpm_test_ru
vendored
Normal file
98
ci/split_tests/Dropbox/cli_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ПолучитьОбновитьТокен"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ЗагрузитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ЗагрузитьФайлПоURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_СоздатьУдалитьТег"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ПолучитьАккаунт"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_РаботаСДоступами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ПолучитьСписокФайловПапки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
178
ci/split_tests/Dropbox/cli_test_en
vendored
Normal file
178
ci/split_tests/Dropbox/cli_test_en
vendored
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_GetUpdateToken"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_UploadFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_UploadFileByURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_CreateFolder"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_CreateDeleteTag"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_GetAccount"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_AccessManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_DropboxAPI_GetFolderFileList"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
178
ci/split_tests/Dropbox/cli_test_ru
vendored
Normal file
178
ci/split_tests/Dropbox/cli_test_ru
vendored
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ПолучитьОбновитьТокен"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ЗагрузитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ЗагрузитьФайлПоURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_СоздатьУдалитьТег"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ПолучитьАккаунт"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_РаботаСДоступами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ДропБокс_ПолучитьСписокФайловПапки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
109
ci/split_tests/Dropbox/os_deb_test_en
vendored
Normal file
109
ci/split_tests/Dropbox/os_deb_test_en
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_GetUpdateToken"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_UploadFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_UploadFileByURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_CreateFolder"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_CreateDeleteTag"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_GetAccount"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_AccessManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_GetFolderFileList"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
109
ci/split_tests/Dropbox/os_deb_test_ru
vendored
Normal file
109
ci/split_tests/Dropbox/os_deb_test_ru
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ПолучитьОбновитьТокен"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ЗагрузитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ЗагрузитьФайлПоURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_СоздатьУдалитьТег"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ПолучитьАккаунт"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_РаботаСДоступами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ПолучитьСписокФайловПапки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
109
ci/split_tests/Dropbox/os_rpm_test_en
vendored
Normal file
109
ci/split_tests/Dropbox/os_rpm_test_en
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_GetUpdateToken"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_UploadFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_UploadFileByURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_CreateFolder"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_CreateDeleteTag"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_GetAccount"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_AccessManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_GetFolderFileList"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
109
ci/split_tests/Dropbox/os_rpm_test_ru
vendored
Normal file
109
ci/split_tests/Dropbox/os_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ПолучитьОбновитьТокен"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ЗагрузитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ЗагрузитьФайлПоURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_СоздатьУдалитьТег"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ПолучитьАккаунт"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_РаботаСДоступами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ПолучитьСписокФайловПапки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
107
ci/split_tests/Dropbox/os_test_en
vendored
Normal file
107
ci/split_tests/Dropbox/os_test_en
vendored
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_GetUpdateToken"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_UploadFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_UploadFileByURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_CreateFolder"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_CreateDeleteTag"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_GetAccount"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_AccessManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "DropboxAPI_GetFolderFileList"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
107
ci/split_tests/Dropbox/os_test_ru
vendored
Normal file
107
ci/split_tests/Dropbox/os_test_ru
vendored
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-Dropbox') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ПолучитьОбновитьТокен"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ЗагрузитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ЗагрузитьФайлПоURL"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_СоздатьУдалитьТег"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ПолучитьАккаунт"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_РаботаСДоступами"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ДропБокс_ПолучитьСписокФайловПапки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
84
ci/split_tests/FTP/cli_deb_test_en
vendored
Normal file
84
ci/split_tests/FTP/cli_deb_test_en
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_en.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_FT_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_FT_DirecotryManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_FT_FileOperations"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
84
ci/split_tests/FTP/cli_deb_test_ru
vendored
Normal file
84
ci/split_tests/FTP/cli_deb_test_ru
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_ru.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_FT_ОсновныеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_FT_РаботаСДиректориями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_FT_РаботаСФайлами"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
83
ci/split_tests/FTP/cli_rpm_test_en
vendored
Normal file
83
ci/split_tests/FTP/cli_rpm_test_en
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_FT_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_FT_DirecotryManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_FT_FileOperations"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
83
ci/split_tests/FTP/cli_rpm_test_ru
vendored
Normal file
83
ci/split_tests/FTP/cli_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_FT_ОсновныеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_FT_РаботаСДиректориями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_FT_РаботаСФайлами"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
163
ci/split_tests/FTP/cli_test_en
vendored
Normal file
163
ci/split_tests/FTP/cli_test_en
vendored
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_FT_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_FT_DirecotryManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_FT_FileOperations"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
163
ci/split_tests/FTP/cli_test_ru
vendored
Normal file
163
ci/split_tests/FTP/cli_test_ru
vendored
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_FT_ОсновныеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_FT_РаботаСДиректориями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_FT_РаботаСФайлами"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/FTP/os_deb_test_en
vendored
Normal file
94
ci/split_tests/FTP/os_deb_test_en
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "FT_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "FT_DirecotryManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "FT_FileOperations"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/FTP/os_deb_test_ru
vendored
Normal file
94
ci/split_tests/FTP/os_deb_test_ru
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "FT_ОсновныеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "FT_РаботаСДиректориями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "FT_РаботаСФайлами"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/FTP/os_rpm_test_en
vendored
Normal file
94
ci/split_tests/FTP/os_rpm_test_en
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "FT_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "FT_DirecotryManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "FT_FileOperations"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/FTP/os_rpm_test_ru
vendored
Normal file
94
ci/split_tests/FTP/os_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "FT_ОсновныеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "FT_РаботаСДиректориями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "FT_РаботаСФайлами"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
92
ci/split_tests/FTP/os_test_en
vendored
Normal file
92
ci/split_tests/FTP/os_test_en
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "FT_CommonMethods"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "FT_DirecotryManagement"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "FT_FileOperations"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
92
ci/split_tests/FTP/os_test_ru
vendored
Normal file
92
ci/split_tests/FTP/os_test_ru
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-FTP') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "FT_ОсновныеМетоды"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "FT_РаботаСДиректориями"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "FT_РаботаСФайлами"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
87
ci/split_tests/GoogleCalendar/cli_deb_test_en
vendored
Normal file
87
ci/split_tests/GoogleCalendar/cli_deb_test_en
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_en.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GC_GetCalendarList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GC_CreateDeleteCalendar"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GC_CreateDeleteEvent"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
87
ci/split_tests/GoogleCalendar/cli_deb_test_ru
vendored
Normal file
87
ci/split_tests/GoogleCalendar/cli_deb_test_ru
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_ru.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГК_ПолучитьСписокКалендарей"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГК_СоздатьУдалитьКалендарь"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГК_СоздатьУдалитьСобытие"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
86
ci/split_tests/GoogleCalendar/cli_rpm_test_en
vendored
Normal file
86
ci/split_tests/GoogleCalendar/cli_rpm_test_en
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GC_GetCalendarList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GC_CreateDeleteCalendar"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GC_CreateDeleteEvent"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
86
ci/split_tests/GoogleCalendar/cli_rpm_test_ru
vendored
Normal file
86
ci/split_tests/GoogleCalendar/cli_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГК_ПолучитьСписокКалендарей"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГК_СоздатьУдалитьКалендарь"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГК_СоздатьУдалитьСобытие"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
166
ci/split_tests/GoogleCalendar/cli_test_en
vendored
Normal file
166
ci/split_tests/GoogleCalendar/cli_test_en
vendored
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GC_GetCalendarList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GC_CreateDeleteCalendar"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GC_CreateDeleteEvent"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
166
ci/split_tests/GoogleCalendar/cli_test_ru
vendored
Normal file
166
ci/split_tests/GoogleCalendar/cli_test_ru
vendored
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГК_ПолучитьСписокКалендарей"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГК_СоздатьУдалитьКалендарь"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГК_СоздатьУдалитьСобытие"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
ci/split_tests/GoogleCalendar/os_deb_test_en
vendored
Normal file
97
ci/split_tests/GoogleCalendar/os_deb_test_en
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GC_GetCalendarList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GC_CreateDeleteCalendar"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GC_CreateDeleteEvent"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
ci/split_tests/GoogleCalendar/os_deb_test_ru
vendored
Normal file
97
ci/split_tests/GoogleCalendar/os_deb_test_ru
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГК_ПолучитьСписокКалендарей"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГК_СоздатьУдалитьКалендарь"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГК_СоздатьУдалитьСобытие"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
ci/split_tests/GoogleCalendar/os_rpm_test_en
vendored
Normal file
97
ci/split_tests/GoogleCalendar/os_rpm_test_en
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GC_GetCalendarList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GC_CreateDeleteCalendar"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GC_CreateDeleteEvent"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
ci/split_tests/GoogleCalendar/os_rpm_test_ru
vendored
Normal file
97
ci/split_tests/GoogleCalendar/os_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГК_ПолучитьСписокКалендарей"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГК_СоздатьУдалитьКалендарь"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГК_СоздатьУдалитьСобытие"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
95
ci/split_tests/GoogleCalendar/os_test_en
vendored
Normal file
95
ci/split_tests/GoogleCalendar/os_test_en
vendored
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GC_GetCalendarList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GC_CreateDeleteCalendar"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GC_CreateDeleteEvent"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
95
ci/split_tests/GoogleCalendar/os_test_ru
vendored
Normal file
95
ci/split_tests/GoogleCalendar/os_test_ru
vendored
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-GoogleCalendar') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГК_ПолучитьСписокКалендарей"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГК_СоздатьУдалитьКалендарь"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГК_СоздатьУдалитьСобытие"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
90
ci/split_tests/GoogleDrive/cli_deb_test_en
vendored
Normal file
90
ci/split_tests/GoogleDrive/cli_deb_test_en
vendored
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_en.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_GetCatalogList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_UploadDeleteFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_CreateDeleteComment"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_CreateCatalog"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
90
ci/split_tests/GoogleDrive/cli_deb_test_ru
vendored
Normal file
90
ci/split_tests/GoogleDrive/cli_deb_test_ru
vendored
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_ru.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_ПолучитьСписокКаталогов"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_ЗагрузитьУдалитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_СоздатьУдалитьКомментарий"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
89
ci/split_tests/GoogleDrive/cli_rpm_test_en
vendored
Normal file
89
ci/split_tests/GoogleDrive/cli_rpm_test_en
vendored
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_GetCatalogList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_UploadDeleteFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_CreateDeleteComment"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_CreateCatalog"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
89
ci/split_tests/GoogleDrive/cli_rpm_test_ru
vendored
Normal file
89
ci/split_tests/GoogleDrive/cli_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_ПолучитьСписокКаталогов"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_ЗагрузитьУдалитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_СоздатьУдалитьКомментарий"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
169
ci/split_tests/GoogleDrive/cli_test_en
vendored
Normal file
169
ci/split_tests/GoogleDrive/cli_test_en
vendored
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_GetCatalogList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_UploadDeleteFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_CreateDeleteComment"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GD_CreateCatalog"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
169
ci/split_tests/GoogleDrive/cli_test_ru
vendored
Normal file
169
ci/split_tests/GoogleDrive/cli_test_ru
vendored
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_ПолучитьСписокКаталогов"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_ЗагрузитьУдалитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_СоздатьУдалитьКомментарий"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГД_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
100
ci/split_tests/GoogleDrive/os_deb_test_en
vendored
Normal file
100
ci/split_tests/GoogleDrive/os_deb_test_en
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_GetCatalogList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_UploadDeleteFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_CreateDeleteComment"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_CreateCatalog"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
100
ci/split_tests/GoogleDrive/os_deb_test_ru
vendored
Normal file
100
ci/split_tests/GoogleDrive/os_deb_test_ru
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_ПолучитьСписокКаталогов"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_ЗагрузитьУдалитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_СоздатьУдалитьКомментарий"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
100
ci/split_tests/GoogleDrive/os_rpm_test_en
vendored
Normal file
100
ci/split_tests/GoogleDrive/os_rpm_test_en
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_GetCatalogList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_UploadDeleteFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_CreateDeleteComment"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_CreateCatalog"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
100
ci/split_tests/GoogleDrive/os_rpm_test_ru
vendored
Normal file
100
ci/split_tests/GoogleDrive/os_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_ПолучитьСписокКаталогов"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_ЗагрузитьУдалитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_СоздатьУдалитьКомментарий"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
98
ci/split_tests/GoogleDrive/os_test_en
vendored
Normal file
98
ci/split_tests/GoogleDrive/os_test_en
vendored
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_GetCatalogList"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_UploadDeleteFile"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_CreateDeleteComment"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GD_CreateCatalog"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
98
ci/split_tests/GoogleDrive/os_test_ru
vendored
Normal file
98
ci/split_tests/GoogleDrive/os_test_ru
vendored
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-GoogleDrive') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_ПолучитьСписокКаталогов"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_ЗагрузитьУдалитьФайл"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_СоздатьУдалитьКомментарий"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГД_СоздатьКаталог"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
84
ci/split_tests/GoogleSheets/cli_deb_test_en
vendored
Normal file
84
ci/split_tests/GoogleSheets/cli_deb_test_en
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_en.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GT_FillClearCells"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
84
ci/split_tests/GoogleSheets/cli_deb_test_ru
vendored
Normal file
84
ci/split_tests/GoogleSheets/cli_deb_test_ru
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_ru.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГТ_ЗаполнитьОчиститьЯчейки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
83
ci/split_tests/GoogleSheets/cli_rpm_test_en
vendored
Normal file
83
ci/split_tests/GoogleSheets/cli_rpm_test_en
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GT_FillClearCells"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
83
ci/split_tests/GoogleSheets/cli_rpm_test_ru
vendored
Normal file
83
ci/split_tests/GoogleSheets/cli_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГТ_ЗаполнитьОчиститьЯчейки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
163
ci/split_tests/GoogleSheets/cli_test_en
vendored
Normal file
163
ci/split_tests/GoogleSheets/cli_test_en
vendored
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GT_FillClearCells"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
163
ci/split_tests/GoogleSheets/cli_test_ru
vendored
Normal file
163
ci/split_tests/GoogleSheets/cli_test_ru
vendored
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Decrypt Data') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --quiet --batch --yes --decrypt --passphrase="%GPGKEY%" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Remove oint.bat if exists') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Remove-Item -Path $batFile -Force
|
||||||
|
Write-Host "Файл oint.bat удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Файл oint.bat не найден, пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что файл действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files\\OneScript\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: Файл oint.bat не удален!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat успешно удален или отсутствовал."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Uninstall OInt if installed') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$uninstallerPath = "C:\\Program Files (x86)\\OInt\\unins000.exe"
|
||||||
|
if (Test-Path $uninstallerPath) {
|
||||||
|
Write-Host "OInt найден. Запускаем удаление..."
|
||||||
|
Start-Process -FilePath $uninstallerPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
|
||||||
|
Write-Host "Удаление OInt завершено."
|
||||||
|
} else {
|
||||||
|
Write-Host "OInt не установлен. Пропускаем этап удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что oint.bat в C:\Program Files (x86)\OInt\bin\oint.bat удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$batFile = "C:\\Program Files (x86)\\OInt\\bin\\oint.bat"
|
||||||
|
if (Test-Path $batFile) {
|
||||||
|
Write-Error "Ошибка: oint.bat всё ещё существует после uninstall!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: oint.bat после uninstall отсутствует."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare Download Dir') {
|
||||||
|
steps {
|
||||||
|
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download Installer') {
|
||||||
|
steps {
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.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('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГТ_ЗаполнитьОчиститьЯчейки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/GoogleSheets/os_deb_test_en
vendored
Normal file
94
ci/split_tests/GoogleSheets/os_deb_test_en
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GT_FillClearCells"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/GoogleSheets/os_deb_test_ru
vendored
Normal file
94
ci/split_tests/GoogleSheets/os_deb_test_ru
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГТ_ЗаполнитьОчиститьЯчейки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/GoogleSheets/os_rpm_test_en
vendored
Normal file
94
ci/split_tests/GoogleSheets/os_rpm_test_en
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/en/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GT_FillClearCells"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
94
ci/split_tests/GoogleSheets/os_rpm_test_ru
vendored
Normal file
94
ci/split_tests/GoogleSheets/os_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога /opt/onescript/lib/oint, если существует
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Каталог oint найден. Удаляем..."
|
||||||
|
rm -rf "$DIR_PATH"
|
||||||
|
echo "Каталог oint успешно удален."
|
||||||
|
else
|
||||||
|
echo "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
sh '''
|
||||||
|
DIR_PATH="/opt/onescript/lib/oint"
|
||||||
|
|
||||||
|
if [ -d "$DIR_PATH" ]; then
|
||||||
|
echo "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
sh 'cd ./src/ru/OInt && opm build && opm install oint-1.27.0.ospx && rm oint-1.27.0.ospx'
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГТ_ЗаполнитьОчиститьЯчейки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
92
ci/split_tests/GoogleSheets/os_test_en
vendored
Normal file
92
ci/split_tests/GoogleSheets/os_test_en
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/en/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GW_Auth"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GT_CreateTable"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_Tests.os" "GT_FillClearCells"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
92
ci/split_tests/GoogleSheets/os_test_ru
vendored
Normal file
92
ci/split_tests/GoogleSheets/os_test_ru
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Remove OInt from OneScript Lib') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
// Удаление каталога C:\Program Files\OneScript\lib\oint, если существует
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Host "Каталог oint найден. Удаляем..."
|
||||||
|
Remove-Item -Path $dirPath -Recurse -Force
|
||||||
|
Write-Host "Каталог oint успешно удален."
|
||||||
|
} else {
|
||||||
|
Write-Host "Каталог oint не найден. Пропускаем удаление."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
// Проверяем, что каталог действительно удален
|
||||||
|
powershell encoding: 'UTF-8', script: '''
|
||||||
|
$dirPath = "C:\\Program Files\\OneScript\\lib\\oint"
|
||||||
|
if (Test-Path $dirPath) {
|
||||||
|
Write-Error "Ошибка: Каталог oint всё ещё существует после попытки удаления!"
|
||||||
|
exit 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Проверка: Каталог oint отсутствует после удаления."
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
} catch (Exception e) {
|
||||||
|
echo "Произошла ошибка при удалении каталога oint: ${e.getMessage()}"
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
error("Удаление каталога oint завершено с ошибкой.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build OInt from source and decrypt secret data'){
|
||||||
|
steps{
|
||||||
|
powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install oint-1.27.0.ospx; del oint-1.27.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('Testing-GoogleSheets') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГТ_СоздатьТаблицу"')
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "ГТ_ЗаполнитьОчиститьЯчейки"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json.gpg"'
|
||||||
|
bat encoding: 'UTF-8', script:'gpg --batch --symmetric --cipher-algo AES256 --passphrase="%GPGKEY%" ./data.json'
|
||||||
|
bat encoding: 'UTF-8', script:'del "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
bat "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
bat 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
bat "git config --global core.ignorecase true"
|
||||||
|
bat "git add ."
|
||||||
|
bat 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
bat "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
78
ci/split_tests/GoogleWorkspace/cli_deb_test_en
vendored
Normal file
78
ci/split_tests/GoogleWorkspace/cli_deb_test_en
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_en.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_en.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_en.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleWorkspace') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
78
ci/split_tests/GoogleWorkspace/cli_deb_test_ru
vendored
Normal file
78
ci/split_tests/GoogleWorkspace/cli_deb_test_ru
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Deb-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'dpkg -r oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый deb-пакет oint
|
||||||
|
sh 'wget -O oint_1.27.0_all_ru.deb https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint_1.27.0_all_ru.deb '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'dpkg -i oint_1.27.0_all_ru.deb'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleWorkspace') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
77
ci/split_tests/GoogleWorkspace/cli_rpm_test_en
vendored
Normal file
77
ci/split_tests/GoogleWorkspace/cli_rpm_test_en
vendored
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_en.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_en.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_en.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleWorkspace') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "CLI_GW_Auth"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
77
ci/split_tests/GoogleWorkspace/cli_rpm_test_ru
vendored
Normal file
77
ci/split_tests/GoogleWorkspace/cli_rpm_test_ru
vendored
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
def runCommand(String command) {
|
||||||
|
if (isUnix()) {
|
||||||
|
sh(script: command)
|
||||||
|
} else {
|
||||||
|
bat(script: command)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'Rpm-Agent' // Имя или метка агента
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Remove oint') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Удаляем oint, если он установлен
|
||||||
|
sh 'rpm -e oint || echo "oint not installed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Download oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Скачиваем новый rpm-пакет oint
|
||||||
|
sh 'wget -O oint-1.27.0-1.noarch_ru.rpm https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.27.0/oint-1.27.0-1.noarch_ru.rpm '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install oint package') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Устанавливаем скаченный пакет
|
||||||
|
sh 'rpm -ivh --replacepkgs oint-1.27.0-1.noarch_ru.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Prepare'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'gpg --quiet --batch --yes --decrypt --passphrase="$GPGKEY" --output ./data.json ./data.json.gpg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Testing-GoogleWorkspace') {
|
||||||
|
steps {
|
||||||
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
|
runCommand('1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_ГВ_Авторизация"')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
always{
|
||||||
|
script {
|
||||||
|
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||||
|
sh 'rm "./data.json.gpg"'
|
||||||
|
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
|
||||||
|
sh 'rm "./data.json"'
|
||||||
|
}
|
||||||
|
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
|
||||||
|
sh "git config user.email vitaly.the.alpaca@gmail.com"
|
||||||
|
sh 'git config user.name "Vitaly the Alpaca (bot)"'
|
||||||
|
sh "git config --global core.ignorecase true"
|
||||||
|
sh "git add ."
|
||||||
|
sh 'git commit -m "Test data update (Jenkins)"'
|
||||||
|
sh "git push origin HEAD:main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user