Files
annotations/build/jenkins/pipeline
T
Alex Bezdieniezhnykh 0274dd65a4 add jenkins pipeline
update publish.cmd
2025-04-28 13:45:51 +03:00

79 lines
2.5 KiB
Plaintext

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']
]
)
}
}
}
}
}