File tree Expand file tree Collapse file tree 1 file changed +26
-17
lines changed
Expand file tree Collapse file tree 1 file changed +26
-17
lines changed Original file line number Diff line number Diff line change 11node(' builder' ){
22 docker. image(' riddleandcode/wallet-builder' ). inside(' -u "root"' ) {
3- checkout scm
4- stage(' Generating build' ) {
5- sh ' mkdir -p build && cd build && cmake ../'
6- }
7- stage(' Coding Guideline' ) {
8- sh ' astyle "src/*.c" "inc/*.h" "tests/*.c" "tests/*.h" --style=google -s2'
9- sh ' echo \' if [ $(find . -iname "*.orig" | wc -l) -eq 0 ]; then echo "According to guideline."; else echo "Not according to guideline" && exit 1; fi\' > guide && sh guide'
10- }
11- dir(' build' )
12- {
13- stage(' Build' ) {
14- sh ' make'
3+ try {
4+ checkout scm
5+ stage(' Generating build' ) {
6+ sh ' mkdir -p build && cd build && cmake ../'
7+ }
8+ stage(' Coding Guideline' ) {
9+ sh ' astyle "src/*.c" "inc/*.h" "tests/*.c" "tests/*.h" --style=google -s2'
10+ sh ' echo \' if [ $(find . -iname "*.orig" | wc -l) -eq 0 ]; then echo "According to guideline."; else echo "Not according to guideline" && exit 1; fi\' > guide && sh guide'
1511 }
16- stage(' Testing' ) {
17- sh ' make check'
18- sh ' xsltproc /opt/ctest/ctest2junix.xsl tests/Testing/$(head -1 tests/Testing/TAG)/Test.xml > CTestResults.xml '
19- junit ' CTestResults.xml'
20- cobertura coberturaReportFile : ' coverage.xml'
12+ dir(' build' )
13+ {
14+ stage(' Build' ) {
15+ sh ' make'
16+ }
17+ stage(' Testing' ) {
18+ sh ' make check'
19+ sh ' xsltproc /opt/ctest/ctest2junix.xsl tests/Testing/$(head -1 tests/Testing/TAG)/Test.xml > CTestResults.xml '
20+ junit ' CTestResults.xml'
21+ cobertura coberturaReportFile : ' coverage.xml'
22+ }
2123 }
2224 }
25+ catch (error) {
26+ echo " The pipeline failed"
27+ throw error
28+ }
29+ finally {
30+ sh " git clean -xfd"
31+ }
2332 }
2433}
You can’t perform that action at this time.
0 commit comments