From 0f8cb3fac60eb3985439c7506de4abffdc437878 Mon Sep 17 00:00:00 2001 From: Brian Szmyd Date: Thu, 25 Jul 2024 15:45:19 -0700 Subject: [PATCH] Build in CI with conan v2 --- .jenkins/Jenkinsfile | 17 +++++++++-------- conanfile.py | 8 ++++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 8095d9573..d0f45ca38 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent { label 'sds-builder-2204' } + agent { label 'sds-builder-v5' } environment { ORG = 'sds' @@ -21,7 +21,6 @@ pipeline { } } steps { script { - sh(script: "sed -Ei 's, version = .*\"([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+).*, version = \"\\1-${env.BUILD_NUMBER}\",' conanfile.py") BUILD_MISSING = "--build missing" } } @@ -45,6 +44,7 @@ pipeline { CONAN_CHANNEL = sh(script: "echo ${BRANCH_NAME} | sed -E 's,(\\w+-?\\d*)/.*,\\1,' | sed -E 's,-,_,' | tr -d '\n'", returnStdout: true) ECR_PATH = "${ECR_URL}/${ORG}/${PROJECT}" TAG = "${VER}@${CONAN_USER}/${CONAN_CHANNEL}" + CONAN_FLAGS="--name ${PROJECT} --user ${CONAN_USER} --channel ${CONAN_CHANNEL}" slackSend color: '#0063D1', channel: '#sds-ci', message: "*${PROJECT}/${TAG}* is building: ${BUILD_URL}" env.pkg_version = "${PROJECT}/${TAG}" } @@ -64,10 +64,10 @@ pipeline { steps { sh "hostname ; \ echo $NODE_NAME ; \ - conan create ${BUILD_MISSING} -pr debug -o ${PROJECT}:sanitize=True . ${PROJECT}/${TAG} ; \ - conan create ${BUILD_MISSING} -pr debug . ${PROJECT}/${TAG} ; \ - conan create ${BUILD_MISSING} -pr test -o sisl:malloc_impl=tcmalloc . ${PROJECT}/${TAG} ; \ - conan create ${BUILD_MISSING} -pr test -o sisl:prerelease=True -o sisl:malloc_impl=tcmalloc . ${PROJECT}/${TAG} ; \ + conan create ${BUILD_MISSING} -s:h build_type=Debug -o ${PROJECT}/*:sanitize=True ${CONAN_FLAGS} . ; \ + conan create ${BUILD_MISSING} -s:h build_type=Debug ${CONAN_FLAGS} . ; \ + conan create ${BUILD_MISSING} -s:h build_type=RelWithDebInfo -o sisl/*:malloc_impl=tcmalloc ${CONAN_FLAGS} . ; \ + conan create ${BUILD_MISSING} -s:h build_type=RelWithDebInfo -o sisl/*:prerelease=True -o sisl/*:malloc_impl=tcmalloc ${CONAN_FLAGS} . ; \ " } post { @@ -80,8 +80,9 @@ pipeline { expression { !(env.BRANCH_NAME =~ /PR-/) } } steps { - sh "conan user -r ebay-local -p ${ARTIFACTORY_PASS} _service_sds" - sh "conan upload ${PROJECT}/${TAG} -c --all -r ebay-local" + sh "conan remote login -p ${ARTIFACTORY_PASS} ebay-local _service_sds" + sh "conan graph info ./ | grep 'ref: ' | awk '{print \$2}' | sort | uniq | grep -v ${PROJECT} | grep -v '#' | while read pkg; do conan upload -r ebay-local -c \"\${pkg}\"; done" + sh "conan upload ${PROJECT}/${TAG} -c -r ebay-local" } } stage("Downstream Build") { diff --git a/conanfile.py b/conanfile.py index 995c6e87c..80729b7c1 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class HomestoreConan(ConanFile): name = "homestore" - version = "6.4.29" + version = "6.4.30" homepage = "https://github.com/eBay/Homestore" description = "HomeStore Storage Engine" @@ -52,9 +52,9 @@ def build_requirements(self): self.test_requires("gtest/1.14.0") def requirements(self): - self.requires("iomgr/[~11.3, include_prerelease=True]@oss/master", transitive_headers=True) - self.requires("sisl/[~12.2, include_prerelease=True]@oss/master", transitive_headers=True) - self.requires("nuraft_mesg/[^3.4, include_prerelease=True]@oss/main", transitive_headers=True) + self.requires("iomgr/[^11.3]@oss/master", transitive_headers=True) + self.requires("sisl/[^12.2]@oss/master", transitive_headers=True) + self.requires("nuraft_mesg/[^3.4]@oss/main", transitive_headers=True) self.requires("farmhash/cci.20190513@", transitive_headers=True) if self.settings.arch in ['x86', 'x86_64']: