From 483569faf53ec2251ca3e3560f263bf2d4185243 Mon Sep 17 00:00:00 2001 From: "artem.ivanov" Date: Fri, 22 Mar 2019 16:23:47 +0300 Subject: [PATCH] IS-1139: Updated CLI to depend on strict libindy version Signed-off-by: artem.ivanov --- Jenkinsfile.cd | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile.cd b/Jenkinsfile.cd index 119d5014d3..f40186efc6 100644 --- a/Jenkinsfile.cd +++ b/Jenkinsfile.cd @@ -889,7 +889,7 @@ def ubuntuPublishing() { libvcxDebPublishing(testEnv) vcxJavaWrapperPublishing(testEnv, false) pythonWrapperPublishing(testEnv, false, 'vcx/wrappers/python3', 'vcx/libvcx') - nodejsWrapperPublishing(testEnv, false,'vcx') + nodejsWrapperPublishing(testEnv, false, 'vcx') } finally { echo 'Publish Ubuntu files: Cleanup' @@ -1069,6 +1069,8 @@ def libindyDebPublishing(testEnv, version) { def libindyCliDebPublishing(testEnv, version) { echo 'Publish Indy Cli deb files to Apt' + setLibindyDependencyVersion("cli/debian/control") + debPublishing(testEnv, "cli", "indy-cli", version, "IndyCliUbuntuBuildResult", "libindyCliDebs") } @@ -1077,6 +1079,8 @@ def libnullpayDebPublishing(testEnv) { def libnullpayVersion = getSrcVersion("libnullpay") + setLibindyDependencyVersion("libnullpay/debian/control") + debPublishing(testEnv, "libnullpay", "libnullpay", libnullpayVersion, "LibnullpayUbuntuBuildResult", "libnullpayDebs") } @@ -1085,11 +1089,16 @@ def libvcxDebPublishing(testEnv) { def libvcxVersion = getSrcVersion("vcx/libvcx") + setLibindyDependencyVersion("vcx/libvcx/debian/control") + + debPublishing(testEnv, "vcx/libvcx", "libvcx", libvcxVersion, "LibvcxUbuntuBuildResult", "libvcxDebs") +} + +def setLibindyDependencyVersion(file) { def libindyVersion = getSrcVersion("libindy") def replaceVersion = "$libindyVersion~$env.BUILD_NUMBER" - sh "sed -i -e \"s/^\\(Depends: .*libindy\\)\\(\\s*[,]\\{,1\\}.*\\)/\\1 (= $replaceVersion)\\2/\" vcx/libvcx/debian/control" - debPublishing(testEnv, "vcx/libvcx", "libvcx", libvcxVersion, "LibvcxUbuntuBuildResult", "libvcxDebs") + sh "sed -i -e \"s/^\\(Depends: .*libindy\\)\\(\\s*[,]\\{,1\\}.*\\)/\\1 (= $replaceVersion)\\2/\" $file" } def debPublishing(testEnv, directory, packageName, version, inStashName, outStashName) { @@ -1155,7 +1164,7 @@ def npmPublish(version, suffix, directory) { withCredentials([file(credentialsId: 'npm_credentials', variable: 'credentialsFile')]) { sh 'cp $credentialsFile ~/.npmrc' sh "cd $directory && " + - "npm version --no-git-tag-version --allow-same-version $version$suffix &&" + + "npm version --no-git-tag-version --allow-same-version $version$suffix &&" + "npm publish" } }