add jenkins pipeline

update publish.cmd
This commit is contained in:
Alex Bezdieniezhnykh
2025-04-28 13:45:51 +03:00
parent babcbc0fc7
commit 0274dd65a4
3 changed files with 82 additions and 6 deletions
+1
View File
@@ -30,6 +30,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{CF141A48
build\cdn_manager.py = build\cdn_manager.py
build\downloader_config.yaml = build\downloader_config.yaml
build\build_cdn_manager.cmd = build\build_cdn_manager.cmd
build\jenkins\pipeline = build\jenkins\pipeline
EndProjectSection
EndProject
Global
+78
View File
@@ -0,0 +1,78 @@
pipeline {
agent { label 'Win10-BuildMachine' }
tools {
git 'Default' // your Git installation name
dotnetsdk 'dotnet-sdk' // the .NET SDK tool you configured
}
environment {
REPO_ANNOTATOR_URL = 'https://github.com/azaion/annotator.git'
REPO_GPS_DENIED_URL = 'https://github.com/azaion/gps-denied.git'
PROJECT_PATH = 'Azaion.Suite/suite/Azaion.Suite.csproj'
CONFIGURATION = 'Release'
nexusUrl = 'http://<nexus-server>:8081'
nexusRepo = 'generic-hosted'
nexusCreds = 'nexus-credentials-id' // Jenkins credential ID for Nexus
}
stages {
stage('Checkout') {
steps {
//Suite
checkout([
$class: 'GitSCM',
branches: [[name: '*/dev']],
userRemoteConfigs: [[
url: "${env.REPO_ANNOTATOR_URL}"
]],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'suite']]
])
//GPS-Denied
checkout([
$class: 'GitSCM',
branches: [[name: '*/image-matcher']],
userRemoteConfigs: [[
url: "${env.REPO_GPS_DENIED_URL}"
]],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'gps-denied']]
])
}
}
stage('Compile Gps Denied') {
steps {
call "AzaionSuite\gps-denied\image-matcher\build.cmd"
}
}
stage('Run publish.cmd') {
steps {
call "AzaionSuite\suite\build\publish.cmd"
}
}
stage('Deploy to Nexus') {
steps {
script {
// Use Nexus Artifact Uploader in the pipeline
nexusArtifactUploader(
nexusUrl: nexusUrl,
credentialsId: nexusCreds,
repository: nexusRepo,
artifacts: [
[artifactId: 'myapp',
version: "${BUILD_NUMBER}",
file: "target/myapp-${BUILD_NUMBER}.zip", // Artifact path from the build
type: 'zip',
classifier: '',
extension: 'zip']
]
)
}
}
}
}
}
+3 -6
View File
@@ -80,11 +80,8 @@ cd..
echo Copy ico
copy logo.ico dist\
echo Copying cudnn files
set cudnn-folder="C:\Program Files\NVIDIA\CUDNN\v9.4\bin\12.6"
copy %cudnn-folder%\* dist\*
@REM don't need
del dist\cudnn_adv64_9.dll
echo Copying shared libs
xcopy /E C:\\share dist\
set DESTINATION=dist\gps-denied\
@@ -97,7 +94,7 @@ copy ..\gps-denied\.libs\onnxruntime\lib\onnxruntime.dll %DESTINATION%
copy ..\gps-denied\.libs\onnxruntime\lib\onnxruntime_providers_cuda.dll %DESTINATION%
copy ..\gps-denied\.libs\onnxruntime\lib\onnxruntime_providers_shared.dll %DESTINATION%
copy ..\gps-denied\.libs\opencv\build\x64\vc16\bin\opencv_world4110.dll %DESTINATION%
copy C:\Qt\6.9.0\msvc2022_64\bin\Qt6Core.dll %DESTINATION%
mkdir %DESTINATION%\models
copy ..\gps-denied-work\models\* %DESTINATION%\models