mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 14:46:31 +00:00
add jenkins pipeline
update publish.cmd
This commit is contained in:
@@ -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://<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']
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user