diff --git a/ci/build_test_release.groovy b/ci/build_test_release.groovy index 4f88ee17fb..41a3fec76c 100644 --- a/ci/build_test_release.groovy +++ b/ci/build_test_release.groovy @@ -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}" @@ -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}\"") + } finally { windows.archive_build_artifacts() windows.archive_test_artifacts() }