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']
pipeline {
@ -9,17 +10,17 @@ pipeline {
}
stages {
stage('chibi') {
environment {
IMPLEMENTATION="${STAGE_NAME}"
stage('Tests') {
}
steps {
script {
tests.each { test ->
stage("${STAGE_NAME} ${test}") {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "docker build --build-arg COMPILE_R7RS=${env.IMPLEMENTATION} --tag=r7rs-pffi-test-${env.IMPLEMENTATION} -f Dockerfile.test ."
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\""
implementations.each { implementation->
tests.each { test ->
stage("${STAGE_NAME} ${test}") {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
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\""
}
}
}
}