aboutsummaryrefslogtreecommitdiff
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorMax Nanis2026-09-10 11:43:20 -0700
committerMax Nanis2026-09-10 11:43:20 -0700
commit46f14619cc62c1574721e41cac57ba24fc1482ed (patch)
tree95660fd647570fe92af5a16bf84e1f454b6ea406 /Jenkinsfile
parent2091d3ae4255ad64ce86c40383c571cd0d96e018 (diff)
downloadamt-jb-46f14619cc62c1574721e41cac57ba24fc1482ed.tar.gz
amt-jb-46f14619cc62c1574721e41cac57ba24fc1482ed.zip
Jenkins p5
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile64
1 files changed, 45 insertions, 19 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index e962b3e..3497c61 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,7 +1,3 @@
-/* This is intended to test the dev & master branches of the gr-api project,
- where the tests are entirely self contained
-*/
-
pipeline {
agent any
@@ -20,28 +16,58 @@ pipeline {
}
stages {
-
- stage('setup') {
+ stage('Checkout') {
steps {
- withCredentials([file(
- credentialsId: '971e1f48-09ce-4446-9155-a52c1adb6249',
- variable: 'ENV_TEST_FILE')]) {
- sh 'cp $ENV_TEST_FILE .env.test'
- }
- sh "/usr/local/bin/python3.14 -m venv ${VENV}"
- sh "${VENV}/bin/pip install -U setuptools wheel pip"
- sh "${VENV}/bin/pip install -r requirements.txt"
- sh "${VENV}/bin/pip install django"
+ checkout scmGit(
+ branches: [[name: "*/${env.BRANCH_NAME}"]],
+ extensions: [ cloneOption(shallow: true) ],
+ userRemoteConfigs: [
+ [credentialsId: 'abdeb570-b708-44f3-b857-8a6b06ed9822',
+ url: 'ssh://code.g-r-l.com:6611/panels/amt-jb']
+ ],
+ )
+ stash name: 'source', useDefaultExcludes: false
}
}
- stage('tests') {
- steps {
- sh '$VENV/bin/pytest tests/test_postgres.py -vs'
+ stage('Python Versions') {
+ matrix {
+ axes {
+ axis {
+ name 'VER'
+ values 'python3.14', 'python3.13', 'python3.12'
+ }
+ }
+
+ stages {
+ stage('Setup') {
+ steps {
+ dir("amt-jb-${VER}") {
+ deleteDir()
+ unstash 'source'
+
+ withCredentials([file(
+ credentialsId: '971e1f48-09ce-4446-9155-a52c1adb6249',
+ variable: 'ENV_TEST_FILE')]) {
+ sh 'cp $ENV_TEST_FILE .env.test'
+ }
+ sh "/usr/local/bin/${VER} -m venv ${VENV}-${VER}"
+ sh "${VENV}-${VER}/bin/pip install -r requirements.txt"
+ sh "${VENV}-${VER}/bin/pip install django"
+ }
+ }
+ }
+
+ stage('tests') {
+ steps {
+ sh "${VENV}-${VER}/bin/pytest tests/test_postgres.py -vs"
+ }
+ }
+ }
}
}
-
}
+
post {
always {
echo 'One way or another, I have finished'