@@ -386,6 +386,9 @@ pipeline {
386386 IDA_EMAIL = credentials(' IDA email' )
387387 }
388388 steps {
389+ sshagent (credentials : [' Hudson-SSH-Key' ]) {
390+ createInitialHistoryFilesOnRemote()
391+ }
389392 sh ' rm -rf sqlite3.db *.html history'
390393 sh '''
391394 if ! test -d OpenModelica; then
@@ -448,6 +451,9 @@ pipeline {
448451 IDA_EMAIL = credentials(' IDA email' )
449452 }
450453 steps {
454+ sshagent (credentials : [' Hudson-SSH-Key' ]) {
455+ createInitialHistoryFilesOnRemote()
456+ }
451457 sh ' rm -f sqlite3.db *.html'
452458 sh '''
453459 if ! test -d OpenModelica; then
@@ -570,6 +576,25 @@ def installLibraries(boolean removePackageOrder, boolean conversionScript, name,
570576 }
571577}
572578
579+
580+ def createInitialHistoryFilesOnRemote () {
581+ sh """
582+ HISTORY_DIRECTORY='/var/www/libraries.openmodelica.org/branches/history/'
583+ SEPARATOR='/'
584+ HISTORY_FILE='00_history.html'
585+
586+ for b in ${ env.GITBRANCHES} ${ env.GITBRANCHES_FMI} ${ env.GITBRANCHES_NEWINST} ${ env.GITBRANCHES_DAE} ${ env.GITBRANCHES_CPP} ; do
587+ BRANCH=`echo ${ b} | cut -d '/' -f2`
588+ FILE="${ HISTORY_DIRECTORY}${ BRANCH}${ SEPARATOR}${ HISTORY_FILE} "
589+ if [ ! -f ${ FILE} ]; then
590+ echo "Creating initial history: library.openmodelica.org:${ FILE} "
591+ ssh hudson@library.openmodelica.org mkdir -p ${ HISTORY_DIRECTORY}${ BRANCH}
592+ ssh hudson@library.openmodelica.org touch ${ FILE}
593+ fi
594+ done
595+ """
596+ }
597+
573598/**
574599 * Launches the test.py script with the given options.
575600 *
0 commit comments