Testing dynamic Jenkinsfile

This commit is contained in:
retropikzel 2025-06-05 23:18:14 +03:00
parent 5e1f135aba
commit 7eb2d8603d
1 changed files with 9 additions and 8 deletions

17
Jenkinsfile vendored
View File

@ -1,3 +1,4 @@
def implementations = ['chibi']
def tests = ['primitives', 'addressof', 'callback'] def tests = ['primitives', 'addressof', 'callback']
pipeline { pipeline {
@ -9,17 +10,17 @@ pipeline {
} }
stages { stages {
stage('chibi') { stage('Tests') {
environment {
IMPLEMENTATION="${STAGE_NAME}"
} }
steps { steps {
script { script {
tests.each { test -> implementations.each { implementation->
stage("${STAGE_NAME} ${test}") { tests.each { test ->
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { stage("${STAGE_NAME} ${test}") {
sh "docker build --build-arg COMPILE_R7RS=${env.IMPLEMENTATION} --tag=r7rs-pffi-test-${env.IMPLEMENTATION} -f Dockerfile.test ." catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${env.IMPLEMENTATION} sh -c \"make COMPILE_R7RS=${env.IMPLEMENTATION} TESTNAME=primitives test-compile-r7rs\"" sh "docker build --build-arg COMPILE_R7RS=${implementation} --tag=r7rs-pffi-test-${implementation} -f Dockerfile.test ."
sh "docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${implementation} sh -c \"make COMPILE_R7RS=${implementation} TESTNAME=primitives test-compile-r7rs\""
}
} }
} }
} }