Adding docker build and push to Jenkins

This commit is contained in:
retropikzel 2025-09-14 10:00:29 +03:00
parent a70d999301
commit 329eb804c9
1 changed files with 10 additions and 22 deletions

32
Jenkinsfile vendored
View File

@ -15,21 +15,15 @@ pipeline {
stages { stages {
stage('Test R6RS implementations') { stage('Test R6RS implementations') {
agent {
dockerfile {
label 'docker-x86_64'
filename 'Dockerfile.jenkins'
args '--user=root -v /var/run/docker.sock:/var/run/docker.sock'
}
}
steps { steps {
script { script {
def r6rs_implementations = sh(script: 'chibi-scheme compile-r7rs.scm --list-r6rs-schemes', returnStdout: true).split() def r6rs_implementations = sh(script: 'chibi-scheme compile-r7rs.scm --list-r6rs-schemes', returnStdout: true).split()
parallel r6rs_implementations.collectEntries { implementation-> parallel r6rs_implementations.collectEntries { SCHEME ->
[(implementation): { [(SCHEME): {
stage("${implementation} R6RS") { stage("${SCHEME} R6RS") {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "make test-r6rs-docker SCHEME=${implementation}" sh 'docker build -f Dockerfile.test --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=compile-r7rs-test-${SCHEME} .'
sh 'docker run -v "${PWD}":/workdir -w /workdir -t compile-r7rs-test-${SCHEME} sh -c "make && make install && make SCHEME=${SCHEME} test-r6rs"'
} }
} }
} }
@ -40,21 +34,15 @@ pipeline {
} }
stage('Test R7RS implementations') { stage('Test R7RS implementations') {
agent {
dockerfile {
label 'docker-x86_64'
filename 'Dockerfile.jenkins'
args '--user=root -v /var/run/docker.sock:/var/run/docker.sock'
}
}
steps { steps {
script { script {
def r7rs_implementations = sh(script: 'chibi-scheme compile-r7rs.scm --list-r7rs-schemes', returnStdout: true).split() def r7rs_implementations = sh(script: 'chibi-scheme compile-r7rs.scm --list-r7rs-schemes', returnStdout: true).split()
parallel r7rs_implementations.collectEntries { implementation-> parallel r7rs_implementations.collectEntries { SCHEME ->
[(implementation): { [(SCHEME): {
stage("${implementation} R7RS") { stage("${SCHEME} R7RS") {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "make test-r7rs-docker SCHEME=${implementation}" sh 'docker build -f Dockerfile.test --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=compile-r7rs-test-${SCHEME} .'
sh 'docker run -v "${PWD}":/workdir -w /workdir -t compile-r7rs-test-${SCHEME} sh -c "make && make install && make SCHEME=${SCHEME} test-r7rs"'
} }
} }
} }