From 95d97a69dae962a4e85780dcc1eb2fc5e2c34753 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sun, 9 Jul 2023 17:02:27 -0400 Subject: [PATCH] build: Add Jenkinsfile for sparkd --- jenkins/sparkd.Jenkinsfile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 jenkins/sparkd.Jenkinsfile diff --git a/jenkins/sparkd.Jenkinsfile b/jenkins/sparkd.Jenkinsfile new file mode 100644 index 000000000..1c3456769 --- /dev/null +++ b/jenkins/sparkd.Jenkinsfile @@ -0,0 +1,38 @@ +pipeline { + agent { + label 'lab-main' + } + + stages { + stage('Build') { + steps { + echo 'Building..' + if (!fileExists('.venv')) { + echo 'Creating python virtual env' + sh 'python3 -m venv .venv' + } + sh """ + . .venv/bin/activate + pip install -r requirements.txt + python tools/py/build_sparkd.py --compiler gcc --configuration release + """ + } + } + stage('Installing') { + steps { + echo 'Installing..' + sh """ + cd build/gcc/release + cmake --build . --target install + """ + sh 'tar -czf install.tar.gz install' + } + } + stage('Archiving') { + steps { + echo 'Archiving..' + archiveArtifacts artifacts: 'install.tar.gz', followSymlinks: false, onlyIfSuccessful: true + } + } + } +}