string(defaultValue: 'artifactory-osm', description: '', name: 'ARTIFACTORY_SERVER'),
string(defaultValue: 'osm-stage_4', description: '', name: 'DOWNSTREAM_STAGE_NAME'),
string(defaultValue: 'testing-daily', description: '', name: 'DOCKER_TAG'),
- string(defaultValue: 'ubuntu18.04', description: '', name: 'OPENSTACK_BASE_IMAGE'),
+ string(defaultValue: 'ubuntu20.04', description: '', name: 'OPENSTACK_BASE_IMAGE'),
booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_FAIL'),
booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_PASS'),
booleanParam(defaultValue: true, description: '', name: 'SAVE_ARTIFACTS_ON_SMOKE_SUCCESS'),
def upstreamComponent=""
if ( params.UPSTREAM_JOB_NAME ) {
println("Fetching upstream job artifact from ${params.UPSTREAM_JOB_NAME}")
+ lock('Artifactory') {
+ step ([$class: 'CopyArtifact',
+ projectName: "${params.UPSTREAM_JOB_NAME}",
+ selector: [$class: 'SpecificBuildSelector',
+ buildNumber: "${params.UPSTREAM_JOB_NUMBER}"]
+ ])
+
+ upstreamComponent = ci_helper.get_mdg_from_project(
+ ci_helper.get_env_value('build.env','GERRIT_PROJECT'))
+ def buildNumber = ci_helper.get_env_value('build.env','BUILD_NUMBER')
+ dir("$upstreamComponent") {
+ // the upstream job name contains suffix with the project. Need this stripped off
+ def project_without_branch = params.UPSTREAM_JOB_NAME.split('/')[0]
+ def packages = ci_helper.get_archive(params.ARTIFACTORY_SERVER,
+ upstreamComponent,
+ GERRIT_BRANCH,
+ "${project_without_branch} :: ${GERRIT_BRANCH}",
+ buildNumber)
- step ([$class: 'CopyArtifact',
- projectName: "${params.UPSTREAM_JOB_NAME}",
- selector: [$class: 'SpecificBuildSelector',
- buildNumber: "${params.UPSTREAM_JOB_NUMBER}"]
- ])
-
- upstreamComponent = ci_helper.get_mdg_from_project(
- ci_helper.get_env_value('build.env','GERRIT_PROJECT'))
- def buildNumber = ci_helper.get_env_value('build.env','BUILD_NUMBER')
- dir("$upstreamComponent") {
- // the upstream job name contains suffix with the project. Need this stripped off
- def project_without_branch = params.UPSTREAM_JOB_NAME.split('/')[0]
- def packages = ci_helper.get_archive(params.ARTIFACTORY_SERVER,
- upstreamComponent,
- GERRIT_BRANCH,
- "${project_without_branch} :: ${GERRIT_BRANCH}",
- buildNumber)
-
- packageList.addAll(packages)
- println("Fetched pre-merge ${params.UPSTREAM_JOB_NAME}: ${packages}")
- }
+ packageList.addAll(packages)
+ println("Fetched pre-merge ${params.UPSTREAM_JOB_NAME}: ${packages}")
+ }
+ } // lock artifactory
}
parallelSteps = [:]
}
}
}
- parallel parallelSteps
+ lock('Artifactory') {
+ parallel parallelSteps
+ }
///////////////////////////////////////////////////////////////////////////////////////
// Create Devops APT repository
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
sh "docker login ${INTERNAL_DOCKER_REGISTRY} -u ${USERNAME} -p ${PASSWORD}"
}
- moduleBuildArgs = ""
+ datetime = sh(returnStdout: true, script: "date +%Y-%m-%d:%H:%M:%S").trim()
+ moduleBuildArgs = " --build-arg CACHE_DATE=${datetime}"
for (packageName in builtModules.keySet()) {
envName=packageName.replaceAll("-","_").toUpperCase()+"_URL"
moduleBuildArgs += " --build-arg ${envName}=" + builtModules[packageName]
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