You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-06-20 09:19:27 +02:00
Main build (Jenkins)
This commit is contained in:
Vendored
+111
-32
@@ -11,41 +11,120 @@ pipeline {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
stage('Prepare'){
|
||||
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'
|
||||
}
|
||||
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 не найден, пропускаем удаление."
|
||||
}
|
||||
'''
|
||||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Создание директории для загрузки, если её нет
|
||||
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||
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: '''
|
||||
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.26.0/oint_1.26.0_installer_en.exe "
|
||||
$output = "$env:USERPROFILE\\Downloads\\oint_installer.exe"
|
||||
Invoke-WebRequest -Uri $url -OutFile $output
|
||||
Write-Host "Инсталлер скачан в: $output"
|
||||
'''
|
||||
// Проверяем, что файл действительно удален
|
||||
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 успешно удален или отсутствовал."
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
// Запуск инсталляции (тихий режим для Inno Setup)
|
||||
powershell encoding: 'UTF-8', script: '''
|
||||
$installerPath = "$env:USERPROFILE\\Downloads\\oint_installer.exe"
|
||||
Write-Host "Запускаем установку: $installerPath"
|
||||
psexec -s -i "$installerPath" /VERYSILENT /NORESTART
|
||||
Write-Host "Установка завершена."
|
||||
'''
|
||||
}
|
||||
}
|
||||
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.26.0/oint_1.26.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-Telegram') {
|
||||
steps {
|
||||
|
||||
Vendored
+111
-32
@@ -11,41 +11,120 @@ pipeline {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
stage('Prepare'){
|
||||
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'
|
||||
}
|
||||
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 не найден, пропускаем удаление."
|
||||
}
|
||||
'''
|
||||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Создание директории для загрузки, если её нет
|
||||
bat 'if not exist "%USERPROFILE%\\Downloads" mkdir "%USERPROFILE%\\Downloads"'
|
||||
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: '''
|
||||
$url = "https://jenkins.openintegrations.dev/job/OpiRelease/lastSuccessfulBuild/artifact/1.26.0/oint_1.26.0_installer_ru.exe "
|
||||
$output = "$env:USERPROFILE\\Downloads\\oint_installer.exe"
|
||||
Invoke-WebRequest -Uri $url -OutFile $output
|
||||
Write-Host "Инсталлер скачан в: $output"
|
||||
'''
|
||||
// Проверяем, что файл действительно удален
|
||||
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 успешно удален или отсутствовал."
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
// Запуск инсталляции (тихий режим для Inno Setup)
|
||||
powershell encoding: 'UTF-8', script: '''
|
||||
$installerPath = "$env:USERPROFILE\\Downloads\\oint_installer.exe"
|
||||
Write-Host "Запускаем установку: $installerPath"
|
||||
psexec -s -i "$installerPath" /VERYSILENT /NORESTART
|
||||
Write-Host "Установка завершена."
|
||||
'''
|
||||
}
|
||||
}
|
||||
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.26.0/oint_1.26.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-Telegram') {
|
||||
steps {
|
||||
|
||||
Vendored
+37
@@ -11,6 +11,43 @@ pipeline {
|
||||
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.26.0.ospx && rm oint-1.26.0.ospx'
|
||||
|
||||
Vendored
+37
@@ -11,6 +11,43 @@ pipeline {
|
||||
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.26.0.ospx && rm oint-1.26.0.ospx'
|
||||
|
||||
Vendored
+37
@@ -11,6 +11,43 @@ pipeline {
|
||||
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.26.0.ospx && rm oint-1.26.0.ospx'
|
||||
|
||||
Vendored
+37
@@ -11,6 +11,43 @@ pipeline {
|
||||
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.26.0.ospx && rm oint-1.26.0.ospx'
|
||||
|
||||
Vendored
+36
-1
@@ -11,7 +11,42 @@ pipeline {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
stage('Prepare'){
|
||||
|
||||
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.26.0.ospx; del oint-1.26.0.ospx'
|
||||
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||
|
||||
Vendored
+36
-1
@@ -11,7 +11,42 @@ pipeline {
|
||||
label 'windows'
|
||||
}
|
||||
stages {
|
||||
stage('Prepare'){
|
||||
|
||||
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.26.0.ospx; del oint-1.26.0.ospx'
|
||||
withCredentials([string(credentialsId: 'gpgkey', variable: 'GPGKEY')]) {
|
||||
|
||||
+5
-1
@@ -47,4 +47,8 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"result": true
|
||||
}
|
||||
```
|
||||
|
||||
+3
-1
@@ -47,4 +47,6 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
|
||||
```json title="Result"
|
||||
NOT JSON: OneScript.StandardLibrary.NativeApi.NativeApiComponent
|
||||
```
|
||||
|
||||
@@ -47,4 +47,6 @@ This function allows you to quickly assemble a basic connection string. In case
|
||||
|
||||
|
||||
|
||||
|
||||
```json title="Result"
|
||||
"Server=127.0.0.1;User Id=bayselonarrend;Password=***;"
|
||||
```
|
||||
|
||||
+3
-1
@@ -47,4 +47,6 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
|
||||
```json title="Result"
|
||||
false
|
||||
```
|
||||
|
||||
Vendored
+8304
-8304
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user