RUN apt-get update && apt-get -y install python \
libcurl4-gnutls-dev libgnutls-dev iputils-ping python-pip \
python-openstackclient wget
-RUN pip install python-magic pytest
+RUN pip install python-magic pytest==4.6.3
ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
ARG RELEASE=ReleaseFOUR-daily
* under the License.
*/
+stage_3_merge_result = ''
def Get_MDG(project) {
// split the project.
def values = project.split('/')
println("TEST_INSTALL = ${params.TEST_INSTALL}, downstream job: ${downstream_job_name}")
- stage_2_result = build job: "${downstream_job_name}", parameters: downstream_params, propagate: true
- if (stage_2_result.getResult() != 'SUCCESS') {
- project = stage_2_result.getProjectName()
- build = stage_2_result.getNumber()
- error("${project} build ${build} failed")
+ stage_3_merge_result = build job: "${downstream_job_name}", parameters: downstream_params, propagate: true
+ if (stage_3_merge_result.getResult() != 'SUCCESS') {
+ project = stage_3_merge_result.getProjectName()
+ build = stage_3_merge_result.getNumber()
+ // Jayant if the build fails the below error will cause the pipeline to terminate.
+ // error("${project} build ${build} failed")
+ }
+ }
+ stage('Send Email') {
+ if((stage_3_merge_result.getResult() != 'SUCCESS') && (${env.JOB_NAME} == 'daily-stage_4-dot-releasesix')){
+ emailext (
+ subject: "[OSM-Jenkins] Job: ${env.JOB_NAME} Build: ${env.BUILD_NUMBER} Result: ${stage_3_merge_result.getResult()}",
+ body: """ Check console output at "${env.BUILD_URL}" """,
+ to: 'OSM_MDL@list.etsi.org',
+ recipientProviders: [culprits()]
+ )
}
}
}
string(defaultValue: 'artifactory-osm', description: '', name: 'ARTIFACTORY_SERVER'),
string(defaultValue: 'osm-stage_4', description: '', name: 'DOWNSTREAM_STAGE_NAME'),
string(defaultValue: '6.0.1-rc', description: '', name: 'DOCKER_TAG'),
- booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_FAIL'),
+ booleanParam(defaultValue: true, 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'),
booleanParam(defaultValue: true, description: '', name: 'DO_STAGE_4'),
{
repo_base_url = "-u ${params.REPOSITORY_BASE}"
}
-
+ if ( params.DO_STAGE_4 ) {
+ sh "docker stack list | grep v60 | awk '{ print \$1 }'| xargs docker stack rm"
+ }
sh """
export PATH=$PATH:/snap/bin
installers/full_install_osm.sh -y -s ${container_name} --test --nolxd --nodocker --nojuju --nohostports --nohostclient \
currentBuild.result = 'FAILURE'
}
finally {
- sh "docker stop ${http_server_name}"
- sh "docker rm ${http_server_name}"
+
if ( params.DO_INSTALL ) {
if (error) {
if ( !params.SAVE_CONTAINER_ON_FAIL ) {
uninstall_osm container_name
+ sh "docker stop ${http_server_name}"
+ sh "docker rm ${http_server_name}"
}
throw error
}
else {
if ( !params.SAVE_CONTAINER_ON_PASS ) {
uninstall_osm container_name
+ sh "docker stop ${http_server_name}"
+ sh "docker rm ${http_server_name}"
}
}
}