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)
|
// Jenkinsfile (Pipeline Script)
|
||||||
node {
|
node {
|
||||||
// Select JDK8
|
// Configure environment
|
||||||
env.JAVA_HOME = tool name: 'JDK8'
|
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
|
checkout scm
|
||||||
|
|
||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
sh 'ant clean'
|
sh 'ant clean'
|
||||||
sh 'ant build'
|
sh 'ant build'
|
||||||
|
|
@ -23,14 +24,13 @@ node {
|
||||||
|
|
||||||
stage('Package') {
|
stage('Package') {
|
||||||
sh 'ant package'
|
sh 'ant package'
|
||||||
archiveArtifacts artifacts: 'build/release/Zutil.jar', fingerprint: true
|
archiveArtifacts artifacts: 'build/release/*', fingerprint: true
|
||||||
|
|
||||||
// Tag artifact
|
// Tag artifact
|
||||||
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'f8e5f6c6-4adb-4ab2-bb5d-1c8535dff491',
|
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'f8e5f6c6-4adb-4ab2-bb5d-1c8535dff491',
|
||||||
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
|
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
|
||||||
tag = "BUILD-" + env.BUILD_ID
|
sh "git tag ${env.BUILD_NAME}"
|
||||||
sh "git tag ${tag}"
|
sh "git push 'https://${USERNAME}:${PASSWORD}@${env.REPO_URL}' ${env.BUILD_NAME}"
|
||||||
sh "git push 'https://${USERNAME}:${PASSWORD}@repo.koc.se/hal.git' ${tag}"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue