1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-25 22:12:29 +02:00
Files
OpenIntegrations/ci/split_tests/Bitrix24/cli_rpm_test_en
Vitaly the Alpaca (bot) f006a6b75a Main build (Jenkins)
2025-09-03 09:01:54 +03:00

131 lines
5.3 KiB
Plaintext
Vendored

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/OpiBuild/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{
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('Create ReportPortal launch'){
steps{
sh 'oscript ./ci/os/rp_start.os "CLI"'
}
}
stage('Testing-Bitrix24') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_TokenManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_ServerTime"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_PostsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_TaskManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_CommentsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_WorkingWithDrive"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_Kanban"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_Timekeeping"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_ChatManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_NotificationsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_TasksFieldsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_DepartmentsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B2_UsersManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_LeadsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_DealsManagement"')
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "B24_CalendarsManagement"')
}
}
}
}
post{
always{
script {
catchError() {
runCommand('oscript ./ci/os/rp_stop.os "en"')
}
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
sh 'rm "./data.json.gpg"'
sh 'gpg --batch --symmetric --cipher-algo AES256 --passphrase="$GPGKEY" ./data.json'
sh 'rm "./data.json"'
}
withCredentials([gitUsernamePassword(credentialsId: 'gitmain', gitToolName: 'Default')]) {
sh "git config user.email vitaly.the.alpaca@gmail.com"
sh 'git config user.name "Vitaly the Alpaca (bot)"'
sh "git config --global core.ignorecase true"
sh "git add ."
sh 'git commit -m "Test data update (Jenkins)"'
sh "git push origin HEAD:main"
}
}
}
}
}