Владимир Томишинец 5 yıl önce
ebeveyn
işleme
7397f5cf80
1 değiştirilmiş dosya ile 17 ekleme ve 10 silme
  1. 17 10
      jenkinsfile.get.and.sync.dict

+ 17 - 10
jenkinsfile.get.and.sync.dict

@@ -86,13 +86,14 @@ pipeline {
                                 wget -P /services/$value.dir --user="$value.user" --password="$value.pass" $FTP.helix'
                            """
                         echo "Syncing dictionaries for $key"
-                        sh """export DOCKER_HOST=tcp://$CLUSTER.open:2376 DOCKER_TLS_VERIFY=1
-                              docker create -name sync -i --rm \
+                        sh """export DOCKER_HOST=tcp://$CLUSTER.gost:2376 DOCKER_TLS_VERIFY=1
+                              docker create -name sync -i \
                                 -v analis-wineservice_analis_Files_netapp:/root/wine32/drive_c/services/analis \
                                 --network=labnetwork ${SYNC_IMAGE} -a prod_lab -e "$value.id" \
                                 -logfile "C:\Services\Analis\$log_dir\syncmanager_#.log"
                               docker cp infodent.ini sync:/opt/syncmanager/infodent.ini
                               docker start sync
+                              docker rm sync
                            """
  
                     }
@@ -104,7 +105,7 @@ pipeline {
                 script {
                     INVITRONAMES.each { key, value ->
                     echo "CleanUP files for $key"
-                    sh """export DOCKER_HOST=tcp://${PROD_CLUSTER}:2376 DOCKER_TLS_VERIFY=1 
+                    sh """export DOCKER_HOST=tcp://$CLUSTER.gost:2376 DOCKER_TLS_VERIFY=1 
                           docker run --rm -i -v analis-wineservice_analis_Files_netapp:/services/ ${WGET_IMAGE} \
                             /bin/ash -c ' \
                             rm -fv /services/$value.dir/*.xml'
@@ -112,18 +113,19 @@ pipeline {
                     echo "Get dictionaries for $key"
                     def log_dir = value.dir.replace("Files", "LOGS")
                     sh """export DOCKER_HOST=tcp://$CLUSTER.gost:2376 DOCKER_TLS_VERIFY=1
-                          docker create -i --rm --name get \
+                          docker create -i --name get \
                             -v analis-wineservice_analis_Files_netapp:/root/.wine/dosdevices/unc/samba.infoclinica.lan/smartdelta01 \
                             --network=labnetwork -e DEBUG=false \
                             -e LOGPATH=/root/.wine/dosdevices/unc/samba.infoclinica.lan/smartdelta01/$value.dir \
                             ${ANALISE_IMAGE} -SyncRefInterval=1 LabSystems=$value.id /nocycle
                           docker cp infodent.ini get:/opt/analis/infodent.ini
                           docker start get
+                          docker rm get
                        """
                     echo "Syncing $key"
                     log_dir = log_dir.replace("/", "\\")
                     sh """export DOCKER_HOST=tcp://$CLUSTER.gost:2376 DOCKER_TLS_VERIFY=1
-                          docker create -i --rm --name sync \
+                          docker create -i --name sync \
                             -v analis-wineservice_analis_Files_netapp:/root/wine32/drive_c/services/analis \
                             --network=labnetwork --entrypoint='' ${SYNC_IMAGE} \
                             -c 'cd /root/wine32/drive_c/services/analis/$value.dir; \
@@ -134,6 +136,7 @@ pipeline {
                           docker cp infodent.ini sync:/opt/syncmanager/infodent.ini
                           docker cp analis-dictionaries.conf get:/opt/analis/analis.conf
                           docker start sync
+                          docker rm sync
                        """
                     }
                 }
@@ -144,7 +147,7 @@ pipeline {
                 script {
                     ALFANAMES.each { key, value ->
                     echo "CleanUP files for $key"
-                    sh """export DOCKER_HOST=tcp://${PROD_CLUSTER}:2376 DOCKER_TLS_VERIFY=1 
+                    sh """export DOCKER_HOST=tcp://$CLUSTER.gost:2376 DOCKER_TLS_VERIFY=1 
                           docker run --rm -i -v analis-wineservice_analis_Files_netapp:/services/ ${WGET_IMAGE} \
                             /bin/ash -c ' \
                             rm -fv /services/$value.dir/*.xml'
@@ -152,7 +155,7 @@ pipeline {
                     echo "Get dictionaries for $key"
                     def log_dir = value.dir.replace("Files", "LOGS")
                     sh """export DOCKER_HOST=tcp://$CLUSTER.gost:2376 DOCKER_TLS_VERIFY=1
-                          docker create -i --rm --name get \
+                          docker create -i --name get \
                             -v analis-wineservice_analis_Files_netapp:/root/.wine/dosdevices/unc/samba.infoclinica.lan/smartdelta01 \
                             --network=labnetwork -e DEBUG=false \
                             -e LOGPATH=/root/.wine/dosdevices/unc/samba.infoclinica.lan/smartdelta01/$value.dir \
@@ -160,11 +163,12 @@ pipeline {
                           docker cp infodent.ini get:/opt/analis/infodent.ini
                           docker cp analis-dictionaries.conf get:/opt/analis/analis.conf
                           docker start get
+                          docker rm get
                        """
                     echo "Syncing $key"
                     log_dir = log_dir.replace("/", "\\")
                     sh """export DOCKER_HOST=tcp://$CLUSTER.gost:2376 DOCKER_TLS_VERIFY=1
-                          docker create -i --rm --name sync \
+                          docker create -i --name sync \
                             -v analis-wineservice_analis_Files_netapp:/root/wine32/drive_c/services/analis \
                             --network=labnetwork --entrypoint='' ${SYNC_IMAGE} \
                             -c 'cd /root/wine32/drive_c/services/analis/$value.dir; \
@@ -173,6 +177,7 @@ pipeline {
                             -logfile "C:\Services\Analis\$log_dir\syncmanager_#.log" '
                           docker cp infodent.ini sync:/opt/syncmanager/infodent.ini
                           docker start sync
+                          docker rm sync
                        """
                     }
                 }
@@ -192,12 +197,13 @@ pipeline {
                        """
                     echo "Syncing dictionaries for Gemotest"
                     sh """export DOCKER_HOST=tcp://$CLUSTER.open:2376 DOCKER_TLS_VERIFY=1
-                          docker create -i --rm --name sync \
+                          docker create -i --name sync \
                             -v analis-wineservice_analis_Files_netapp:/root/wine32/drive_c/services/analis \
                             --network=labnetwork ${SYNC_IMAGE} -a prod_lab -e "$GEMOTEST.id" \
                             -logfile "C:\Services\Analis\$log_dir\syncmanager_#.log"
                           docker cp infodent.ini sync:/opt/syncmanager/infodent.ini
                           docker start sync
+                          docker rm sync
                        """      
                 }
             }
@@ -216,12 +222,13 @@ pipeline {
                        """
                     echo "Syncing dictionaries for CMD"
                     sh """export DOCKER_HOST=tcp://$CLUSTER.gost:2376 DOCKER_TLS_VERIFY=1
-                          docker create -i --rm --name sync \
+                          docker create -i --name sync \
                             -v analis-wineservice_analis_Files_netapp:/root/wine32/drive_c/services/analis \
                             --network=labnetwork ${SYNC_IMAGE} -a prod_lab -e "$CMD.id" \
                             -logfile "C:\Services\Analis\$log_dir\syncmanager_#.log"
                           docker cp infodent.ini sync:/opt/syncmanager/infodent.ini
                           docker start sync
+                          docker rm sync
                        """      
                 }
             }