diff --git a/pipelines/PAD2 Repetitorium/Praktikum 1/jenkinsfile.groovy b/pipelines/PAD2 Repetitorium/Praktikum 1/jenkinsfile.groovy index a375afc337d0ae514d00f6fb2ad45015a20b056f..f2d1beb20bdb3a1bb5cf96354a57b37fb9c0cdc5 100644 --- a/pipelines/PAD2 Repetitorium/Praktikum 1/jenkinsfile.groovy +++ b/pipelines/PAD2 Repetitorium/Praktikum 1/jenkinsfile.groovy @@ -69,11 +69,25 @@ node { ) } stage('Pull and compile cppunit tests') { - git( - credentialsId: 'codegit', - url: 'https://code.fbi.h-da.de/SS18-REP-PAD2/UnitTests/Praktikum1.git' + sh( + ''' + mkdir git + ''' ) - sh(''' + dir('git') { + git( + credentialsId: 'codegit', + url: 'https://code.fbi.h-da.de/SS18-REP-PAD2/UnitTests/Praktikum1.git', + changelog: false + ) + } + sh( + ''' + cp -r git/* ./ + ''' + ) + sh( + ''' cmake ./ make ''' diff --git a/pipelines/PAD2 Repetitorium/Praktikum 2/jenkinsfile.groovy b/pipelines/PAD2 Repetitorium/Praktikum 2/jenkinsfile.groovy index b30714abd860d777de6baa302a6ce59b59d4e6d2..fd11ecbe7f4002807942ad1fb8afecab72b4f82c 100644 --- a/pipelines/PAD2 Repetitorium/Praktikum 2/jenkinsfile.groovy +++ b/pipelines/PAD2 Repetitorium/Praktikum 2/jenkinsfile.groovy @@ -1,10 +1,5 @@ node { stage('Copy files') { - sh( - ''' - ls -la - ''' - ) sh( ''' chmod -Rf 777 ./ @@ -14,35 +9,15 @@ node { rm -rf \$folder ''' ) - sh( - ''' - ls -la - ''' - ) } stage('Build') { - sh( - ''' - ls -la - ''' - ) sh( ''' clang++ -std=c++11 -O0 -g -Wall -Wextra -Weverything -Wno-c++98-compat -o binary *.cpp ''' ) - sh( - ''' - ls -la - ''' - ) } stage('Collect warnings') { - sh( - ''' - ls -la - ''' - ) warnings( canComputeNew: false, canResolveRelativePaths: false, @@ -57,11 +32,6 @@ node { ) } stage('Run valgrind') { - sh( - ''' - ls -la - ''' - ) runValgrind( childSilentAfterFork: false, excludePattern: '', @@ -97,16 +67,10 @@ node { unstableThresholdInvalidReadWrite: '0', unstableThresholdTotal: '0' ) - sh( - ''' - ls -la - ''' - ) } stage('Pull and compile cppunit tests') { sh( ''' - ls -la mkdir git ''' ) @@ -114,28 +78,20 @@ node { git( credentialsId: 'codegit', url: 'https://code.fbi.h-da.de/SS18-REP-PAD2/UnitTests/Praktikum2.git', - changelog: false, - poll: false, - wipeOutWorkspace: false + changelog: false ) } - sh( ''' - cp -r git/* ./ - ls -la + cp -r git/* ./ ''' ) - sh(''' + sh( + ''' cmake ./ make ''' ) - sh( - ''' - ls -la - ''' - ) } stage('Run cppunit tests') { sh('./cppunitTemplate') diff --git a/validationScripts/validate.py b/validationScripts/validate.py index 6c82d9efe8e2a6baf964889b898785dc3ad2f35a..b36e4eaaf72ebd04e08a4986691c6ae16276a488 100644 --- a/validationScripts/validate.py +++ b/validationScripts/validate.py @@ -17,8 +17,6 @@ JENKINS_URL = 'https://jenkins-open-submit.apps.ocp.fbi.h-da.de' JENKINS_USERNAME = 'api' JENKINS_SECRET = os.environ['JENKINS_API_TOKEN'] -print (os.environ['JENKINS_API_TOKEN']) - # Parameter that will be filled when debug is off USERNAME = 'istlukoeh' COURSE = 'PAD1' @@ -44,6 +42,8 @@ def validate(job): server = Jenkins(JENKINS_URL, JENKINS_USERNAME, JENKINS_SECRET) create_pipeline(server) + #TODO: FOLDER.split('/')[:-1] wahrscheinlich eher + # und makefile noch mal überprüfen queue_number = server.build_job(JOB_NAME, {'folder': '/opensubmit/' + FOLDER.split('/')[2]}) queue_item = server.get_queue_item(queue_number) @@ -100,6 +100,7 @@ def my_init(job): COURSE_AND_ASSIGNMENT = COURSE + '-' + ASSIGNMENT JOB_NAME = COURSE + '-' + ASSIGNMENT + '-' + USERNAME + print (FOLDER) os.system('scp -i /ssh/key -r ' + FOLDER + ' jenkins-ssh@jenkins-ssh:/opensubmit') os.system('chmod -R 777 ' + FOLDER)