Skip to content

Commit

Permalink
Build in CI with conan v2
Browse files Browse the repository at this point in the history
  • Loading branch information
szmyd committed Jul 25, 2024
1 parent 268124e commit 0f8cb3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
17 changes: 9 additions & 8 deletions .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pipeline {
agent { label 'sds-builder-2204' }
agent { label 'sds-builder-v5' }

environment {
ORG = 'sds'
Expand All @@ -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"
}
}
Expand All @@ -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}"
}
Expand All @@ -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 {
Expand All @@ -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") {
Expand Down
8 changes: 4 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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']:
Expand Down

0 comments on commit 0f8cb3f

Please sign in to comment.