Skip to content

Commit c794c8a

Browse files
committed
Fixed libnullpay testing in cd pipeline
Signed-off-by: artem.ivanov <[email protected]>
1 parent 5119557 commit c794c8a

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

Jenkinsfile.cd

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ def linuxTesting(file, env_name, network_name, stashBuildResults) {
216216
sh "cp libindy/target/release/libindy.so libnullpay"
217217
dir('libnullpay') {
218218
testEnv.inside("--ip=\"10.0.0.3\" --network=${network_name}") {
219-
echo "${env_name} Libindy Test: Build"
219+
echo "${env_name} Libnullpay Test: Build"
220220
sh "LIBRARY_PATH=./ RUST_BACKTRACE=1 cargo test --release --no-run"
221221

222-
echo "${env_name} Libindy Test: Run tests"
223-
sh "LD_LIBRARY_PATH=./ RUST_BACKTRACE=1 RUST_LOG=indy::=debug,zmq=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release"
222+
echo "${env_name} Libnullpay Test: Run tests"
223+
sh 'LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_BACKTRACE=1 RUST_LOG=indy::=debug,zmq=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release'
224224

225225
if (stashBuildResults) {
226226
stash includes: 'target/release/libnullpay.so', name: 'LibnullpayUbuntuBuildResult'
@@ -454,34 +454,38 @@ def windowsPublishing() {
454454
def libindyVersion
455455
node('win2016') {
456456
stage('Publish Libindy Windows Files') {
457-
try {
458-
echo 'Publish Windows files: Checkout csm'
459-
checkout scm
457+
def ws_path = "workspace/${env.JOB_NAME}".replace(' ', '_')
458+
ws(ws_path) {
459+
try {
460+
echo 'Publish Windows files: Checkout csm'
461+
checkout scm
460462

461-
libindyVersion = getSrcVersion("libindy")
463+
libindyVersion = getSrcVersion("libindy")
462464

463-
dir('libindy') {
464-
echo 'Publish Libindy Windows files'
465-
windowsPublishArtifact("libindy", "lib", libindyVersion, "LibindyWindowsBuildResult")
466-
}
465+
dir('libindy') {
466+
echo 'Publish Libindy Windows files'
467+
windowsPublishArtifact("libindy", "lib", libindyVersion, "LibindyWindowsBuildResult")
468+
}
467469

468-
dir('cli') {
469-
echo 'Publish Indy Cli Windows files'
470-
windowsPublishArtifact("indy-cli", "executable", libindyVersion, "IndyCliWindowsBuildResult")
471-
}
470+
dir('cli') {
471+
echo 'Publish Indy Cli Windows files'
472+
windowsPublishArtifact("indy-cli", "executable", libindyVersion, "IndyCliWindowsBuildResult")
473+
}
472474

473-
dir('libnullpay') {
474-
def libnullpayVersion = getSrcVersion("libnullpay")
475+
dir('libnullpay') {
476+
def libnullpayVersion = getSrcVersion("libnullpay")
475477

476-
echo 'Publish Libnullpay Cli Windows files'
477-
windowsPublishArtifact("libnullpay", "lib", libnullpayVersion, "LibnullpayWindowsBuildResult")
478+
echo 'Publish Libnullpay Cli Windows files'
479+
windowsPublishArtifact("libnullpay", "lib", libnullpayVersion, "LibnullpayWindowsBuildResult")
480+
}
481+
}
482+
finally {
483+
echo 'Publish Windows files: Cleanup'
484+
cleanWs()
478485
}
479-
}
480-
finally {
481-
echo 'Publish Windows files: Cleanup'
482-
step([$class: 'WsCleanup'])
483486
}
484487
}
488+
cleanWs()
485489
}
486490
return libindyVersion
487491
}

0 commit comments

Comments
 (0)