From f32db99e705065ae91b9e507369b75ec8e5d13d0 Mon Sep 17 00:00:00 2001 From: Koltai Kadosa Date: Fri, 13 Nov 2020 13:52:48 +0100 Subject: [PATCH 1/3] Updated mater 19 to v4md 2.4.1 and MD 190sp4 GH-13 --- Jenkinsfile | 26 ++++++++++--------- .../build.gradle | 15 ++++++----- .../gradle.properties | 4 +-- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 93ee0e0..2d54dd0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,18 +48,20 @@ pipeline { stages { stage('Build') { steps { - sh ''' - # WORKSPACE_BENCHMARK is used as on client-side 3rd applications (e.g. git on Windows) - # overrides the $WORKSPACE variable during their execution - export WORKSPACE_BENCHMARK=$WORKSPACE - rm -rf benhmark/results - rm -rf benhmark/diagrams - cd com.incquerylabs.magicdraw.benchmark - rm -rf results - rm -rf build/dependency-cache - ./gradlew clean - ./gradlew installDist - ''' + withCredentials([usernamePassword(credentialsId: 'nexus-buildserver-deploy', passwordVariable: 'DEPLOY_PASSWORD', usernameVariable: 'DEPLOY_USER')]) { + sh ''' + # WORKSPACE_BENCHMARK is used as on client-side 3rd applications (e.g. git on Windows) + # overrides the $WORKSPACE variable during their execution + export WORKSPACE_BENCHMARK=$WORKSPACE + rm -rf benhmark/results + rm -rf benhmark/diagrams + cd com.incquerylabs.magicdraw.benchmark + rm -rf results + rm -rf build/dependency-cache + ./gradlew clean + ./gradlew installDist -PnexusUsername=$DEPLOY_USER -PnexusPassword=$DEPLOY_PASSWORD" + ''' + } } } stage('Benchmark') { diff --git a/com.incquerylabs.magicdraw.benchmark/build.gradle b/com.incquerylabs.magicdraw.benchmark/build.gradle index 03610db..85be614 100644 --- a/com.incquerylabs.magicdraw.benchmark/build.gradle +++ b/com.incquerylabs.magicdraw.benchmark/build.gradle @@ -52,12 +52,13 @@ sourceSets { // In this section you declare where to find the dependencies of your project repositories { - ivy { - url 'http://download1.nomagic.com/' - layout 'pattern', { - artifact '/[module][revision]/[classifier].[ext]' + maven { + url "https://build.incquerylabs.com/nexus/repository/nomagic-binaries/" + credentials { + username = "$nexusUsername" + password = "$nexusPassword" } - } + } jcenter() mavenCentral() maven { url 'https://build.incquerylabs.com/nexus/repository/v4md/' } @@ -89,8 +90,8 @@ dependencies { exclude module: 'org.eclipse.xtext.xtext.generator' //version number replacement } - preCompile group: 'com.nomagic', name: 'magicdraw', version: '190', classifier: 'MagicDraw_190_no_install', ext: 'zip' - preCompile group: 'com.nomagic', name: 'sysml', version: '190', classifier: 'SysML_Plugin_190_bundle', ext: 'zip' + + preCompile group: 'com.nomagic', name: 'csm', version: '190sp4', classifier: 'no_install', ext: 'zip' preCompile group: 'com.incquerylabs.v4md', name: 'com.incquerylabs.v4md', version: v4mdVersion, classifier: 'plugin', ext: 'zip' compile group: 'org.eclipse.viatra', name: 'viatra-query-language', version: viatraVersion, exclusions diff --git a/com.incquerylabs.magicdraw.benchmark/gradle.properties b/com.incquerylabs.magicdraw.benchmark/gradle.properties index 6b1f34e..0d3c9d3 100644 --- a/com.incquerylabs.magicdraw.benchmark/gradle.properties +++ b/com.incquerylabs.magicdraw.benchmark/gradle.properties @@ -3,6 +3,6 @@ pluginName = Benchmark Plugin group=com.incquerylabs.magicdraw.benchmark descriptorFile=MDR_Example_Plugin_18351_descriptor.xml magicDrawGroupName=com.incquerylabs.magicdraw.benchmark -viatraVersion=2.3.0.M4 -v4mdVersion=2.3.0.M4 +viatraVersion=2.4.1 +v4mdVersion=2.4.1 xtextVersion=2.18.0 \ No newline at end of file From 9ac45eece0f40932dd653c09ee44c977ca7a37b2 Mon Sep 17 00:00:00 2001 From: Koltai Kadosa Date: Fri, 13 Nov 2020 14:09:49 +0100 Subject: [PATCH 2/3] Jenkinsfile fix --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2d54dd0..d4ee77a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,8 +58,8 @@ pipeline { cd com.incquerylabs.magicdraw.benchmark rm -rf results rm -rf build/dependency-cache - ./gradlew clean - ./gradlew installDist -PnexusUsername=$DEPLOY_USER -PnexusPassword=$DEPLOY_PASSWORD" + ./gradlew clean -PnexusUsername=$DEPLOY_USER -PnexusPassword=$DEPLOY_PASSWORD + ./gradlew installDist -PnexusUsername=$DEPLOY_USER -PnexusPassword=$DEPLOY_PASSWORD ''' } } From 504ddba8b296f6df1d5b142f047cd8319eaccedd Mon Sep 17 00:00:00 2001 From: Koltai Kadosa Date: Fri, 13 Nov 2020 14:23:40 +0100 Subject: [PATCH 3/3] Added credentials to run.sh too --- Jenkinsfile | 14 ++++++++------ com.incquerylabs.magicdraw.benchmark/run.sh | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d4ee77a..863a574 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -66,12 +66,14 @@ pipeline { } stage('Benchmark') { steps { - wrap([$class: 'Xvnc']) { - sh ''' - export MODEL_LOCATION=/home/jenkins/models-tmt - ./com.incquerylabs.magicdraw.benchmark/run.sh - ''' - } + withCredentials([usernamePassword(credentialsId: 'nexus-buildserver-deploy', passwordVariable: 'DEPLOY_PASSWORD', usernameVariable: 'DEPLOY_USER')]) { + wrap([$class: 'Xvnc']) { + sh ''' + export MODEL_LOCATION=/home/jenkins/models-tmt + ./com.incquerylabs.magicdraw.benchmark/run.sh + ''' + } + } } } stage('Report') { diff --git a/com.incquerylabs.magicdraw.benchmark/run.sh b/com.incquerylabs.magicdraw.benchmark/run.sh index b411047..73367e4 100755 --- a/com.incquerylabs.magicdraw.benchmark/run.sh +++ b/com.incquerylabs.magicdraw.benchmark/run.sh @@ -95,7 +95,7 @@ do # Call MD ./gradlew -Pquery="$query" -Pmodel="${MODEL_LOCATION}/TMT$size.mdzip" -Pwarmup="${MODEL_LOCATION}/Warmup.mdzip" -Pindex="$runIndex" -Psize="$size" \ - -Poutput="${OUTPUT_DIR}" -Pengine="$engine" -Pexclude="$BENCHMARK_QUERIES_EXCLUDE" runBenchmark + -Poutput="${OUTPUT_DIR}" -Pengine="$engine" -Pexclude="$BENCHMARK_QUERIES_EXCLUDE" runBenchmark -PnexusUsername=$DEPLOY_USER -PnexusPassword=$DEPLOY_PASSWORD fi done done