@@ -379,11 +379,11 @@ pipeline {
379379 venv/bin/uv build --build-constraints=requirements-dev.txt
380380 '''
381381 )
382+ stash includes : ' dist/*.whl,dist/*.tar.gz,dist/*.zip' , name : ' PYTHON_PACKAGES'
382383 }
383384 post{
384385 always{
385386 archiveArtifacts artifacts : ' dist/*.whl,dist/*.tar.gz,dist/*.zip' , fingerprint : true
386- stash includes : ' dist/*.whl,dist/*.tar.gz,dist/*.zip' , name : ' PYTHON_PACKAGES'
387387 }
388388 cleanup{
389389 cleanWs(patterns : [
@@ -557,11 +557,11 @@ pipeline {
557557 }
558558 steps{
559559 sh ' ./contrib/create_mac_distrib.sh'
560+ stash includes : ' dist/*.tar.gz' , name : ' APPLE_APPLICATION_X86_64'
560561 }
561562 post{
562563 success{
563564 archiveArtifacts artifacts : ' dist/*.tar.gz' , fingerprint : true
564- stash includes : ' dist/*.tar.gz' , name : ' APPLE_APPLICATION_X86_64'
565565 }
566566 cleanup{
567567 sh " ${ tool(name: 'Default', type: 'git')} clean -dfx"
@@ -618,11 +618,11 @@ pipeline {
618618 }
619619 steps{
620620 sh ' ./contrib/create_mac_distrib.sh'
621+ stash includes : ' dist/*.tar.gz' , name : ' APPLE_APPLICATION_ARM64'
621622 }
622623 post{
623624 success{
624625 archiveArtifacts artifacts : ' dist/*.tar.gz' , fingerprint : true
625- stash includes : ' dist/*.tar.gz' , name : ' APPLE_APPLICATION_ARM64'
626626 }
627627 cleanup{
628628 sh " ${ tool(name: 'Default', type: 'git')} clean -dfx"
@@ -685,12 +685,14 @@ pipeline {
685685 }
686686 }
687687 steps{
688- bat(script : ' contrib/create_windows_distrib.bat' )
688+ timeout(5 ){
689+ bat(script : ' powershell contrib/create_windows_distrib.ps1' )
690+ }
691+ stash includes : ' dist/*.zip' , name : ' WINDOWS_APPLICATION_X86_64'
689692 }
690693 post{
691694 success{
692695 archiveArtifacts artifacts : ' dist/*.zip' , fingerprint : true
693- stash includes : ' dist/*.zip' , name : ' WINDOWS_APPLICATION_X86_64'
694696 }
695697 cleanup{
696698 cleanWs(
@@ -829,7 +831,6 @@ pipeline {
829831 beforeAgent true
830832 beforeOptions true
831833 allOf{
832- equals expected : true , actual : params. BUILD_PACKAGES
833834 equals expected : true , actual : params. CREATE_GITHUB_RELEASE
834835 tag ' *'
835836 }
@@ -873,20 +874,22 @@ pipeline {
873874 requestBody : requestBody,
874875 validResponseCodes : ' 201' // Expect a 201 Created status code
875876 )
876- unstash ' PYTHON_PACKAGES'
877- def releaseData = readJSON text : createReleaseResponse. content
878- findFiles(glob : ' dist/*' ). each{
879- def uploadResponse = httpRequest(
880- url : " ${ releaseData.upload_url.replace('{?name,label}', '')} ?name=${ it.name} " ,
881- httpMode : ' POST' ,
882- uploadFile : it. path,
883- customHeaders : [[name : ' Authorization' , value : " token ${ GITHUB_TOKEN} " ]],
884- wrapAsMultipart : false
885- )
886- if (uploadResponse. status >= 200 && uploadResponse. status < 300 ) {
887- echo " File uploaded successfully to GitHub release."
888- } else {
889- error " Failed to upload file: ${ uploadResponse.status} - ${ uploadResponse.content} "
877+ if (params. BUILD_PACKAGES ){
878+ unstash ' PYTHON_PACKAGES'
879+ def releaseData = readJSON text : createReleaseResponse. content
880+ findFiles(glob : ' dist/*' ). each{
881+ def uploadResponse = httpRequest(
882+ url : " ${ releaseData.upload_url.replace('{?name,label}', '')} ?name=${ it.name} " ,
883+ httpMode : ' POST' ,
884+ uploadFile : it. path,
885+ customHeaders : [[name : ' Authorization' , value : " token ${ GITHUB_TOKEN} " ]],
886+ wrapAsMultipart : false
887+ )
888+ if (uploadResponse. status >= 200 && uploadResponse. status < 300 ) {
889+ echo " File uploaded successfully to GitHub release."
890+ } else {
891+ error " Failed to upload file: ${ uploadResponse.status} - ${ uploadResponse.content} "
892+ }
890893 }
891894 }
892895 }
0 commit comments