From: garciadeblas Date: Wed, 23 Mar 2022 11:27:02 +0000 (+0100) Subject: Update stage3 to move NTP to a separate stage with individual sshCommands X-Git-Tag: v12.0.0rc1~22 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F80%2F11780%2F2;p=osm%2Fdevops.git Update stage3 to move NTP to a separate stage with individual sshCommands Change-Id: I47689b3137d9c18de2f2514ec9b81b2b978208cc Signed-off-by: garciadeblas --- diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index c203313a..2fb7434d 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -433,6 +433,28 @@ node("${params.NODE}") { } // stage("Spawn Remote VM") /////////////////////////////////////////////////////////////////////////////////////// +// Checks before installation +/////////////////////////////////////////////////////////////////////////////////////// + stage('Checks before installation') { + remote = [ + name: containerName, + host: IP_ADDRESS, + user: 'ubuntu', + identityFile: SSH_KEY, + allowAnyHosts: true, + logLevel: 'INFO', + pty: true + ] + + // Force time sync to avoid clock drift and invalid certificates + sshCommand remote: remote, command: 'sudo apt-get update' + sshCommand remote: remote, command: 'sudo apt-get install -y ntp' + sshCommand remote: remote, command: 'sudo service ntp stop' + sshCommand remote: remote, command: 'sudo ntpd -gq' + sshCommand remote: remote, command: 'sudo service ntp start' + + } // stage("Checks before installation") +/////////////////////////////////////////////////////////////////////////////////////// // Installation /////////////////////////////////////////////////////////////////////////////////////// stage('Install') { @@ -469,15 +491,6 @@ node("${params.NODE}") { 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