updating and testing ImageMatcher pipeline

This commit is contained in:
dzaitsev
2025-05-03 14:18:19 +03:00
parent 0dbf25be65
commit 0327459d1a
+18 -23
View File
@@ -4,7 +4,7 @@ pipeline {
agent { agent {
label 'Win10-BuildMachine' // Specify the agent label type and value directly label 'Win10-BuildMachine' // Specify the agent label type and value directly
// Removed: workspace 'C:/Jenkins/workspace/BuildDependencies' // Removed: workspace 'C:/Jenkins/workspace/BuildDependencies'
// We will use a dir() step in the stages block instead. // We will use a dir() step within the stage's steps block instead.
} }
tools { tools {
@@ -20,38 +20,33 @@ pipeline {
CONFIGURATION = 'Release' // Example build configuration CONFIGURATION = 'Release' // Example build configuration
// Define the path to the shared workspace // Define the path to the shared workspace
SHARED_WORKSPACE = 'C:/Jenkins/workspace/BuildDependencies' // Define shared workspace path SHARED_WORKSPACE = 'C:/Jenkins/workspace/Azaion' // Define shared workspace path
} }
stages { stages {
// Use a dir() step to ensure all subsequent stages/steps run in the shared workspace stage('Build ImageMatcher') {
dir(env.SHARED_WORKSPACE) { steps {
echo "Changing directory to shared workspace: ${env.SHARED_WORKSPACE}" echo "Building ImageMatcher in shared workspace: ${env.SHARED_WORKSPACE}"
// Use a dir() step to ensure the build command runs in the shared workspace
// Removed: stage('Checkout ImageMatcher Code') - Code is checked out by Dependencies pipeline dir(env.SHARED_WORKSPACE) {
stage('Build ImageMatcher') {
steps {
echo 'Building ImageMatcher...'
// Add steps here to build the ImageMatcher project
// This might involve compiling code, running build scripts, etc.
// Based on your original script, this likely involves running a build.cmd
// The code is expected to be in the 'gps-denied' subdirectory relative to the shared workspace // The code is expected to be in the 'gps-denied' subdirectory relative to the shared workspace
dir('gps-denied\\image-matcher') { // Change directory to the ImageMatcher build location relative to SHARED_WORKSPACE dir('gps-denied\\image-matcher') { // Change directory to the ImageMatcher build location relative to SHARED_WORKSPACE
bat 'build.cmd' // Replace with the actual build command bat 'build.cmd' // Replace with the actual build command
} }
} }
} }
}
// Optional: Archive ImageMatcher build artifacts if needed by Azaion Build // Optional: Archive ImageMatcher build artifacts if needed by Azaion Build
// stage('Archive ImageMatcher Artifacts') { // stage('Archive ImageMatcher Artifacts') {
// steps { // steps {
// echo 'Archiving ImageMatcher artifacts...' // echo 'Archiving ImageMatcher artifacts...'
// // Path is relative to the current directory (SHARED_WORKSPACE) // // Path is relative to the current directory (which will be SHARED_WORKSPACE due to the outer dir)
// archiveArtifacts artifacts: 'path/to/imagematcher/build/output/**' // Adjust path // dir(env.SHARED_WORKSPACE) { // Ensure this also runs in the shared workspace
// } // archiveArtifacts artifacts: 'path/to/imagematcher/build/output/**' // Adjust path relative to SHARED_WORKSPACE
// } // }
} // end dir(env.SHARED_WORKSPACE) // }
// }
} }
post { post {