diff --git a/pipelines/PAD2 Repetitorium/Praktikum 5/jenkinsfile.groovy b/pipelines/PAD2 Repetitorium/Praktikum 5/jenkinsfile.groovy new file mode 100644 index 0000000000000000000000000000000000000000..543ab7f20a0a09283690517930289f3bf2ad9a78 --- /dev/null +++ b/pipelines/PAD2 Repetitorium/Praktikum 5/jenkinsfile.groovy @@ -0,0 +1,108 @@ +node { + stage('Copy files') { + sh( + ''' + chmod -Rf 777 ./ + rm -rf * + echo $folder + cp -r $folder/* ./ + rm -rf \$folder + ''' + ) + } + stage('Build') { + sh( + ''' + clang++ -std=c++11 -O0 -g -Wall -Wextra -Weverything -Wno-c++98-compat -o binary *.cpp + ''' + ) + } + stage('Collect warnings') { + warnings( + canComputeNew: false, + canResolveRelativePaths: false, + categoriesPattern: '', + consoleParsers: [[parserName: 'Clang (LLVM based)']], + defaultEncoding: '', + excludePattern: '', + healthy: '', + includePattern: '', + messagesPattern: '', + unHealthy: '' + ) + } + stage('Run valgrind') { + runValgrind( + childSilentAfterFork: false, + excludePattern: '', + generateSuppressions: false, + ignoreExitCode: false, + includePattern: 'binary', + outputDirectory: '', + outputFileEnding: '.valgrindReport', + programOptions: '', + removeOldReports: false, + suppressionFiles: '', + tool: [$class : 'ValgrindToolMemcheck', + leakCheckLevel : 'full', + showReachable : true, + trackOrigins : true, + undefinedValueErrors: true], + traceChildren: false, + valgrindExecutable: '', + algrindOptions: '', + workingDirectory: '' + ) + publishValgrind( + failBuildOnInvalidReports: false, + failBuildOnMissingReports: false, + failThresholdDefinitelyLost: '', + failThresholdInvalidReadWrite: '', + failThresholdTotal: '', + pattern: '*valgrindReport', + publishResultsForAbortedBuilds: false, + publishResultsForFailedBuilds: false, + sourceSubstitutionPaths: '', + unstableThresholdDefinitelyLost: '0', + unstableThresholdInvalidReadWrite: '0', + unstableThresholdTotal: '0' + ) + } + stage('Pull and compile cppunit tests') { + sh( + ''' + mkdir git + ''' + ) + dir('git') { + git( + credentialsId: 'codegit', + url: 'https://code.fbi.h-da.de/SS18-REP-PAD2/UnitTests/Praktikum5.git', + changelog: false + ) + } + sh( + ''' + cp -r git/* ./ + ''' + ) + sh( + ''' + cmake ./ + make + ''' + ) + } + stage('Run cppunit tests') { + sh('./cppunitTemplate') + xunit( + thresholds: [ + skipped(failureThreshold: '0'), + failed(failureThreshold: '0') + ], + tools: [CppUnit( + pattern: 'testResults.xml', + )] + ) + } +} \ No newline at end of file