You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-23 22:05:15 +02:00
99 lines
3.3 KiB
Plaintext
Vendored
99 lines
3.3 KiB
Plaintext
Vendored
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/OpiBuild/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{
|
|
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-GoogleDrive') {
|
|
steps {
|
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "GW_Auth"')
|
|
}
|
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "GD_GetCatalogList"')
|
|
}
|
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "GD_UploadDeleteFile"')
|
|
}
|
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "GD_CreateDeleteComment"')
|
|
}
|
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
runCommand('1testrunner -run "./src/en/OInt/tests/Modules/internal/OPI_TestsCLI.os" "GD_CreateCatalog"')
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |