2 // string: UPSTREAM_PROJECT
5 // OpenStack VIM Credentials
9 // string: OS_PROJECT_NAME
11 node("${params.NODE}") {
13 // grab the upstream artifact name
14 step ([$class: 'CopyArtifact',
15 projectName: params.UPSTREAM_PROJECT])
17 container_name = sh(returnStdout: true, script: 'cat build_version.txt').trim()
20 // get the IP of the osm container
21 OSM_IP = sh(returnStdout: true, script: "lxc list ${container_name} -c 4|grep eth0 |awk '{print \$2}'").trim()
28 // build the pytest container
29 stage("build-docker") {
30 sh 'docker build -t osmclient systest/.'
33 os_credentials = "OS_AUTH_URL=${params.OS_AUTH_URL} OS_USERNAME=${params.OS_USERNAME} OS_PASSWORD=${params.OS_PASSWORD} OS_PROJECT_NAME=${params.OS_PROJECT_NAME}"
35 // now run the built container.
36 withDockerContainer('osmclient') {
38 // install the osmclient
39 stage("install-osmclient") {
40 sh 'pip install git+https://osm.etsi.org/gerrit/osm/osmclient'
43 stage("build-descriptors") {
44 sh "make -C systest descriptors"
48 sh "make -C systest OSM_HOSTNAME=${OSM_IP} smoke"
49 junit 'systest/reports/pytest-smoke.xml'
52 stage("cirros-test") {
54 make -C systest OSM_HOSTNAME=${OSM_IP} ${os_credentials} cirros
56 junit 'systest/reports/pytest-cirros.xml'