mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:56:31 +00:00
80 lines
3.3 KiB
Plaintext
80 lines
3.3 KiB
Plaintext
// Jenkinsfile for Dependencies pipeline
|
|
pipeline {
|
|
agent { label 'Win10-BuildMachine' }
|
|
|
|
tools {
|
|
// Define any tools needed specifically for dependency installation
|
|
// e.g., NuGet, package managers, etc.
|
|
git 'Default' // Git is needed for checkout
|
|
dotnetsdk 'dotnet-sdk' // Assuming dotnet restore is part of dependencies
|
|
}
|
|
|
|
environment {
|
|
// Define any environment variables needed for dependency installation
|
|
// e.g., paths to package sources, etc.
|
|
REPO_ANNOTATOR_URL = 'git@github.com:azaion/annotator.git' // URL for Azaion repo
|
|
REPO_GPS_DENIED_URL = 'git@github.com:azaion/gps-denied.git' // URL for ImageMatcher repo
|
|
}
|
|
|
|
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('Install Dependencies') {
|
|
steps {
|
|
echo 'Installing build dependencies...'
|
|
echo 'We do nothing here so far'
|
|
// Add steps here to install dependencies using PowerShell, command line, etc.
|
|
// Examples:
|
|
// powershell 'nuget restore suite/YourSolution.sln' // Assuming NuGet is in PATH or configured as a tool
|
|
// bat 'install_some_tool.bat'
|
|
// sh 'apt-get update && apt-get install -y some-package' // If using a mixed environment or WSL
|
|
|
|
// Example: Installing .NET dependencies using dotnet restore
|
|
// Assumes your solution file is within the 'suite' subdirectory and includes the gps-denied project
|
|
dir('suite') { // Change directory to the suite subdirectory where the solution file is
|
|
bat 'dotnet restore' // Assuming dotnet is in PATH or configured as a tool
|
|
}
|
|
// If your solution file is at the workspace root, you would use:
|
|
// bat 'dotnet restore'
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
success {
|
|
echo 'Dependencies installed successfully. Triggering ImageMatcher Build pipeline...'
|
|
// Trigger the ImageMatcher Build pipeline job upon success
|
|
build job: 'ImageMatcher',
|
|
wait: false // Set to true if you want Dependencies to wait for ImageMatcher to finish
|
|
// No parameters are passed by default, add if needed
|
|
}
|
|
failure {
|
|
echo 'Dependencies installation failed. ImageMatcher Build pipeline will NOT be triggered.'
|
|
// Optional: Add other actions for failure, like sending notifications
|
|
}
|
|
// Optional: Add always, unstable, etc. blocks if needed
|
|
}
|
|
}
|