Skip to content
Snippets Groups Projects
Commit 657cde97 authored by Lukas Köhler's avatar Lukas Köhler
Browse files

updates

parent c4cdc057
Branches
Tags
No related merge requests found
......@@ -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
'''
......
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')
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment