change to build for workflows

This commit is contained in:
William Bell
2025-12-01 02:03:57 +00:00
parent 72eca4a15f
commit eb38da212d

33
Jenkinsfile vendored
View File

@@ -1,5 +1,9 @@
pipeline { pipeline {
agent any agent any
environment {
GITEA_URL = 'https://git.wbell.dev'
GITEA_REPO = 'Open-Argon/Chloride'
}
stages { stages {
stage('Checkout') { stage('Checkout') {
steps { steps {
@@ -8,27 +12,46 @@ pipeline {
} }
} }
stage('Detect Tag') {
steps {
script {
if (env.GIT_BRANCH?.startsWith('refs/tags/')) {
def tag = env.GIT_BRANCH.replace('refs/tags/', '')
echo "Tag detected: ${tag}"
if (tag.toLowerCase().contains('unsable')) {
echo "Tag contains 'unsable' → marking build UNSTABLE"
currentBuild.result = 'UNSTABLE'
}
// Expose for other stages
env.TAG_NAME = tag
} else {
echo "Regular branch build: ${env.GIT_BRANCH}"
}
}
}
}
stage('Setup Conan') { stage('Setup Conan') {
steps { steps {
sh ''' sh '''
python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
apt update apt update
apt install -y cmake flex python3 python3-pip python3-venv apt install -y cmake flex python3 python3-pip python3-venv
python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install --upgrade pip pip install --upgrade pip
pip install conan pip install conan
''' '''
} }
} }
stage('Setup Conan Profile') { stage('Setup Conan Profile') {
steps { steps {
sh ''' sh '''
. /tmp/venv/bin/activate . /tmp/venv/bin/activate
if [ ! -f ~/.conan2/profiles/default ]; then rm -rf ~/.conan2
conan profile detect conan profile detect
fi
''' '''
} }
} }