28 lines
646 B
Groovy
28 lines
646 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
git url: 'http://10.1.1.1:3000/Rhinemann/sys-prog-coursework-lab-4.git', credentialsId: 'jenkins', branch: 'main'
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
steps {
|
|
sh "g++ main.cpp sort.h sort.cpp -o test -w -lgtest -pthread"
|
|
}
|
|
}
|
|
|
|
stage('Test') {
|
|
steps {
|
|
sh "./test --gtest_output=xml:test_report.xml"
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
xunit (tools: [ GoogleTest(pattern: 'test_report.xml') ])
|
|
}
|
|
}
|
|
} |