added configuration parameters
This commit is contained in:
parent
454adf51a0
commit
232f52dbe4
1 changed files with 7 additions and 7 deletions
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
|
|
@ -1,12 +1,13 @@
|
|||
// Jenkinsfile (Pipeline Script)
|
||||
node {
|
||||
// Select JDK8
|
||||
// Configure environment
|
||||
env.JAVA_HOME = tool name: 'JDK8'
|
||||
echo "JDK installation path is: ${env.JAVA_HOME}"
|
||||
env.REPO_URL = "repo.koc.se/zutil-java.git" //scm.getUserRemoteConfigs()[0].getUrl()
|
||||
env.BUILD_NAME = "BUILD-" + env.BUILD_ID
|
||||
|
||||
|
||||
checkout scm
|
||||
|
||||
|
||||
stage('Build') {
|
||||
sh 'ant clean'
|
||||
sh 'ant build'
|
||||
|
|
@ -23,14 +24,13 @@ node {
|
|||
|
||||
stage('Package') {
|
||||
sh 'ant package'
|
||||
archiveArtifacts artifacts: 'build/release/Zutil.jar', fingerprint: true
|
||||
archiveArtifacts artifacts: 'build/release/*', fingerprint: true
|
||||
|
||||
// Tag artifact
|
||||
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'f8e5f6c6-4adb-4ab2-bb5d-1c8535dff491',
|
||||
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
|
||||
tag = "BUILD-" + env.BUILD_ID
|
||||
sh "git tag ${tag}"
|
||||
sh "git push 'https://${USERNAME}:${PASSWORD}@repo.koc.se/hal.git' ${tag}"
|
||||
sh "git tag ${env.BUILD_NAME}"
|
||||
sh "git push 'https://${USERNAME}:${PASSWORD}@${env.REPO_URL}' ${env.BUILD_NAME}"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue