Add NTP Sync 61/11361/1
authorbeierlm <mark.beierl@canonical.com>
Tue, 16 Nov 2021 15:27:42 +0000 (10:27 -0500)
committerbeierlm <mark.beierl@canonical.com>
Tue, 16 Nov 2021 15:45:35 +0000 (17:45 +0200)
Adds ntp to the new VM and forces a full clock sync to avoid
any drift between Jenkins and ETSI VIM

Fixes bug 1774

Change-Id: I7cec55cdedcf53f6206ee54959dea4f8f1cfeb65
Signed-off-by: beierlm <mark.beierl@canonical.com>
(cherry picked from commit b59bd0dbeec7956585b656606ae03f8f294c5d45)

jenkins/ci-pipelines/ci_stage_3.groovy

index a96e545..39fd793 100644 (file)
@@ -444,6 +444,15 @@ node("${params.NODE}") {
                     remote.logLevel = 'INFO'
                     remote.pty = true
 
+                    // Force time sync to avoid clock drift and invalid certificates
+                    sshCommand remote: remote, command: """
+                        sudo apt update
+                        sudo apt install -y ntp
+                        sudo service ntp stop
+                        sudo ntpd -gq
+                        sudo service ntp start
+                    """
+
                     sshCommand remote: remote, command: """
                         wget https://osm-download.etsi.org/ftp/osm-11.0-eleven/install_osm.sh
                         chmod +x ./install_osm.sh