From bcb9dfc90ecf2045482ad45a4f84f987d835a0d2 Mon Sep 17 00:00:00 2001 From: Miro Richard Eklund Date: Thu, 30 Aug 2018 15:30:38 +0300 Subject: [PATCH] Initial Jenkinsfile-sysdyn-simupedia-om gitlab #28 Change-Id: Id95a00d41d84edefbdfe58c6abfcfd46e8bc26c1 --- .../Jenkinsfile-sysdyn-simupedia-om | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 releng/JenkinsFiles/Jenkinsfile-sysdyn-simupedia-om diff --git a/releng/JenkinsFiles/Jenkinsfile-sysdyn-simupedia-om b/releng/JenkinsFiles/Jenkinsfile-sysdyn-simupedia-om new file mode 100644 index 00000000..fb6f2c4c --- /dev/null +++ b/releng/JenkinsFiles/Jenkinsfile-sysdyn-simupedia-om @@ -0,0 +1,77 @@ +pipeline { + node('master') { + agent none + stages { + stage ('Publish product to web') { + sh """ +function director_install() { + REPO=$1 + IUs=$2 + TAG=$3 + DEST=$4 + /opt/eclipse/eclipse -noSplash \ + -application org.eclipse.equinox.p2.director \ + -repository ${REPO} \ + -installIU ${IUs} \ + -tag ${TAG} \ + -destination ${DEST} \ + -profile DefaultProfile +} + +function repackage() { + BRANCH=$1 + PKG=$2 + TGT=$3 + + echo "Download current desktop product" + wget -nv http://www.simantics.org/download/${BRANCH}/${PKG}.zip + + echo "Unzip Desktop product" + unzip -q -d ${PKG} ${PKG}.zip + + echo "Install sysdyn feature into unzipped product" + director_install \ + http://www.simantics.org/download/${BRANCH}/sysdyn/p2.site/ \ + org.simantics.sysdyn.internal.p2.feature.group \ + AddSysdyn \ + ${PKG} + + echo "Install simupedia documentserver feature into unzipped product" + director_install \ + https://www.simantics.org/update/simupedia/${BRANCH}/p2.site/ \ + fi.semantum.simupedia.documentserver.feature \ + AddSimupediaSysdyn \ + ${PKG} + + echo "Install simupedia documentserver feature into unzipped product" + director_install \ + https://www.simantics.org/update/simupedia-sysdyn/${BRANCH}/p2.site/ \ + fi.semantum.simupedia.simulation.sysdyn.feature \ + AddSimupediaSimulationSysdyn \ + ${PKG} + + echo "Install open modelica" + director_install \ + http://www.simantics.org/download/master/openmodelica/p2.site/ \ + org.simantics.om.feature \ + AddOpenModelica \ + ${PKG} + + echo "Re-package as SimanticsSysdynSimupediaOM.product" + mv -v ${PKG} ${TGT} + 7z a -tzip ${TGT}.zip ${TGT} > /dev/null + rm -rf ${PKG}.zip ${TGT} +} + +repackage ${GERRIT_REFNAME} Simantics-Desktop-win32.win32.x86 Simantics-Sysdyn-Simupedia-OM-win32.win32.x86 +repackage ${GERRIT_REFNAME} Simantics-Desktop-win32.win32.x86_64 Simantics-Sysdyn-Simupedia-OM-win32.win32.x86_64 + +PRODUCT_PUBLISH_DIR=/var/www/http-www.simantics.org/download/${GERRIT_REFNAME}/sysdyn/products + +echo "Publishing product archives at: ${PRODUCT_PUBLISH_DIR}" +mkdir -p ${PRODUCT_PUBLISH_DIR} +rsync --stats --verbose --recursive --delete ${WORKSPACE}/*.zip ${PRODUCT_PUBLISH_DIR} +""" + } + } +} \ No newline at end of file -- 2.47.1