Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions ci/build_test_release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ pipeline {
when { expression { env.PACKAGE_URL == "" } }
steps {
script {
def buildstamp = new Date().format('yyyyMMddHHmmss')
def shortCommit = bat(script: "git rev-parse --short=8 HEAD", returnStdout: true).trim().readLines().last()
echo "Buildstamp: ${buildstamp}"
echo "PRODUCT_VERSION: ${env.PRODUCT_VERSION}"
echo "RELEASE_TAG: ${env.RELEASE_TAG}"
echo "JOB_BASE_NAME: ${env.JOB_BASE_NAME}"
echo "WORKSPACE: ${env.WORKSPACE}"
echo "OVMS_PYTHON_ENABLED: ${env.OVMS_PYTHON_ENABLED}"
Expand All @@ -23,17 +28,27 @@ pipeline {
windows.install_dependencies()
windows.clean()
windows.build()
windows.unit_test()
windows.check_tests()
if (env.RUN_TESTS == "1") {
windows.unit_test()
windows.check_tests()
}
def safeBranchName = env.BRANCH_NAME.replaceAll('/', '_')
def python_presence = ""
def python_suffix = ""
if (env.OVMS_PYTHON_ENABLED == "1") {
python_presence = "with_python"
python_suffix = "on"
} else {
python_presence = "without_python"
python_suffix = "off"
}
bat(returnStatus:true, script: "ECHO F | xcopy /Y /E ${env.WORKSPACE}\\dist\\windows\\ovms.zip \\\\${env.OV_SHARE_05_IP}\\data\\cv_bench_cache\\OVMS_do_not_remove\\ovms-windows-${python_presence}-${safeBranchName}-latest.zip")
} finally {
def packageName = "ovms_windows_${env.PRODUCT_VERSION}_${env.RELEASE_TAG}_${shortCommit}_python_${python_suffix}.zip"
bat(returnStatus:true, script: "net use w: /delete /y 2>nul & net use w: \\\\10.102.76.118\\data\\cv_bench_cache\\OVMS_do_not_remove\\ovms_artefacts\\")
def destPath = "w:\\${env.PRODUCT_VERSION}\\${env.RELEASE_TAG}\\windows"
def latestPath = "${destPath}\\latest"
bat(returnStatus:true, script: "if not exist \"${destPath}\\${buildstamp}\" mkdir \"${destPath}\\${buildstamp}\"")
bat(returnStatus:true, script: "copy /Y \"${env.WORKSPACE}\\dist\\windows\\ovms.zip\" \"${destPath}\\${buildstamp}\\${packageName}\"")
bat(returnStatus:true, script: "if exist \"${latestPath}\" rmdir /S /Q \"${latestPath}\"")
bat(returnStatus:true, script: "mkdir \"${latestPath}\"")
bat(returnStatus:true, script: "copy /Y \"${env.WORKSPACE}\\dist\\windows\\ovms.zip\" \"${latestPath}\\${packageName}\"")
Comment on lines +47 to +50
} finally {
windows.archive_build_artifacts()
windows.archive_test_artifacts()
}
Expand Down