diff --git a/Azaion.Suite.sln b/Azaion.Suite.sln index a185ad2..79264b9 100644 --- a/Azaion.Suite.sln +++ b/Azaion.Suite.sln @@ -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 diff --git a/build/jenkins/pipeline b/build/jenkins/pipeline new file mode 100644 index 0000000..8d801a1 --- /dev/null +++ b/build/jenkins/pipeline @@ -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://: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'] + ] + ) + } + } + } + } +} diff --git a/build/publish.cmd b/build/publish.cmd index 84db8fd..60a160a 100644 --- a/build/publish.cmd +++ b/build/publish.cmd @@ -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