blob: 2ba8d6fd99ed90d0c4109b7dcc1c9d24b702d378 [file] [log] [blame]
// Copyright 2017-present Open Networking Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
def jdkDistro = '${jdkDistro}'
node ('ubuntu16.04-basebuild-1c-2g') {
timeout (100) {
try {
stage ('Checkout code') {
checkout([$class: 'RepoScm', currentBranch: true, manifestRepositoryUrl: 'https://gerrit.opencord.org/manifest', quiet: true])
}
stage ('Build and Publish apps') {
// Set the JDK version
sh 'echo Using JDK distribution: ' + jdkDistro
sh 'sudo update-java-alternatives --set ' +jdkDistro
sh 'echo Java Version:'
sh 'java -version'
configFileProvider([configFile(fileId: 'onoscord-apps', variable: 'MAVEN_SETTINGS')]) {
sh 'export _JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true && cd onos-apps/apps && mvn -s $MAVEN_SETTINGS -e clean deploy'
}
}
currentBuild.result = 'SUCCESS'
} catch (err) {
currentBuild.result = 'FAILURE'
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
}
echo "RESULT: ${currentBuild.result}"
}
}