From 775dba63771e01dce4dcbcb5db708d76d78b290f Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sun, 16 Jul 2023 14:39:08 -0400 Subject: [PATCH] troubleshoot Jenkins - restore orig pipeline steps --- jenkins/spark.Jenkinsfile | 96 +++++++++++++++------------------------ 1 file changed, 37 insertions(+), 59 deletions(-) diff --git a/jenkins/spark.Jenkinsfile b/jenkins/spark.Jenkinsfile index d57bafda5..b8c5cc191 100644 --- a/jenkins/spark.Jenkinsfile +++ b/jenkins/spark.Jenkinsfile @@ -2,72 +2,50 @@ pipeline { agent { label 'os=windows && ram=8gb && installed=vs2022 && installed=python3' } - parameters { - booleanParam(name: 'CLONE_REPO', defaultValue: false, description: 'Whether or not to clone the repo') - } stages { - stage('Checkout SCM') { + stage('Build') { steps { - checkout scmGit(extensions: [lfs()]) + echo 'Building..' + script { + if (fileExists('.venv')) { + echo 'Using existing Python virtual env' + } else { + echo 'Creating Python virtual env' + bat 'tools\\ensure_venv.cmd' + } + } + bat """ + .venv\\Scripts\\activate + pip install -r requirements.txt + python tools\\py\\build_spark.py --build-type Release + """ + } + post { + always { + echo '========Build Done========' + } + success { + echo '========Build executed successfully========' + } + failure { + echo '========Build execution failed========' + } } } - stage('Git Clone') { - when { - expression { params.CLONE_REPO } - } + stage('Installing') { steps { - echo 'Cloning repo...' - bat cd + echo 'Installing...' + bat """ + "C:\\Program Files\\7-Zip\7z.exe" a -tzip Release.zip "build\\Release" + """ + } + } + stage('Archiving') { + steps { + echo 'Archiving...' + archiveArtifacts artifacts: 'Release.zip', followSymlinks: false, onlyIfSuccessful: true } } - // stage('Git Checkout') { - // steps { - // echo '' - // } - // } - // stage('Build') { - // steps { - // echo 'Building..' - // script { - // if (fileExists('.venv')) { - // echo 'Using existing Python virtual env' - // } else { - // echo 'Creating Python virtual env' - // bat 'tools\\ensure_venv.cmd' - // } - // } - // bat """ - // .venv\\Scripts\\activate - // pip install -r requirements.txt - // python tools\\py\\build_spark.py --build-type Release - // """ - // } - // post { - // always { - // echo '========Build Done========' - // } - // success { - // echo '========Build executed successfully========' - // } - // failure { - // echo '========Build execution failed========' - // } - // } - // } - // stage('Installing') { - // steps { - // echo 'Installing...' - // bat """ - // "C:\\Program Files\\7-Zip\7z.exe" a -tzip Release.zip "build\\Release" - // """ - // } - // } - // stage('Archiving') { - // steps { - // echo 'Archiving...' - // archiveArtifacts artifacts: 'Release.zip', followSymlinks: false, onlyIfSuccessful: true - // } - // } } post { always {