Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conan2 ci #242

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 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 {
ARTIFACTORY_PASS = credentials('ARTIFACTORY_PASS')
Expand All @@ -9,20 +9,23 @@ pipeline {
}

stages {
stage('Adjust Tag for Master/PR') {
stage('Adjust for Master/PR') {
when { not {
branch "${STABLE_BRANCH}"
} }
steps {
script {
sh(script: "sed -Ei 's, version = .*\"([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+).*, version = \"\\1-${env.BUILD_NUMBER}\",' conanfile.py")
BUILD_MISSING = "--build missing"
}
}
}
stage('include build missing') {
stage('Adjust for Testing/Stable') {
when {
branch "${STABLE_BRANCH}"
}
steps {
script {
BUILD_MISSING = "--build missing"
BUILD_MISSING = ""
}
}
}
Expand All @@ -34,6 +37,7 @@ pipeline {
VER = sh(script: "grep -m 1 ' version =' conanfile.py | awk '{print \$3}' | tr -d '\n' | tr -d '\"'", returnStdout: true)
CONAN_CHANNEL = sh(script: "echo ${BRANCH_NAME} | sed -E 's,(\\w+-?\\d*)/.*,\\1,' | sed -E 's,-,_,' | tr -d '\n'", returnStdout: true)
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."
}
}
Expand All @@ -50,11 +54,10 @@ pipeline {

stage("Compile") {
steps {
sh "conan export 3rd_party/folly folly/nu2.2023.12.11.00@ ; \
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 ${PROJECT}:malloc_impl=tcmalloc . ${PROJECT}/${TAG} ; \
conan create ${BUILD_MISSING} -pr test -o ${PROJECT}:prerelease=True -o ${PROJECT}:malloc_impl=tcmalloc . ${PROJECT}/${TAG} ; \
sh "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 ${PROJECT}/*:malloc_impl=tcmalloc ${CONAN_FLAGS} . ; \
conan create ${BUILD_MISSING} -s:h build_type=RelWithDebInfo -o ${PROJECT}/*:prerelease=True -o ${PROJECT}/*:malloc_impl=tcmalloc ${CONAN_FLAGS} . ; \
"
}
}
Expand All @@ -64,8 +67,9 @@ pipeline {
expression { !(env.BRANCH_NAME =~ /PR-/) }
}
steps {
sh "conan user -r ebay-local -p ${ARTIFACTORY_PASS} _service_sds"
sh "conan upload ${PROJECT}/${TAG} --parallel -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"
}
}
}
Expand Down
Loading