@@ -147,7 +147,7 @@ def closePool(env_name, network_name, poolInst) {
147147
148148void getSrcVersion (folder ) {
149149 commit = sh(returnStdout : true , script : ' git rev-parse HEAD' ). trim()
150- version = sh(returnStdout : true , script : " wget -q https://raw.githubusercontent.com/hyperledger/indy-sdk/$commit /$folder /Cargo.toml -O - | grep -E '^version =' | head -n1 | cut -f2 -d= | cut -f2 -d '\" '" ). trim()
150+ def version = sh(returnStdout : true , script : " wget -q https://raw.githubusercontent.com/hyperledger/indy-sdk/$commit /$folder /Cargo.toml -O - | grep -E '^version =' | head -n1 | cut -f2 -d= | cut -f2 -d '\" '" ). trim()
151151 return version
152152}
153153
@@ -234,7 +234,7 @@ def linuxTesting(file, env_name, network_name, stashBuildResults) {
234234 dir(' libnullpay' ) {
235235 testEnv. inside(" --ip=\" 10.0.0.3\" --network=${ network_name} " ) {
236236 echo " ${ env_name} Indy Libnullpay Test: Build"
237- sh " LIBRARY_PATH=./ RUST_BACKTRACE=1 cargo build"
237+ sh " LIBRARY_PATH=./ RUST_BACKTRACE=1 cargo build --release "
238238
239239 if (stashBuildResults) {
240240 stash includes : ' target/release/libnullpay.so' , name : ' LibnullpayUbuntuBuildResult'
@@ -371,13 +371,15 @@ def rhelTesting() {
371371}
372372
373373def rhelPublishing () {
374+ def libindyVersion;
375+
374376 node(' ubuntu' ) {
375377 stage(' Publish Libindy RPM Files' ) {
376378 try {
377379 echo ' Publish Rpm files: Checkout csm'
378380 checkout scm
379381
380- version = getSrcVersion(" libindy" )
382+ libindyVersion = getSrcVersion(" libindy" )
381383
382384 dir(' libindy' ) {
383385 echo ' Publish Rpm: Build docker image'
@@ -399,25 +401,27 @@ def rhelPublishing() {
399401 }
400402 }
401403 }
402- return version
404+ return libindyVersion
403405}
404406
405407def ubuntuPublishing () {
408+ def libindyVersion
409+
406410 node(' ubuntu' ) {
407411 stage(' Publish Ubuntu Files' ) {
408412 try {
409413 echo ' Publish Ubuntu files: Checkout csm'
410414 checkout scm
411415
412- version = getSrcVersion(" libindy" )
416+ libindyVersion = getSrcVersion(" libindy" )
413417
414418 echo ' Publish Ubuntu files: Build docker image'
415419 testEnv = dockerHelpers. build(' indy-sdk' , ' libindy/ci/ubuntu.dockerfile libindy/ci' )
416420
417- libindyDebPublishing(testEnv, version )
421+ libindyDebPublishing(testEnv, libindyVersion )
418422 pythonWrapperPublishing(testEnv, false )
419423 javaWrapperPublishing(testEnv, false )
420- libindyCliDebPublishing(testEnv, version )
424+ libindyCliDebPublishing(testEnv, libindyVersion )
421425 libnullpayDebPublishing(testEnv)
422426 }
423427 finally {
@@ -426,32 +430,34 @@ def ubuntuPublishing() {
426430 }
427431 }
428432 }
429-
430- return version
433+ return libindyVersion
431434}
432435
433436def windowsPublishing () {
437+ def libindyVersion
434438 node(' win2016' ) {
435439 stage(' Publish Libindy Windows Files' ) {
436440 try {
437441 echo ' Publish Windows files: Checkout csm'
438442 checkout scm
439443
440- version = getSrcVersion(" libindy" )
444+ libindyVersion = getSrcVersion(" libindy" )
441445
442446 dir(' libindy' ) {
443447 echo ' Publish Libindy Windows files'
444- windowsPublishArtifact(" libindy" , " lib" , " LibindyWindowsBuildResult" )
448+ windowsPublishArtifact(" libindy" , " lib" , libindyVersion, " LibindyWindowsBuildResult" )
445449 }
446450
447451 dir(' cli' ) {
448452 echo ' Publish Indy Cli Windows files'
449- windowsPublishArtifact(" indy-cli" , " executable" , " IndyCliWindowsBuildResult" )
453+ windowsPublishArtifact(" indy-cli" , " executable" , libindyVersion, " IndyCliWindowsBuildResult" )
450454 }
451455
452456 dir(' libnullpay' ) {
457+ def libnullpayVersion = getSrcVersion(" libnullpay" )
458+
453459 echo ' Publish Libnullpay Cli Windows files'
454- windowsPublishArtifact(" libnullpay" , " lib" , " LibnullpayWindowsBuildResult" )
460+ windowsPublishArtifact(" libnullpay" , " lib" , libnullpayVersion, " LibnullpayWindowsBuildResult" )
455461 }
456462 }
457463 finally {
@@ -460,14 +466,14 @@ def windowsPublishing() {
460466 }
461467 }
462468 }
463- return version
469+ return libindyVersion
464470}
465471
466- def windowsPublishArtifact (packageName , packageType , stashName ) {
472+ def windowsPublishArtifact (packageName , packageType , packageVersion , stashName ) {
467473 unstash name : stashName
468474
469475 withCredentials([file(credentialsId : ' SovrinRepoSSHKey' , variable : ' repo_key' )]) {
470- sh " ../ci/win-zip-and-upload.sh $packageName $packageType $v ersion '${ repo_key} ' ${ env.BRANCH_NAME} $env . BUILD_NUMBER "
476+ sh " ../ci/win-zip-and-upload.sh $packageName $packageType $p ackageVersion '${ repo_key} ' ${ env.BRANCH_NAME} $env . BUILD_NUMBER "
471477 }
472478}
473479
@@ -502,9 +508,9 @@ def libindyCliDebPublishing(testEnv, version) {
502508def libnullpayDebPublishing (testEnv ) {
503509 echo ' Publish Libnullpay deb files to Apt'
504510
505- def version = getSrcVersion(" libnullpay" )
511+ def libnullpayVersion = getSrcVersion(" libnullpay" )
506512
507- debPublishing(testEnv, " libnullpay" , " libnullpay" , version , " LibnullpayUbuntuBuildResult" , " libnullpayDebs" )
513+ debPublishing(testEnv, " libnullpay" , " libnullpay" , libnullpayVersion , " LibnullpayUbuntuBuildResult" , " libnullpayDebs" )
508514}
509515
510516def debPublishing (testEnv , directory , packageName , version , inStashName , outStashName ) {
@@ -579,16 +585,16 @@ def publishingRCtoStable() {
579585 downloadPackagingUtils()
580586 }
581587
582- version = getSrcVersion(" libindy" )
588+ def libindyVersion = getSrcVersion(" libindy" )
583589
584590 echo ' Moving Windows RC artifacts to Stable: libindy'
585- publishLibindyWindowsFilesRCtoStable(version )
591+ publishLibindyWindowsFilesRCtoStable(libindyVersion )
586592
587593 echo ' Moving RC artifacts to Stable: Build docker image for wrappers publishing'
588594 testEnv = dockerHelpers. build(' indy-sdk' , ' libindy/ci/ubuntu.dockerfile libindy/ci' )
589595
590596 echo ' Moving Ubuntu RC artifacts to Stable: libindy'
591- publishLibindyDebRCtoStable(testEnv, version )
597+ publishLibindyDebRCtoStable(testEnv, libindyVersion )
592598
593599 echo ' Moving Ubuntu RC artifacts to Stable: python wrapper'
594600 pythonWrapperPublishing(testEnv, true )
@@ -597,13 +603,13 @@ def publishingRCtoStable() {
597603 javaWrapperPublishing(testEnv, true )
598604
599605 echo ' Moving Ubuntu RC artifacts to Stable: indy-cli'
600- publishLibindyCliDebRCtoStable(testEnv, version )
606+ publishLibindyCliDebRCtoStable(testEnv, libindyVersion )
601607
602608 echo ' Moving Windows RC artifacts to Stable: indy-cli'
603- publishLibindyCliWindowsFilesRCtoStable(version )
609+ publishLibindyCliWindowsFilesRCtoStable(libindyVersion )
604610
605611 echo ' Moving Windows RC artifacts to Stable: libnullpay'
606- publishLibnullpayWindowsFilesRCtoStable(version )
612+ publishLibnullpayWindowsFilesRCtoStable(libindyVersion )
607613
608614 echo ' Moving Ubuntu RC artifacts to Stable: libnullpay'
609615 publishLibnullpayDebRCtoStable(testEnv)
@@ -625,8 +631,8 @@ def publishLibindyCliWindowsFilesRCtoStable(version) {
625631}
626632
627633def publishLibnullpayWindowsFilesRCtoStable () {
628- version = getSrcVersion(" libnullpay" )
629- publishWindowsFilesRCtoStable(" libnullpay" , version )
634+ def libnullpayVersion = getSrcVersion(" libnullpay" )
635+ publishWindowsFilesRCtoStable(" libnullpay" , libnullpayVersion )
630636}
631637
632638def publishWindowsFilesRCtoStable (packageName , version ) {
@@ -649,8 +655,8 @@ def publishLibindyCliDebRCtoStable(testEnv, version) {
649655}
650656
651657def publishLibnullpayDebRCtoStable (testEnv ) {
652- version = getSrcVersion(" libnullpay" )
653- publishDebRCtoStable(testEnv, " libnullpay" , " libnullpay" , version , " libindyCliDebs" , false )
658+ def libnullpayVersion = getSrcVersion(" libnullpay" )
659+ publishDebRCtoStable(testEnv, " libnullpay" , " libnullpay" , libnullpayVersion , " libindyCliDebs" , false )
654660}
655661
656662def publishDebRCtoStable (testEnv , packageName , folder , version , stashName , moveDevArtifacts ) {
0 commit comments