Skip to content

Commit

Permalink
Pull request #1: Feature/UNISDK-3114 create jenkins jobs for building…
Browse files Browse the repository at this point in the history
… micro manager avt device adapter

Merge in HSW_SDK/mmcoreanddevices from feature/UNISDK-3114-create-jenkins-jobs-for-building-micro-manager-avt-device-adapter to allied-vision-camera-device-adapter

Squashed commit of the following:

commit 3ef56cc7e2efbdda688d732476055bfdd318a234
Author: Florian Klostermann <[email protected]>
Date:   Thu Jul 27 14:09:14 2023 +0200

    Jenkinsfile fix

commit f74b0b65cf5fce2277b17433b612915c51d52eaa
Author: Florian Klostermann <[email protected]>
Date:   Thu Jul 27 14:01:23 2023 +0200

    fixed Windows Jenkinsfile

commit bf1304f3b1afb11a19f32bbdaffd5ec0d80e2a59
Author: Florian Klostermann <[email protected]>
Date:   Thu Jul 27 11:58:32 2023 +0200

    Added Windows Jenkinsfile
  • Loading branch information
fklostermann-avt authored and marktsuchida committed Oct 3, 2023
1 parent f126db0 commit 6922c32
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions DeviceAdapters/AlliedVisionCamera/jenkins/Windows/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '14')),
[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false],
[$class: 'JobLocalConfiguration', changeReasonComment: '']
])

pipeline {

agent { label 'Host_Software_Windows_Build_Machine2' }

stages {

stage("Build") {
steps {
bat label: 'cmake build Release', script: '''CALL %VS2019_VCVARSALL_BAT% amd64
msbuild micromanager.sln /p:Configuration=Release /p:Platform=x64 -t:AlliedVisionCamera'''
}
}

stage("Deploy") {
steps {
script {
def buildDir = "build\\Release\\x64"
def deployDir = "MicroManager_AlliedVisionCamera"

bat label: 'Create Deploy folder', script: """rd /s /q ${deployDir}
mkdir ${deployDir}
copy /Y /V ${buildDir}\\mmgr_dal_AlliedVisionCamera.dll ${deployDir}"""

withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-user', usernameVariable: 'NEXUS_USER', passwordVariable: 'NEXUS_USER_PW')]) {
bat label: 'Upload to Nexus', script:"""python -m nexus_handler upload --repository hsw_test --group-id avt.hsw.vimba.Win64 --artifact-id MicroManager_AlliedVisionCamera --auto-version --input ${deployDir} --type zip --user %NEXUS_USER% --password "%NEXUS_USER_PW%" """
}
}
}
}
}
post {
always {
notifyBitbucket(projectKey: "${currentBuild.fullDisplayName}")
}
unstable {
emailext (
subject: "UNSTABLE: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """The build for the job ${env.JOB_NAME} > #${env.BUILD_NUMBER} failed:
Check console output at ${env.BUILD_URL}""",
recipientProviders: [[$class: 'DevelopersRecipientProvider']]
)
}
failure {
emailext (
subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """The Job ${env.JOB_NAME} resulted in an unexpected error during build ${env.BUILD_NUMBER}.
Check console output at ${env.BUILD_URL}""",
recipientProviders: [[$class: 'DevelopersRecipientProvider']]
)
}
}
}

0 comments on commit 6922c32

Please sign in to comment.