+ try {
+ if ( params.DO_INSTALL ) {
+ stage("Install") {
+
+ //will by default always delete containers on complete
+ //sh "jenkins/system/delete_old_containers.sh ${container_name_prefix}"
+
+ commit_id = ''
+ repo_distro = ''
+ repo_key_name = ''
+ release = ''
+
+ if ( params.COMMIT_ID )
+ {
+ commit_id = "-b ${params.COMMIT_ID}"
+ }
+
+ if ( params.REPO_DISTRO )
+ {
+ repo_distro = "-r ${params.REPO_DISTRO}"
+ }
+
+ if ( params.REPO_KEY_NAME )
+ {
+ repo_key_name = "-k ${params.REPO_KEY_NAME}"
+ }
+
+ if ( params.RELEASE )
+ {
+ release = "-R ${params.RELEASE}"
+ }
+
+ sh """
+ export PATH=$PATH:/snap/bin
+ installers/full_install_osm.sh -y -s ${container_name} --test --nolxd --nodocker --nojuju --nohostports --nohostclient \
+ --nodockerbuild -t ${container_name} \
+ -w /tmp/osm \
+ ${commit_id} \
+ ${repo_distro} \
+ ${repo_base_url} \
+ ${repo_key_name} \
+ ${release} \
+ ${params.BUILD_FROM_SOURCE}
+ """
+ }