some jenkins changes
This commit is contained in:
parent
a322447fcb
commit
0ede74fd5a
1 changed files with 19 additions and 16 deletions
35
Jenkinsfile
vendored
35
Jenkinsfile
vendored
|
|
@ -1,5 +1,11 @@
|
|||
// Jenkinsfile (Pipeline Script)
|
||||
node {
|
||||
// Configure environment
|
||||
//env.JAVA_HOME = tool name: 'JDK8'
|
||||
env.REPO_URL = "repo.koc.se/zallery.git"
|
||||
env.BUILD_NAME = "BUILD-" + env.BUILD_ID
|
||||
|
||||
|
||||
checkout scm
|
||||
|
||||
stage('Build') {
|
||||
|
|
@ -7,24 +13,21 @@ node {
|
|||
sh 'ant build'
|
||||
}
|
||||
|
||||
//stage('Test') {
|
||||
// try {
|
||||
// sh 'ant test'
|
||||
// } finally {
|
||||
// step([$class: 'JUnitResultArchiver', testResults: 'build/reports/*.xml'])
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
stage('Package') {
|
||||
sh 'ant package'
|
||||
archiveArtifacts artifacts: 'build/release/Zallery.war', fingerprint: true
|
||||
}
|
||||
sh 'ant package'
|
||||
archiveArtifacts artifacts: 'build/release/*', fingerprint: true
|
||||
|
||||
|
||||
stage('Deploy') {
|
||||
input message: 'Deploy?', submitter: 'ziver'
|
||||
sh 'ant deploy'
|
||||
// Tag artifact
|
||||
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'f8e5f6c6-4adb-4ab2-bb5d-1c8535dff491',
|
||||
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
|
||||
sh "git tag ${env.BUILD_NAME}"
|
||||
sh "git push 'https://${USERNAME}:${PASSWORD}@${env.REPO_URL}' ${env.BUILD_NAME}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy') {
|
||||
input 'Deploy?', submitter 'Administrator'
|
||||
sh 'ant deploy'
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue