string(defaultValue: 'dpkg1', description: '', name: 'GPG_KEY_NAME'),
string(defaultValue: 'artifactory-osm', description: '', name: 'ARTIFACTORY_SERVER'),
string(defaultValue: 'osm-stage_4', description: '', name: 'DOWNSTREAM_STAGE_NAME'),
+ string(defaultValue: 'releasefive-daily', description: '', name: 'DOCKER_TAG'),
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'),
booleanParam(defaultValue: true, description: '', name: 'DO_BUILD'),
booleanParam(defaultValue: true, description: '', name: 'DO_INSTALL'),
booleanParam(defaultValue: true, description: '', name: 'DO_SMOKE'),
+ booleanParam(defaultValue: true, description: '', name: 'DO_DOCKERPUSH'),
booleanParam(defaultValue: false, description: '', name: 'SAVE_ARTIFACTS_OVERRIDE'),
])
])
upstream_main_job += '-merge'
container_name_prefix = "osm-${tag_or_branch}"
container_name = "${container_name_prefix}"
+
+ keep_artifacts = false
if ( JOB_NAME.contains('merge') ) {
container_name += "-merge"
+
+ // On a merge job, we keep artifacts on smoke success
+ keep_artifacts = params.SAVE_ARTIFACTS_ON_SMOKE_SUCCESS
}
container_name += "-${BUILD_NUMBER}"
if ( params.DO_BUILD ) {
stage("Build") {
sh "make -C docker clean"
- sh "make -j4 -C docker CMD_DOCKER_ARGS= TAG=${container_name} RELEASE=${params.RELEASE} REPOSITORY_BASE=${repo_base_url} REPOSITORY_KEY=${params.REPO_KEY_NAME} REPOSITORY=${params.REPO_DISTRO}"
+ sh "make -C docker Q= CMD_DOCKER_ARGS= TAG=${container_name} RELEASE=${params.RELEASE} REPOSITORY_BASE=${repo_base_url} REPOSITORY_KEY=${params.REPO_KEY_NAME} REPOSITORY=${params.REPO_DISTRO}"
}
}
stage("Smoke") {
run_systest(container_name,container_name,"smoke")
// archive smoke success until stage_4 is ready
- stage_archive = params.SAVE_ARTIFACTS_ON_SMOKE_SUCCESS
+
+ if ( ! currentBuild.result.equals('UNSTABLE') ) {
+ stage_archive = keep_artifacts
+ }
}
}
dir("${RELEASE_DIR}") {
ci_helper.archive(params.ARTIFACTORY_SERVER,RELEASE,GERRIT_BRANCH,'tested')
}
+ if ( params.DO_DOCKERPUSH ) {
+ stage("Docker Push") {
+ sh "make -C docker push INPUT_TAG=${container_name} TAG=${params.DOCKER_TAG}"
+ }
+ }
}
}
}