Files
annotations/build/jenkins/ImageMatcher
T
2025-05-03 13:55:13 +03:00

69 lines
3.3 KiB
Plaintext

// Jenkinsfile for ImageMatcher Build pipeline
pipeline {
// Ensure this runs on your Windows agent
agent {
label 'Win10-BuildMachine' // Specify the agent label type and value directly
// Explicitly set the workspace to the shared BuildDependencies workspace
// This ensures the ImageMatcher build occurs within the same directory structure
// where dependencies were installed and Azaion Suite code resides.
// Adjust this path if needed
workspace 'C:/Jenkins/workspace/BuildDependencies' // **Updated workspace path**
}
tools {
// Define any tools needed specifically for building ImageMatcher
// git 'Default' // Git is NOT needed for checkout in this pipeline
// dotnetsdk 'dotnet-sdk' // If ImageMatcher is a .NET project
}
environment {
// Define environment variables specific to ImageMatcher
// REPO_GPS_DENIED_URL = 'git@github.com:azaion/gps-denied.git' // Not needed for checkout
// Add any other environment variables needed for the build (e.g., build configuration)
CONFIGURATION = 'Release' // Example build configuration
}
stages {
// Removed: stage('Checkout ImageMatcher Code') - Code is checked out by Dependencies pipeline
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 due to the Dependencies pipeline checkout
dir('gps-denied\\image-matcher') { // Change directory to the ImageMatcher build location
bat 'build.cmd' // Replace with the actual build command
}
}
}
// Optional: Archive ImageMatcher build artifacts if needed by Azaion Build
// stage('Archive ImageMatcher Artifacts') {
// steps {
// echo 'Archiving ImageMatcher artifacts...'
// archiveArtifacts artifacts: 'path/to/imagematcher/build/output/**' // Adjust path
// }
// }
}
post {
success {
echo 'ImageMatcher built successfully. Triggering Azaion Build pipeline...'
// Trigger the Azaion Build pipeline job upon success
// Replace 'Azaion Build' with the exact name of your Azaion Build Jenkins job
build job: 'Azaion Build',
wait: false // Set to true if you want ImageMatcher Build to wait for Azaion Build to finish
// You might pass parameters here if Azaion Build needs info from ImageMatcher
// Example: parameters: [ string(name: 'IMAGEMATCHER_BUILD_NUMBER', value: env.BUILD_NUMBER) ]
// If Azaion Build needs ImageMatcher artifacts, it will use copyArtifacts.
}
failure {
echo 'ImageMatcher build failed. Azaion Build pipeline will NOT be triggered.'
// Optional: Add other actions for failure, like sending notifications
}
// Optional: Add always, unstable, etc. blocks if needed
}
}