Browse Source

debug INVITRO

Владимир Томишинец 5 years ago
parent
commit
b1b9e2155f
1 changed files with 12 additions and 31 deletions
  1. 12 31
      jenkinsfile.get.and.sync.dict

+ 12 - 31
jenkinsfile.get.and.sync.dict

@@ -115,7 +115,7 @@ pipeline {
                 }
             } 
         }
-*//*        stage ("INVITRO dictionaries") {
+*/        stage ("INVITRO dictionaries") {
             steps {
                 script {
                     INVITRONAMES.each { key, value ->
@@ -131,27 +131,21 @@ pipeline {
                                 echo "Syncing $key"
                                 container_operate(GOST_CLUSTER, [ 'sync' ])
                                 def log_dir = value.dir.replace("Files", "LOGS")
-                                log_dir = log_dir.replace("/", "\\")
-                                sh """export DOCKER_HOST=tcp://$GOST_CLUSTER:2376 DOCKER_TLS_VERIFY=1
-                                      docker create -i --name sync \
-                                        -v analis-wineservice_analis_Files_netapp:/root/wine32/dosdevices/unc/samba.infoclinica.lan/smartdelta01/ \
-                                        --network=labnetwork --entrypoint='' \${SYNC_IMAGE} /bin/bash \
-                                        -c 'cd /root/wine32/dosdevices/unc/samba.infoclinica.lan/smartdelta01/$value.dir; \
-                                        cat \$(ls -1t InvitroGetExtendedProduct_*.xml | head -n1) > InvitroGetExtendedProduct.xml; \
-                                        cat \$(ls -1t InvitroGetInfo_*.xml | head -n1) > InvitroGetInfo.xml; \
-                                        /usr/bin/xvfb-run -a wine /opt/syncmanager/SyncManager.exe -a prod_lab -e "$value.idtask" \
-                                        -logfile "\\\\\\samba.infoclinica.lan\\smartdelta01\\$log_dir\\syncmanager_#.log" '
-                                      docker cp infodent.ini sync:/opt/syncmanager/infodent.ini
-                                      docker start -i sync
-                                      docker rm sync
+                                def dir = value.dir
+                                sh """printf '#!/bin/bash\ncd /root/wine32/dosdevices/unc/samba.infoclinica.lan/smartdelta01/$dir\n\
+                                      cat \$(ls -1t InvitroGetExtendedProduct_*.xml | head -n1) > InvitroGetExtendedProduct.xml\n\
+                                      cat \$(ls -1t InvitroGetInfo_*.xml | head -n1) > InvitroGetInfo.xml\n\
+                                      exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/syncserver/SyncServer.exe" "\$@"' > entrypoint.sh
+                                      chmod +x entrypoint.sh
                                    """
+                                syncServer(log_dir, value.idtask, SYNC_SERVER_IMAGE, GOST_CLUSTER)
                             }
                         }       
                     }
                 }
             }
         }
-*/       stage ("ALFA dictionaries") {
+/*       stage ("ALFA dictionaries") {
             steps {
                 script {
                     ALFANAMES.each { key, value ->
@@ -167,33 +161,20 @@ pipeline {
                                 echo "Syncing $key"
                                 container_operate(GOST_CLUSTER, [ 'sync' ])
                                 def log_dir = value.dir.replace("Files", "LOGS")
-//                                log_dir = log_dir.replace("/", "\\")
                                 def dir = value.dir
                                 sh """printf '#!/bin/bash\ncd /root/wine32/dosdevices/unc/samba.infoclinica.lan/smartdelta01/$dir\n\
                                       cat \$(ls -1t AlfaLabDict_*.xml | head -n1) > AlfaLabDict.xml\n\
                                       exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/syncserver/SyncServer.exe" "\$@"' > entrypoint.sh
                                       chmod +x entrypoint.sh
-                                      cat entrypoint.sh"""
-                                syncServer(log_dir, value.idtask, SYNC_SERVER_IMAGE, GOST_CLUSTER)
-/*                                sh """export DOCKER_HOST=tcp://$GOST_CLUSTER:2376 DOCKER_TLS_VERIFY=1
-                                      docker create -i --name sync \
-                                        -v analis-wineservice_analis_Files_netapp:/root/wine32/dosdevices/unc/samba.infoclinica.lan/smartdelta01/ \
-                                        --network=labnetwork --entrypoint='' \${SYNC_IMAGE} /bin/bash \
-                                        -c 'cd /root/wine32/dosdevices/unc/samba.infoclinica.lan/smartdelta01/$value.dir; \
-                                        cat \$(ls -1t AlfaLabDict_*.xml | head -n1) > AlfaLabDict.xml; \
-                                        /usr/bin/xvfb-run -a wine /opt/syncmanager/SyncManager.exe -a prod_lab -e "$value.idtask" \
-                                        -logfile "\\\\\\samba.infoclinica.lan\\smartdelta01\\$log_dir\\syncmanager_#.log" '
-                                      docker cp infodent.ini sync:/opt/syncmanager/infodent.ini
-                                      docker start -i sync
-                                      docker rm sync
                                    """
-*/                            }
+                                syncServer(log_dir, value.idtask, SYNC_SERVER_IMAGE, GOST_CLUSTER)
+                            }
                         }
                     }
                 }
             }
         }
-/*        stage ("Gemotest dictionaries") {
+*//*        stage ("Gemotest dictionaries") {
             steps {
                 script {
                     echo "Get dictionaries for Gemotest"