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()
27 // build the pytest container
28 stage("build-docker") {
29 sh 'docker build -t osmclient systest/.'
32 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}"
34 // now run the built container.
35 withDockerContainer('osmclient') {
37 // install the osmclient
38 stage("install-osmclient") {
39 sh 'pip install git+https://osm.etsi.org/gerrit/osm/osmclient'
42 stage("build-descriptors") {
43 sh "make -C systest descriptors"
47 sh "make -C systest OSM_HOSTNAME=${OSM_IP} smoke"
48 junit 'systest/reports/pytest-smoke.xml'
51 stage("cirros-test") {
53 make -C systest OSM_HOSTNAME=${OSM_IP} ${os_credentials} cirros
55 junit 'systest/reports/pytest-cirros.xml'